@hebcal/icalendar 4.18.6 → 4.20.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.
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/icalendar.d.ts +5 -5
- package/package.json +15 -12
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/icalendar v4.
|
|
1
|
+
/*! @hebcal/icalendar v4.20.0 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var core = require('@hebcal/core');
|
|
@@ -6,7 +6,7 @@ var murmurhash3 = require('murmurhash3');
|
|
|
6
6
|
var restApi = require('@hebcal/rest-api');
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
|
|
9
|
-
const version="4.
|
|
9
|
+
const version="4.20.0";
|
|
10
10
|
|
|
11
11
|
const VTIMEZONE = {};
|
|
12
12
|
const CATEGORY = {
|
|
@@ -146,6 +146,8 @@ class IcalEvent {
|
|
|
146
146
|
const evAlarm = ev.alarm;
|
|
147
147
|
if (typeof evAlarm === 'string') {
|
|
148
148
|
return 'TRIGGER:' + evAlarm;
|
|
149
|
+
} else if (typeof evAlarm === 'boolean' && !evAlarm) {
|
|
150
|
+
return null;
|
|
149
151
|
} else if (core.greg.isDate(evAlarm)) {
|
|
150
152
|
evAlarm.setSeconds(0);
|
|
151
153
|
return 'TRIGGER;VALUE=DATE-TIME:' + IcalEvent.makeDtstamp(evAlarm);
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @hebcal/icalendar v4.
|
|
1
|
+
/*! @hebcal/icalendar v4.20.0 */
|
|
2
2
|
import { flags, Locale, greg } from '@hebcal/core';
|
|
3
3
|
import { murmur32HexSync } from 'murmurhash3';
|
|
4
4
|
import { shouldRenderBrief, pad2, getEventCategories, makeAnchor, pad4, getHolidayDescription, getCalendarTitle, appendIsraelAndTracking, makeTorahMemoText } from '@hebcal/rest-api';
|
|
5
5
|
import { promises } from 'fs';
|
|
6
6
|
|
|
7
|
-
const version="4.
|
|
7
|
+
const version="4.20.0";
|
|
8
8
|
|
|
9
9
|
const VTIMEZONE = {};
|
|
10
10
|
const CATEGORY = {
|
|
@@ -144,6 +144,8 @@ class IcalEvent {
|
|
|
144
144
|
const evAlarm = ev.alarm;
|
|
145
145
|
if (typeof evAlarm === 'string') {
|
|
146
146
|
return 'TRIGGER:' + evAlarm;
|
|
147
|
+
} else if (typeof evAlarm === 'boolean' && !evAlarm) {
|
|
148
|
+
return null;
|
|
147
149
|
} else if (greg.isDate(evAlarm)) {
|
|
148
150
|
evAlarm.setSeconds(0);
|
|
149
151
|
return 'TRIGGER;VALUE=DATE-TIME:' + IcalEvent.makeDtstamp(evAlarm);
|
package/icalendar.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/// <reference types="node"/>
|
|
2
|
-
import {
|
|
2
|
+
import {Event, CalOptions} from '@hebcal/core';
|
|
3
3
|
declare module '@hebcal/icalendar' {
|
|
4
4
|
/**
|
|
5
5
|
* @returns multi-line result, delimited by \r\n
|
|
6
6
|
*/
|
|
7
|
-
export function eventToIcal(e: Event, options:
|
|
7
|
+
export function eventToIcal(e: Event, options: CalOptions): string;
|
|
8
8
|
/**
|
|
9
9
|
* Renders an array of events as a full RFC 2445 iCalendar string
|
|
10
10
|
* @returns multi-line result, delimited by \r\n
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export function eventsToIcalendar(events: Event[], options: CalOptions): Promise<string>;
|
|
13
13
|
/**
|
|
14
14
|
* Generates an RFC 2445 iCalendar string from an array of IcalEvents
|
|
15
15
|
* @returns multi-line result, delimited by \r\n
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export function icalEventsToString(icals: IcalEvent[], options: CalOptions): Promise<string>;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Represents an RFC 2445 iCalendar VEVENT
|
|
@@ -23,7 +23,7 @@ export class IcalEvent {
|
|
|
23
23
|
/**
|
|
24
24
|
* Builds an IcalEvent object from a Hebcal Event
|
|
25
25
|
*/
|
|
26
|
-
constructor(ev: Event, options:
|
|
26
|
+
constructor(ev: Event, options: CalOptions);
|
|
27
27
|
toString(): string;
|
|
28
28
|
getLines(): string[];
|
|
29
29
|
getLongLines(): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/icalendar",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ical",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"url": "https://github.com/hebcal/hebcal-icalendar/issues"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@hebcal/core": "^
|
|
32
|
-
"@hebcal/rest-api": "^4.
|
|
31
|
+
"@hebcal/core": "^4.0.0",
|
|
32
|
+
"@hebcal/rest-api": "^4.5.0",
|
|
33
33
|
"murmurhash3": "^0.5.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
@@ -41,20 +41,23 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "BSD-2-Clause",
|
|
43
43
|
"ava": {
|
|
44
|
-
"require": [
|
|
44
|
+
"require": [
|
|
45
|
+
"@babel/register"
|
|
46
|
+
]
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
|
-
"@babel/core": "^7.
|
|
48
|
-
"@babel/preset-env": "^7.
|
|
49
|
-
"@babel/register": "^7.
|
|
49
|
+
"@babel/core": "^7.21.5",
|
|
50
|
+
"@babel/preset-env": "^7.21.5",
|
|
51
|
+
"@babel/register": "^7.21.0",
|
|
52
|
+
"@hebcal/learning": "^1.1.2",
|
|
50
53
|
"@rollup/plugin-babel": "^6.0.3",
|
|
51
|
-
"@rollup/plugin-commonjs": "^24.
|
|
54
|
+
"@rollup/plugin-commonjs": "^24.1.0",
|
|
52
55
|
"@rollup/plugin-json": "^6.0.0",
|
|
53
|
-
"ava": "^5.
|
|
54
|
-
"eslint": "^8.
|
|
56
|
+
"ava": "^5.2.0",
|
|
57
|
+
"eslint": "^8.39.0",
|
|
55
58
|
"eslint-config-google": "^0.14.0",
|
|
56
|
-
"jsdoc": "^4.0.
|
|
59
|
+
"jsdoc": "^4.0.2",
|
|
57
60
|
"jsdoc-to-markdown": "^8.0.0",
|
|
58
|
-
"rollup": "^3.
|
|
61
|
+
"rollup": "^3.21.0"
|
|
59
62
|
}
|
|
60
63
|
}
|