super-productivity/packages/plugin-dev/caldav-calendar-provider
Johannes Millan 05690dee63
fix(caldav): handle numeric event shape in extractSyncValues (#8564) (#8573)
The "+ add to schedule" flow passes the PluginSearchResult shape, where
`start`/`duration` are epoch-ms numbers, but extractSyncValues only handled
the iCal-string shape returned by getById. parseIcalDateTime then ran
`.slice()` on a number, throwing `n.slice is not a function`, so the task
was silently never created for every CalDAV event.

Branch extractSyncValues on the value type: numeric start -> start_date
(all-day) or start_dateTime (timed) with numeric duration_ms; string start
keeps the existing iCal-parsing path. Guard parseIcalDateTime against
non-string input, and guard the numeric branch with Number.isFinite so a
NaN/Infinity start can't throw in toISOString or seed a corrupt write-back
baseline. Factor the YYYYMMDD->YYYY-MM-DD conversion into ymdToIsoDate,
shared by both branches.

Add regression specs for the numeric timed, numeric all-day, and
non-finite-start shapes.
2026-06-24 13:46:40 +02:00
..
scripts feat(calendar): add CalDAV Calendar plugin with time-blocking support 2026-03-28 23:10:08 +01:00
src fix(caldav): handle numeric event shape in extractSyncValues (#8564) (#8573) 2026-06-24 13:46:40 +02:00
icon.svg feat(calendar): add CalDAV Calendar plugin with time-blocking support 2026-03-28 23:10:08 +01:00
package-lock.json chore(deps): bump the npm_and_yarn group across 2 directories with 2 updates (#8477) 2026-06-18 20:22:52 +02:00
package.json chore(deps): bump the npm_and_yarn group across 9 directories with 1 update (#8366) 2026-06-13 14:37:36 +02:00
tsconfig.json feat(calendar): add CalDAV Calendar plugin with time-blocking support 2026-03-28 23:10:08 +01:00
vitest.config.ts feat(calendar): add CalDAV Calendar plugin with time-blocking support 2026-03-28 23:10:08 +01:00