@hebcal/icalendar 6.0.2 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,13 @@
1
- /*! @hebcal/icalendar v6.0.2 */
1
+ /*! @hebcal/icalendar v6.1.0 */
2
2
  import { flags, Locale, greg } from '@hebcal/core';
3
3
  import { murmur32HexSync } from 'murmurhash3';
4
- import { shouldRenderBrief, pad2, getEventCategories, makeAnchor, pad4, getHolidayDescription, getCalendarTitle, appendIsraelAndTracking, makeTorahMemoText } from '@hebcal/rest-api';
4
+ import { pad2, pad4 } from '@hebcal/hdate';
5
+ import { shouldRenderBrief, getEventCategories, getHolidayDescription, getCalendarTitle, appendIsraelAndTracking, makeTorahMemoText } from '@hebcal/rest-api/dist/esm/common';
6
+ import { makeAnchor } from '@hebcal/rest-api/dist/esm/makeAnchor';
5
7
  import { promises } from 'fs';
6
8
 
7
9
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
8
- const version = '6.0.2';
10
+ const version = '6.1.0';
9
11
 
10
12
  const vtimezoneCache = new Map();
11
13
  const CATEGORY = {
@@ -41,7 +43,13 @@ function appendTrackingToUrl(url, options) {
41
43
  if (!url) {
42
44
  return null;
43
45
  }
44
- const utmSource = options.utmSource || 'js';
46
+ let utmSource = options.utmSource;
47
+ if (!utmSource) {
48
+ const u = new URL(url);
49
+ if (u.host === 'www.hebcal.com') {
50
+ utmSource = 'js';
51
+ }
52
+ }
45
53
  const utmMedium = options.utmMedium || 'icalendar';
46
54
  const utmCampaign = options.utmCampaign;
47
55
  return appendIsraelAndTracking(url, options.il, utmSource, utmMedium, utmCampaign);
@@ -377,8 +385,9 @@ function createMemo(ev, options) {
377
385
  const url = appendTrackingToUrl(ev.url(), options);
378
386
  const torahMemo = makeTorahMemo(ev, options.il);
379
387
  if (!memo) {
380
- if (typeof ev.linkedEvent !== 'undefined') {
381
- memo = ev.linkedEvent.render(options.locale);
388
+ const linkedEvent = ev.linkedEvent;
389
+ if (typeof linkedEvent !== 'undefined') {
390
+ memo = linkedEvent.render(options.locale);
382
391
  }
383
392
  else {
384
393
  memo = getHolidayDescription(ev);
@@ -1 +1 @@
1
- export declare const version = "6.0.2";
1
+ export declare const version = "6.1.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/icalendar",
3
- "version": "6.0.2",
3
+ "version": "6.1.0",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "ical",
@@ -9,10 +9,10 @@
9
9
  "hebcal"
10
10
  ],
11
11
  "description": "Jewish holidays and Hebrew calendar as iCalendar RFC 2445",
12
- "module": "dist/index.mjs",
12
+ "module": "dist/index.js",
13
13
  "type": "module",
14
14
  "exports": {
15
- "import": "./dist/index.mjs",
15
+ "import": "./dist/index.js",
16
16
  "types": "./dist/icalendar.d.ts"
17
17
  },
18
18
  "typings": "dist/icalendar.d.ts",
@@ -24,14 +24,15 @@
24
24
  ],
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/hebcal/hebcal-icalendar.git"
27
+ "url": "git+https://github.com/hebcal/hebcal-icalendar.git"
28
28
  },
29
29
  "bugs": {
30
30
  "url": "https://github.com/hebcal/hebcal-icalendar/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@hebcal/core": "^5.8.0",
34
- "@hebcal/rest-api": "^5.2.0",
33
+ "@hebcal/core": "^5.8.3",
34
+ "@hebcal/hdate": "^0.12.0",
35
+ "@hebcal/rest-api": "^6.1.0",
35
36
  "murmurhash3": "^0.5.0",
36
37
  "tslib": "^2.8.1"
37
38
  },
@@ -55,14 +56,13 @@
55
56
  "@babel/preset-typescript": "^7.26.0",
56
57
  "@hebcal/learning": "^5.1.2",
57
58
  "@rollup/plugin-commonjs": "^28.0.1",
58
- "@rollup/plugin-json": "^6.1.0",
59
59
  "@rollup/plugin-typescript": "^12.1.1",
60
60
  "@types/jest": "^29.5.14",
61
- "@types/node": "22.9.0",
61
+ "@types/node": "22.10.1",
62
62
  "gts": "^5.3.1",
63
63
  "jest": "^29.7.0",
64
- "rollup": "^4.25.0",
65
- "typedoc": "^0.26.11",
66
- "typescript": "^5.6.3"
64
+ "rollup": "^4.28.1",
65
+ "typedoc": "^0.27.3",
66
+ "typescript": "^5.7.2"
67
67
  }
68
68
  }