switch to ical.js - v4.4 [skip-ci]
All checks were successful
Build SilverBullet Plug / build (push) Successful in 10s

This commit is contained in:
2026-02-21 15:45:09 -08:00
parent 4aa8019de1
commit 30731c7752
6 changed files with 34 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
---
name: Library/sstent/icalendar
version: "0.4.3"
version: "0.4.4"
tags: meta/library
files:
- icalendar.plug.js

View File

@@ -1,6 +1,6 @@
{
"name": "icalendar-plug",
"version": "0.4.3",
"version": "0.4.4",
"nodeModulesDir": "auto",
"tasks": {
"sync-version": "deno run -A scripts/sync-version.ts",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
name: icalendar
version: 0.4.3
version: 0.4.4
author: sstent
index: icalendar.ts
# Legacy SilverBullet permission name

View File

@@ -3,7 +3,7 @@ import { convertIcsCalendar } from "https://esm.sh/ts-ics@2.4.0";
import { RRule, RRuleSet } from "rrule";
import { getUtcOffsetMs, resolveIanaName } from "./timezones.ts";
const VERSION = "0.4.3";
const VERSION = "0.4.4";
const CACHE_KEY = "icalendar:lastSync";
console.log(`[iCalendar] Plug script executing at top level (Version ${VERSION})`);
@@ -361,7 +361,25 @@ async function fetchAndParseCalendar(source: any, windowDays = 365, displayTimez
// Use summary in key to avoid collisions
const uniqueKey = `${occurrence.start}${occurrence.uid || ''}${occurrence.summary || ''}`;
occurrence.ref = await sha256Hash(uniqueKey);
events.push(convertDatesToStrings(occurrence));
// Save our correctly formatted time strings
const savedTimes = {
start: occurrence.start,
startLocal: occurrence.startLocal,
end: occurrence.end,
endLocal: occurrence.endLocal
};
// Convert any remaining Date objects in other fields
const converted = convertDatesToStrings(occurrence);
// Restore our time strings (don't let them get reconverted)
converted.start = savedTimes.start;
converted.startLocal = savedTimes.startLocal;
converted.end = savedTimes.end;
converted.endLocal = savedTimes.endLocal;
events.push(converted);
}
}
return events;