{"id":15428945,"url":"https://github.com/timdaub/simple-caldav","last_synced_at":"2025-07-11T05:03:35.961Z","repository":{"id":41784134,"uuid":"281115351","full_name":"TimDaub/simple-caldav","owner":"TimDaub","description":"caldav in JavaScript; made easy.","archived":false,"fork":false,"pushed_at":"2023-03-05T07:39:05.000Z","size":428,"stargazers_count":21,"open_issues_count":19,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T02:44:59.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimDaub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-20T12:51:52.000Z","updated_at":"2025-02-05T00:56:15.000Z","dependencies_parsed_at":"2024-10-20T09:52:56.593Z","dependency_job_id":null,"html_url":"https://github.com/TimDaub/simple-caldav","commit_stats":{"total_commits":88,"total_committers":3,"mean_commits":"29.333333333333332","dds":0.09090909090909094,"last_synced_commit":"8bf9f7d1f900d3f2ac548af29fb413ef1aace261"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/TimDaub/simple-caldav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Fsimple-caldav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Fsimple-caldav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Fsimple-caldav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Fsimple-caldav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimDaub","download_url":"https://codeload.github.com/TimDaub/simple-caldav/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Fsimple-caldav/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264734458,"owners_count":23655677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T18:08:09.656Z","updated_at":"2025-07-11T05:03:35.722Z","avatar_url":"https://github.com/TimDaub.png","language":"JavaScript","readme":"# simple-caldav\n\n[![npm version](https://badge.fury.io/js/simple-caldav.svg)](https://badge.fury.io/js/simple-caldav)\n\n\u003e caldav in JavaScript; made easy.\n\n## Note on Completeness\n\nThe caldav and ICS specifications are large. Additionally, I'm not sure I ever\nwant to implement them completely. But I saw the need to a simple module that\nworks with e.g. [radicale](https://radicale.org/3.0.html) and provides decent\ndeveloper experience. simple-caldav is that attempt.\n\n## Installation\n\n```bash\n$ npm i --save simple-caldav\n```\n\n## Usage\n\n```js\nconst SimpleCalDAV = require(\"simple-caldav\");\nconst URI = \"https://example.com/cal/\";\n\nconst dav = new SimpleCalDAV(URI, { credentials: \"include\", mode: \"cors\"});\nconst evt = dav.getEvent(\"abc\")\n  .then(console.log)\n  .catch(console.log);\n```\n\nFor now, see [tests](./test/index.test.js).\n\n### Notes\n\n- We translate a VEVENT's `STATUS` \u0026 `LOCATION` in the whole library to the\n  name `_status` \u0026 `_location` to make sure we're not violating any [reserved\n  words rules of\n  JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords).\n- When initializing `new SimpleCalDAV` [`fetch` request\n  options](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)\n  can be supplied on the second parameter (type object).\n\n### Usage and CORS\n\nWhen using `simple-caldav` in combination with a remote server and CORS starts\nto become an issue, make sure you allow the following CORS properties:\n\n- methods that need to be allowed: `GET, POST, PUT, DELETE, REPORT, PROPFIND, OPTIONS`\n- headers that need to be allowed: `Content-Type`, `If-None-Match`, `Depth`\n\n## Contributing\n\n```bash\n$ git clone git@github.com:TimDaub/simple-caldav.git\n$ cd simple-caldav \u0026\u0026 npm i\n$ npm run test\n```\n\nThe process outlined in [PUBLISH.md](./PUBLISH.md) SHOULD be followed when\nreleasing a new version of simple-caldav.\n\n## Changelog\n\n### 0.8.0\n\n- Add `;LANGUAGE=locale` to VEVENT \u0026 VALARM `description`, `summary`,\n  `location`. Function interfaces and return values have changed therefore.\n  Instead of strings, an object of the shape `{ value: \"string, language:\n  \"locale\"}` is now required.  The `language` prop is optional.\n- In some cases `subject` was wrongly used instead of `summary`. All\n  occurrences have been changed to `summary`.\n- Some internal code now uses [optional\n  chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining),\n  which is why node requires a version \u003e 14 now.\n\n### 0.7.1 (came after 0.8.0, [branch](https://github.com/TimDaub/simple-caldav/tree/version/0.7.1))\n\n- Bump a few dependencies' versions to fix vulnerabilities\n\n### 0.7.0\n\n- Instead of passing `fetch`'s `credentials` option as `\"include\"` by\n  default, it's now possible to add `fetch` request options when\n  initializing the `SimpleCalDAV` class.\n- `credentials: \"include\"` aren't passed as default anymore.\n\n### 0.6.0\n\n- For all `fetch` requests, allow passing credentials by using `credentials:\n  true`\n- Add note on CORS\n\n### 0.5.0\n\n- Remove `xpath` and `xmldom` dependencies for smaller builds.\n- Remove `getETags` method.\n\n### 0.4.7 (after 0.5.0, [branch](https://github.com/TimDaub/simple-caldav/tree/version/0.4.7))\n\n- Upgrade xmldom to v0.5.0\n\n### 0.4.6\n\n- Add `static applyDuration(date, duration)` that allows applying an\n  [specifically-shaped](https://github.com/TimDaub/simple-caldav/blob/0a924c33a5f4392dc1331f151e589a024b4580c2/src/index.js#L331)\n  [duration](https://www.kanzaki.com/docs/ical/duration.html) to a JavaScript\n  `Date`.\n\n### 0.4.5\n\n- Add VALUE=DATE-TIME to absolute-time trigger in VALARM.\n- Add support for [relative\n  triggers](https://www.kanzaki.com/docs/ical/trigger.html). `RELATED=` syntax\n  not yet supported.\n\n### 0.4.4\n\n- When updating an event, alarm's attendee would wrongly collect action\n  prefixes like `mailto:` or `sms:`, e.g.\n  `mailto:mailto:mailto:email@examlple.com`.\n\n### 0.4.3\n\n- Include `href` to event when calling `getEvent` or `listEvents`.\n\n### 0.4.2\n\n- Add `LOCATION` property to VEVENT.\n- Add `ORGANIZER;CN=:mailto` property to VEVENT.\n\n### 0.4.1\n\n- Fix UTC time zone shift calculation in `formatDateTime`.\n\n### 0.4.0\n\n- Switched out moment.js with `date-fns`. Breaking change is that\n  `formatDateTime` now only accepts `Date` objects, or throws otherwise.\n\n### 0.3.5\n\n- Bug fix: When adding multiple alarms, `,BEGIN:VALARM` would show up in VEVENT\ntext.\n\n### 0.3.4\n\n- Bug fix: When adding a status to an event, in its ical representation status\nstatement didn't add new `\\n` new line instruction.\n\n### 0.3.3\n\n- Add static `SimpleCalDAV.extractUid(href)` method.\n\n### 0.3.2\n\n- Add `_status` property to event.\n\n### 0.3.1\n\n- Bug fix: `syncCollection` wasn't able to detect a single VEVENT deletion event\nand simply returned an empty array. \n\n### 0.3.0\n\n- Bug fix: Stop attempting to parse relative-time VALARMS, as [ical.js isn't\n  capable of doing that\n  either](https://github.com/mozilla-comm/ical.js/issues/451). Relative-time\n  VALARMS are now ignored instead. Previously they threw.\n\n### 0.2.2\n\n- Bug fix: Ensure correct order of `etag` and `href` properties returned from\n  `syncCollection`.\n\n### 0.2.1\n\n- Introduce new method for retrieving single events with `uid`:\n  `getEvent(uid)`.\n- Parse and include `VALARM`s in `getEvent` and `listEvents`.\n\n### 0.2.0\n\n- Removed `TraversalError` from code base entirely.\n- `listEvents` now returns an empty array when no events are found or an\n  invalid xml gets passed.\n- Instead of throwing `TraversalError`, `SimpleCalDAV.traverseXML` now returns\n  an empty array when path couldn't be found.\n- Added `getSyncToken` method to retrieve a sync token from a server.\n- Added `syncCollection` to receive a diff of an entire collection with a sync\n  token.\n- Added `ServerError` that is thrown when there are problems with the server.\n\n### 0.1.3\n\n- Fix bug in VALARM construction.\n\n### 0.1.2\n\n- Fix bug in VEVENT construction.\n\n### 0.1.1\n\n- Allow adding VALARMS to VEVENTS.\n\n### 0.1.0\n\n- Transform ical.js events to simple JSON objects and all customizable\n  transformation parameter on `listEvents` method.\n\n### 0.0.1\n\n- Initial release.\n\n## License\n\n[WIP]\n\n## References\n\n- 1: [Building a CalDAV Client](https://sabre.io/dav/building-a-caldav-client/)\n- 2: [Radicale 3.0 Documentation: Command line client](https://radicale.org/3.0.html#documentation/supported-clients/command-line)\n- 3: [iCalendar Validator](https://icalendar.org/validator.html)\n- 4: [iCal specification](https://tools.ietf.org/html/rfc5545)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdaub%2Fsimple-caldav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimdaub%2Fsimple-caldav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdaub%2Fsimple-caldav/lists"}