Releases: angeloashmore/ics-js
v0.10.2
v0.10.0
Breaking Changes
-
Component#toBlob
Throws
IncompatiblePlatformError
ifBlob
is undefined. Blob is available in the browser, but not in Node.js, unless a polyfill is provided. -
Component#toBase64
Returns a string rather than a
Promise
. The previous implementation usedComponent#toBlob
to generate the base64 encoded string, but it now uses aBuffer
in Node.js orwindow.btoa
in the browser.
Other Changes
- Change
lodash
dependency tolodash.difference
for quicker installation.
v0.9.1
-
Exclude a property's trailing semicolon if no value is set.
Example:
event.addProp('ATTENDEE', null, { CN: 'Sample Company', RSVP: 'FALSE:mailto:sample@example.com' }
Now produces this:
ATTENDEE;CN=Sample Company;RSVP=FALSE:mailto:sample@example.com
Instead of this:
ATTENDEE;CN=Sample Company;RSVP=FALSE:mailto:sample@example.com:
(Note the trailing semicolon)
v0.9.0
- Fixes the way modules were exported.
Breaking Changes
-
When importing the library, the following methods can be used:
Import all components under
ICS
(e.g.ICS.VCALENDAR
,ICS.VEVENT
):import * as ICS from 'ics-js';
Import components explicitly (e.g.
VCALENDAR
,VEVENT
):import { VCALENDAR, VEVENT } from 'ics-js';
-
The previous method of importing the library is now unsupported:
// Unsupported. Don't do this! import ICS from 'ics-js';
v0.8.8
v0.8.7
- Change dependency
format-date
(no longer published on NPM) toformatoid
for Date string formatting
v0.8.6
- Adds transpiled ES5
dist
version as default entry point
Note: This library utilizes Promise
and Array.from
, both of which are not included in the dist
version. A Promise
and Array.from
implementation will need to be provided.
v0.8.5
Implement additional RFC requirements:
- Line wrapping lines > 75 characters
- Line separator should be
\r\n
(was\n
)
Also fixes the following regression:
Component#addProp
made a property'sskipTransformer
property inaccessible. It is now available as an argument toComponent#addProp
.
v0.8.4
-
Add support for time-less dates
When a property that transforms
Date
values is set withVALUE=DATE
, the time is not included when generating the ICS data.Example:
const event = new ICS.VEVENT(); // VALUE=DATE event.addProp('DTSTAMP', new Date('1991-07-11'), { VALUE: 'DATE' }); // VALUE=DATE-TIME event.addProp('DTSTART', new Date('1991-07-11 10:00:00'), { VALUE: 'DATE-TIME' }); // Without props (DATE-TIME is the default) event.addProp('DTEND', new Date('1991-07-11 22:00:00')); // Non-Date values are passed without transformations event.addProp('RDATE', '19910711T190000');
Return value of
event.toString()
:VBEGIN:VEVENT DTSTAMP:19910711 DTSTART:19910711T100000 DTEND:19910711T220000 RDATE:19910711T190000 VEND:VEVENT
v0.8.3
- Rename the SEQ property to SEQUENCE