Update cron to v4 and ical-generator to v10

cron v4: No code changes needed (positional constructor args still supported).
ical-generator v10: Removed `new` keyword (now a factory function) and
switched from `attachments` property to `createAttachment()` method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Isenhower 2026-02-15 16:09:19 -08:00
parent 6bf8696746
commit af526403a1
3 changed files with 34 additions and 32 deletions

View File

@ -241,7 +241,7 @@ export default class DataUpdater
async getiCalData(events, images) {
// Create a calendar object
const calendar = new ical({
const calendar = ical({
name: this.calendarName ?? this.name,
url: process.env.SITE_URL,
prodId: {
@ -257,14 +257,14 @@ export default class DataUpdater
// Add event entries
for (let event of events) {
calendar.createEvent(({
let calEvent = calendar.createEvent({
id: event.id,
summary: event.title,
start: event.start,
end: event.end,
url: event.url,
attachments: [event.imageUrl],
}));
});
calEvent.createAttachment(event.imageUrl);
const filename = images[event.imageUrl];
if (filename) {

54
package-lock.json generated
View File

@ -15,9 +15,9 @@
"@intlify/unplugin-vue-i18n": "^11.0.3",
"@sentry/node": "^10.38.0",
"console-stamp": "^3.0.6",
"cron": "^2.1.0",
"cron": "^4.4.0",
"dotenv": "^16.0.2",
"ical-generator": "^3.6.0",
"ical-generator": "^10.0.0",
"jsonpath": "^1.2.1",
"lodash": "^4.17.21",
"masto": "^7.10.1",
@ -4688,9 +4688,10 @@
}
},
"node_modules/@types/luxon": {
"version": "3.3.8",
"resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.8.tgz",
"integrity": "sha512-jYvz8UMLDgy3a5SkGJne8H7VA7zPV2Lwohjx0V8V31+SqAjNmurWMkk9cQhfvlcnXWudBpK9xPM1n4rljOcHYQ=="
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.7.1.tgz",
"integrity": "sha512-H3iskjFIAn5SlJU7OuxUmTEpebK6TKB8rxZShDslBMZJ5u9S//KM1sbdAisiSrqwLQncVjnpi2OK2J51h+4lsg==",
"license": "MIT"
},
"node_modules/@types/mysql": {
"version": "2.15.27",
@ -5711,12 +5712,20 @@
"license": "MIT"
},
"node_modules/cron": {
"version": "2.4.4",
"resolved": "https://registry.npmjs.org/cron/-/cron-2.4.4.tgz",
"integrity": "sha512-MHlPImXJj3K7x7lyUHjtKEOl69CSlTOWxS89jiFgNkzXfvhVjhMz/nc7/EIfN9vgooZp8XTtXJ1FREdmbyXOiQ==",
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/cron/-/cron-4.4.0.tgz",
"integrity": "sha512-fkdfq+b+AHI4cKdhZlppHveI/mgz2qpiYxcm+t5E5TsxX7QrLS1VE0+7GENEk9z0EeGPcpSciGv6ez24duWhwQ==",
"license": "MIT",
"dependencies": {
"@types/luxon": "~3.3.0",
"luxon": "~3.3.0"
"@types/luxon": "~3.7.0",
"luxon": "~3.7.0"
},
"engines": {
"node": ">=18.x"
},
"funding": {
"type": "ko-fi",
"url": "https://ko-fi.com/intcreator"
}
},
"node_modules/cross-spawn": {
@ -7204,20 +7213,17 @@
}
},
"node_modules/ical-generator": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/ical-generator/-/ical-generator-3.6.1.tgz",
"integrity": "sha512-tEH0OTNn00Mp61DcTxIFR+5fhsAivKk1LWAJUAbkMCI+M4yu+cZzT5X8rZf3b5PzFkMogh0zj3PsFh9bHvGGIQ==",
"dependencies": {
"uuid-random": "^1.3.2"
},
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/ical-generator/-/ical-generator-10.0.0.tgz",
"integrity": "sha512-YUQ7H4eZdLfYvx3zE/qN4AoG0qqwMZG37vLdWzysXFDn/YQEfctZ9tQuPSBncARKgv79d2smWf5Sh67k6xiZfg==",
"license": "MIT",
"engines": {
"node": ">=12.0.0"
"node": "20 || 22 || >=24"
},
"peerDependencies": {
"@touch4it/ical-timezones": ">=1.6.0",
"@types/luxon": ">= 1.26.0",
"@types/mocha": ">= 8.2.1",
"@types/node": ">= 15.0.0",
"dayjs": ">= 1.10.0",
"luxon": ">= 1.26.0",
"moment": ">= 2.29.0",
@ -7883,9 +7889,10 @@
}
},
"node_modules/luxon": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz",
"integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==",
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",
"integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",
"license": "MIT",
"engines": {
"node": ">=12"
}
@ -10357,11 +10364,6 @@
"uuid": "dist/bin/uuid"
}
},
"node_modules/uuid-random": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/uuid-random/-/uuid-random-1.3.2.tgz",
"integrity": "sha512-UOzej0Le/UgkbWEO8flm+0y+G+ljUon1QWTEZOq1rnMAsxo2+SckbiZdKzAHHlVh6gJqI1TjC/xwgR50MuCrBQ=="
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",

View File

@ -32,9 +32,9 @@
"@intlify/unplugin-vue-i18n": "^11.0.3",
"@sentry/node": "^10.38.0",
"console-stamp": "^3.0.6",
"cron": "^2.1.0",
"cron": "^4.4.0",
"dotenv": "^16.0.2",
"ical-generator": "^3.6.0",
"ical-generator": "^10.0.0",
"jsonpath": "^1.2.1",
"lodash": "^4.17.21",
"masto": "^7.10.1",