diff --git a/package-lock.json b/package-lock.json index 39b5c39..1d91268 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "4.18.3", "license": "BSD-2-Clause", "dependencies": { - "@hebcal/core": "^3.45.5", - "@hebcal/rest-api": "^4.3.6", + "@hebcal/core": "^3.46.1", + "@hebcal/rest-api": "^4.3.7", "murmurhash3": "^0.5.0" }, "devDependencies": { @@ -21,11 +21,11 @@ "@rollup/plugin-commonjs": "^23.0.2", "@rollup/plugin-json": "^5.0.1", "ava": "^5.1.0", - "eslint": "^8.27.0", + "eslint": "^8.28.0", "eslint-config-google": "^0.14.0", "jsdoc": "^4.0.0", "jsdoc-to-markdown": "^7.1.1", - "rollup": "^3.3.0" + "rollup": "^3.4.0" } }, "node_modules/@ampproject/remapping": { @@ -1694,9 +1694,9 @@ } }, "node_modules/@hebcal/core": { - "version": "3.45.5", - "resolved": "https://registry.npmjs.org/@hebcal/core/-/core-3.45.5.tgz", - "integrity": "sha512-uLsDUNSr7JfqBc+LJrFJUvpaeNcf01BVF1tI1Kz0nA62qhdl+NfUgt1aW9z2ZXRlEbH9qaM0X/0lqk0VxVrU+Q==", + "version": "3.46.1", + "resolved": "https://registry.npmjs.org/@hebcal/core/-/core-3.46.1.tgz", + "integrity": "sha512-jqfJWWyZbPfyhgvTlR+DveAyaXfRHFGFWVtVfbnCNFX2hTtfJHTIYORBGQagstz+LXfNoL4ATp2oirGm/ZhAKg==", "engines": { "node": ">=10.21.0" } @@ -1713,11 +1713,11 @@ } }, "node_modules/@hebcal/rest-api": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@hebcal/rest-api/-/rest-api-4.3.6.tgz", - "integrity": "sha512-ped8yWmF/VPCdScrKBzubixviRQU44ioKV8C9/YRpcsMlbX4S4gXrgXdpzDYnBjxE4eunp+DKYfEUFMNMRz61w==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/@hebcal/rest-api/-/rest-api-4.3.7.tgz", + "integrity": "sha512-QEmFzRQGr8PlDuX/tAWu772k6UA4yMtgYM7vS/biu03ekQAkT5q78JF7N5uBZECobSkDGWLU4bN9RcKeJCVJdA==", "dependencies": { - "@hebcal/core": "^3.45.5", + "@hebcal/core": "^3.46.1", "@hebcal/leyning": "^6.2.2", "@hebcal/triennial": "^1.0.4" } @@ -3099,9 +3099,9 @@ } }, "node_modules/eslint": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz", - "integrity": "sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==", + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", + "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.3", @@ -5483,9 +5483,9 @@ } }, "node_modules/rollup": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.3.0.tgz", - "integrity": "sha512-wqOV/vUJCYEbWsXvwCkgGWvgaEnsbn4jxBQWKpN816CqsmCimDmCNJI83c6if7QVD4v/zlyRzxN7U2yDT5rfoA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.4.0.tgz", + "integrity": "sha512-4g8ZrEFK7UbDvy3JF+d5bLiC8UKkS3n/27/cnVeESwB1LVPl6MoPL32/6+SCQ1vHTp6Mvp2veIHtwELhi+uXEw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7605,9 +7605,9 @@ } }, "@hebcal/core": { - "version": "3.45.5", - "resolved": "https://registry.npmjs.org/@hebcal/core/-/core-3.45.5.tgz", - "integrity": "sha512-uLsDUNSr7JfqBc+LJrFJUvpaeNcf01BVF1tI1Kz0nA62qhdl+NfUgt1aW9z2ZXRlEbH9qaM0X/0lqk0VxVrU+Q==" + "version": "3.46.1", + "resolved": "https://registry.npmjs.org/@hebcal/core/-/core-3.46.1.tgz", + "integrity": "sha512-jqfJWWyZbPfyhgvTlR+DveAyaXfRHFGFWVtVfbnCNFX2hTtfJHTIYORBGQagstz+LXfNoL4ATp2oirGm/ZhAKg==" }, "@hebcal/leyning": { "version": "6.2.2", @@ -7618,11 +7618,11 @@ } }, "@hebcal/rest-api": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@hebcal/rest-api/-/rest-api-4.3.6.tgz", - "integrity": "sha512-ped8yWmF/VPCdScrKBzubixviRQU44ioKV8C9/YRpcsMlbX4S4gXrgXdpzDYnBjxE4eunp+DKYfEUFMNMRz61w==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/@hebcal/rest-api/-/rest-api-4.3.7.tgz", + "integrity": "sha512-QEmFzRQGr8PlDuX/tAWu772k6UA4yMtgYM7vS/biu03ekQAkT5q78JF7N5uBZECobSkDGWLU4bN9RcKeJCVJdA==", "requires": { - "@hebcal/core": "^3.45.5", + "@hebcal/core": "^3.46.1", "@hebcal/leyning": "^6.2.2", "@hebcal/triennial": "^1.0.4" } @@ -8643,9 +8643,9 @@ "dev": true }, "eslint": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz", - "integrity": "sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==", + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", + "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", @@ -10377,9 +10377,9 @@ } }, "rollup": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.3.0.tgz", - "integrity": "sha512-wqOV/vUJCYEbWsXvwCkgGWvgaEnsbn4jxBQWKpN816CqsmCimDmCNJI83c6if7QVD4v/zlyRzxN7U2yDT5rfoA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.4.0.tgz", + "integrity": "sha512-4g8ZrEFK7UbDvy3JF+d5bLiC8UKkS3n/27/cnVeESwB1LVPl6MoPL32/6+SCQ1vHTp6Mvp2veIHtwELhi+uXEw==", "dev": true, "requires": { "fsevents": "~2.3.2" diff --git a/package.json b/package.json index 596a4c4..7df6193 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hebcal/icalendar", - "version": "4.18.3", + "version": "4.18.4", "author": "Michael J. Radwin (https://github.com/mjradwin)", "keywords": [ "ical", @@ -24,8 +24,8 @@ "url": "https://github.com/hebcal/hebcal-icalendar/issues" }, "dependencies": { - "@hebcal/core": "^3.45.5", - "@hebcal/rest-api": "^4.3.6", + "@hebcal/core": "^3.46.1", + "@hebcal/rest-api": "^4.3.7", "murmurhash3": "^0.5.0" }, "scripts": { @@ -55,10 +55,10 @@ "@rollup/plugin-commonjs": "^23.0.2", "@rollup/plugin-json": "^5.0.1", "ava": "^5.1.0", - "eslint": "^8.27.0", + "eslint": "^8.28.0", "eslint-config-google": "^0.14.0", "jsdoc": "^4.0.0", "jsdoc-to-markdown": "^7.1.1", - "rollup": "^3.3.0" + "rollup": "^3.4.0" } } diff --git a/src/icalendar.js b/src/icalendar.js index 7b5d7f6..cdd2089 100644 --- a/src/icalendar.js +++ b/src/icalendar.js @@ -11,6 +11,7 @@ const CATEGORY = { candles: 'Holiday', dafyomi: 'Daf Yomi', mishnayomi: 'Mishna Yomi', + yerushalmi: 'Yerushalmi Yomi', havdalah: 'Holiday', hebdate: null, holiday: 'Holiday', @@ -340,7 +341,7 @@ const torahMemoCache = new Map(); const HOLIDAY_IGNORE_MASK = flags.DAF_YOMI | flags.OMER_COUNT | flags.SHABBAT_MEVARCHIM | flags.MOLAD | flags.USER_EVENT | - flags.MISHNA_YOMI | + flags.MISHNA_YOMI | flags.YERUSHALMI_YOMI | flags.HEBREW_DATE; /** diff --git a/src/icalendar.spec.js b/src/icalendar.spec.js index cbc2499..6960fc8 100644 --- a/src/icalendar.spec.js +++ b/src/icalendar.spec.js @@ -633,3 +633,35 @@ test('uid', (t) => { const ical2 = new IcalEvent(new Event(new HDate(2, 'Cheshvan', 5782), 'Hello World'), {}); t.is(ical2.getUid(), 'hebcal-20211008-197683ce'); }); + +test('yerushalmi-yomi', (t) => { + const hd = new HDate(new Date(2022, 10, 15)); + const options = { + start: hd, + end: hd, + noHolidays: true, + yerushalmi: true, + locale: 'ashkenazi', + }; + const ev = HebrewCalendar.calendar(options)[0]; + t.is(ev.getDesc(), 'Berakhot 2'); + const ical = new IcalEvent(ev, options); + const lines = ical.toString().split('\r\n'); + lines[1] = 'DTSTAMP:X'; + lines[6] = 'UID:X'; + const expected = [ + 'BEGIN:VEVENT', + 'DTSTAMP:X', + 'CATEGORIES:Yerushalmi Yomi', + 'SUMMARY:Yerushalmi Berakhos 2', + 'DTSTART;VALUE=DATE:20221115', + 'DTEND;VALUE=DATE:20221116', + 'UID:X', + 'TRANSP:TRANSPARENT', + 'X-MICROSOFT-CDO-BUSYSTATUS:FREE', + 'X-MICROSOFT-CDO-ALLDAYEVENT:TRUE', + 'CLASS:PUBLIC', + 'END:VEVENT', + ]; + t.deepEqual(lines, expected); +});