ical-generator 6.0.0 → 6.0.1-develop.10
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/LICENSE +1 -1
- package/README.md +6 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +18 -18
- package/src/calendar.ts +2 -10
- package/src/event.ts +3 -3
package/package.json
CHANGED
|
@@ -8,39 +8,39 @@
|
|
|
8
8
|
},
|
|
9
9
|
"description": "ical-generator is a small piece of code which generates ical calendar files",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@qiwi/semantic-release-gh-pages-plugin": "^5.2.
|
|
11
|
+
"@qiwi/semantic-release-gh-pages-plugin": "^5.2.11",
|
|
12
12
|
"@semantic-release/changelog": "^6.0.3",
|
|
13
13
|
"@semantic-release/exec": "^6.0.3",
|
|
14
14
|
"@semantic-release/git": "^10.0.1",
|
|
15
|
-
"@semantic-release/npm": "^11.0.
|
|
15
|
+
"@semantic-release/npm": "^11.0.2",
|
|
16
16
|
"@touch4it/ical-timezones": "^1.9.0",
|
|
17
|
-
"@types/luxon": "^3.3.
|
|
18
|
-
"@types/mocha": "^10.0.
|
|
19
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
20
|
-
"@typescript-eslint/parser": "^6.
|
|
17
|
+
"@types/luxon": "^3.3.7",
|
|
18
|
+
"@types/mocha": "^10.0.6",
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
|
20
|
+
"@typescript-eslint/parser": "^6.13.2",
|
|
21
21
|
"c8": "^8.0.1",
|
|
22
22
|
"dayjs": "^1.11.10",
|
|
23
|
-
"eslint": "^8.
|
|
24
|
-
"eslint-plugin-jsonc": "^2.
|
|
23
|
+
"eslint": "^8.56.0",
|
|
24
|
+
"eslint-plugin-jsonc": "^2.11.2",
|
|
25
25
|
"esm": "^3.2.25",
|
|
26
26
|
"license-checker": "^25.0.1",
|
|
27
|
-
"luxon": "^3.4.
|
|
27
|
+
"luxon": "^3.4.4",
|
|
28
28
|
"mocha": "^10.2.0",
|
|
29
29
|
"mochawesome": "^7.1.3",
|
|
30
30
|
"moment": "^2.29.4",
|
|
31
31
|
"moment-timezone": "^0.5.43",
|
|
32
32
|
"nyc": "^15.1.0",
|
|
33
|
-
"rrule": "^2.
|
|
34
|
-
"semantic-release": "^22.0.
|
|
33
|
+
"rrule": "^2.8.1",
|
|
34
|
+
"semantic-release": "^22.0.12",
|
|
35
35
|
"semantic-release-license": "^1.0.2",
|
|
36
36
|
"source-map-support": "^0.5.21",
|
|
37
|
-
"ts-node": "^10.9.
|
|
38
|
-
"tsup": "^
|
|
39
|
-
"typedoc": "^0.25.
|
|
40
|
-
"typescript": "^5.
|
|
37
|
+
"ts-node": "^10.9.2",
|
|
38
|
+
"tsup": "^8.0.1",
|
|
39
|
+
"typedoc": "^0.25.4",
|
|
40
|
+
"typescript": "^5.3.3"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
|
-
"node": "
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
44
|
},
|
|
45
45
|
"exports": {
|
|
46
46
|
"import": "./dist/index.js",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"build": "tsup && cp ./dist/index.d.ts ./dist/index.d.cts",
|
|
118
118
|
"build-all": "./.github/workflows/build.sh",
|
|
119
119
|
"coverage": "c8 mocha",
|
|
120
|
-
"develop": "ts-node
|
|
120
|
+
"develop": "TS_NODE_TRANSPILE_ONLY=true node --no-warnings --enable-source-maps --loader ts-node/esm src/bin/start.ts",
|
|
121
121
|
"example": "node ./dist/examples/push.js",
|
|
122
122
|
"license-check": "license-checker --production --summary",
|
|
123
123
|
"lint": "eslint . --ext .ts,.js,.json",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"test": "mocha"
|
|
126
126
|
},
|
|
127
127
|
"type": "module",
|
|
128
|
-
"version": "6.0.
|
|
128
|
+
"version": "6.0.1-develop.10"
|
|
129
129
|
}
|
package/src/calendar.ts
CHANGED
|
@@ -169,21 +169,13 @@ export default class ICalCalendar {
|
|
|
169
169
|
return this.data.prodId;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (typeof prodId === 'string' && prodIdRegEx.test(prodId)) {
|
|
172
|
+
if (typeof prodId === 'string') {
|
|
175
173
|
this.data.prodId = prodId;
|
|
176
174
|
return this;
|
|
177
175
|
}
|
|
178
|
-
if (typeof prodId === 'string') {
|
|
179
|
-
throw new Error(
|
|
180
|
-
'`prodId` isn\'t formated correctly. See https://sebbo2002.github.io/ical-generator/develop/reference/'+
|
|
181
|
-
'classes/ICalCalendar.html#prodId'
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
176
|
|
|
185
177
|
if (typeof prodId !== 'object') {
|
|
186
|
-
throw new Error('`prodid` needs to be a
|
|
178
|
+
throw new Error('`prodid` needs to be a string or an object!');
|
|
187
179
|
}
|
|
188
180
|
|
|
189
181
|
if (!prodId.company) {
|
package/src/event.ts
CHANGED
|
@@ -158,7 +158,7 @@ interface ICalEventInternalRepeatingData {
|
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* Usually you get an `
|
|
161
|
+
* Usually you get an `ICalEvent` object like this:
|
|
162
162
|
* ```javascript
|
|
163
163
|
* import ical from 'ical-generator';
|
|
164
164
|
* const calendar = ical();
|
|
@@ -986,7 +986,7 @@ export default class ICalEvent {
|
|
|
986
986
|
|
|
987
987
|
|
|
988
988
|
/**
|
|
989
|
-
* Creates a new [[`ICalCategory`]] and returns it. Use options to prefill the
|
|
989
|
+
* Creates a new [[`ICalCategory`]] and returns it. Use options to prefill the category's attributes.
|
|
990
990
|
* Calling this method without options will create an empty category.
|
|
991
991
|
*
|
|
992
992
|
* ```javascript
|
|
@@ -994,7 +994,7 @@ export default class ICalEvent {
|
|
|
994
994
|
* const event = cal.createEvent();
|
|
995
995
|
* const category = event.createCategory({name: 'APPOINTMENT'});
|
|
996
996
|
*
|
|
997
|
-
* // add another
|
|
997
|
+
* // add another category
|
|
998
998
|
* event.createCategory({
|
|
999
999
|
* name: 'MEETING'
|
|
1000
1000
|
* });
|