From 92ca780d52f4b548dd14360447d707ef01f9169b Mon Sep 17 00:00:00 2001 From: David Golightly Date: Sun, 2 Sep 2018 19:20:29 -0700 Subject: [PATCH] v2.5.1 --- CHANGELOG.md | 3 + dist/esm/rrulestr/handlers.d.ts | 16 -- dist/esm/rrulestr/handlers.js | 91 ------------ dist/esm/rrulestr/handlers.js.map | 1 - dist/esm/rrulestr/index.d.ts | 11 -- dist/esm/rrulestr/index.js | 238 ------------------------------ dist/esm/rrulestr/index.js.map | 1 - package.json | 2 +- 8 files changed, 4 insertions(+), 359 deletions(-) delete mode 100644 dist/esm/rrulestr/handlers.d.ts delete mode 100644 dist/esm/rrulestr/handlers.js delete mode 100644 dist/esm/rrulestr/handlers.js.map delete mode 100644 dist/esm/rrulestr/index.d.ts delete mode 100644 dist/esm/rrulestr/index.js delete mode 100644 dist/esm/rrulestr/index.js.map diff --git a/CHANGELOG.md b/CHANGELOG.md index 8880bd7b..20ffc48f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelog +- 2.5.0 (2018-09-02) + - Bugfixes: + - Conformed output & parsing to RFC 5545 (#295) - 2.4.1 (2018-08-16) - Features: - Added codecov (#265) diff --git a/dist/esm/rrulestr/handlers.d.ts b/dist/esm/rrulestr/handlers.d.ts deleted file mode 100644 index 218d1f87..00000000 --- a/dist/esm/rrulestr/handlers.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Frequency, ByWeekday } from '../types'; -import { WeekdayStr, Weekday } from '../weekday'; -declare type FreqKey = keyof typeof Frequency; -declare type Handler = (value: string | FreqKey | WeekdayStr) => string | Date | undefined | ByWeekday | ByWeekday[]; -export declare function handle_DTSTART(value: string): Date | undefined; -export declare function handle_TZID(value: string): string | undefined; -export declare function handle_int(value: string): number; -export declare function handle_int_list(value: string): number[]; -export declare function handle_FREQ(value: FreqKey): Frequency; -export declare function handle_UNTIL(value: string): Date; -export declare function handle_WKST(value: WeekdayStr): Weekday; -export declare function handle_BYWEEKDAY(value: string): Weekday[]; -export declare const handlers: { - [key: string]: Handler; -}; -export {}; diff --git a/dist/esm/rrulestr/handlers.js b/dist/esm/rrulestr/handlers.js deleted file mode 100644 index 95981b45..00000000 --- a/dist/esm/rrulestr/handlers.js +++ /dev/null @@ -1,91 +0,0 @@ -import { Frequency } from '../types'; -import dateutil from '../dateutil'; -import { Weekday } from '../weekday'; -import { Days } from '../rrule'; -// tslint:disable-next-line:variable-name -var weekdays = { - MO: 0, - TU: 1, - WE: 2, - TH: 3, - FR: 4, - SA: 5, - SU: 6 -}; -var DTSTART_CLAUSE = /DTSTART(?:;TZID=([^:=]+))?(?::|=)([^;]+)/; -export function handle_DTSTART(value) { - var parms = DTSTART_CLAUSE.exec(value); - if (!parms) - return; - var __ = parms[0], ___ = parms[1], dtstart = parms[2]; - return dateutil.untilStringToDate(dtstart); -} -export function handle_TZID(value) { - var parms = DTSTART_CLAUSE.exec(value); - if (!parms) - return; - var __ = parms[0], tzid = parms[1]; - if (tzid) { - return tzid; - } -} -export function handle_int(value) { - return parseInt(value, 10); -} -export function handle_int_list(value) { - return value.split(',').map(handle_int); -} -export function handle_FREQ(value) { - return Frequency[value]; -} -export function handle_UNTIL(value) { - return dateutil.untilStringToDate(value); -} -export function handle_WKST(value) { - return Days[value]; -} -export function handle_BYWEEKDAY(value) { - return value.split(',').map(function (wday) { - var n; - var w; - // Two ways to specify this: +1MO or MO(+1) - if (wday.indexOf('(') > -1) { - // If it's of the form TH(+1), etc. - var splt = wday.split('('); - w = splt[0]; - n = parseInt(splt.slice(1, -1)[0], 10); - } - else { - var j = void 0; - // # If it's of the form +1MO - for (j = 0; j < wday.length; j++) { - if ('+-0123456789'.indexOf(wday[j]) === -1) - break; - } - n = wday.slice(0, j) || null; - w = wday.slice(j); - if (n) - n = parseInt(n, 10); - } - return new Weekday(weekdays[w], n); - }); -} -export var handlers = { - BYDAY: handle_BYWEEKDAY, - INTERVAL: handle_int, - COUNT: handle_int, - FREQ: handle_FREQ, - UNTIL: handle_UNTIL, - WKST: handle_WKST, - BYSETPOS: handle_int_list, - BYMONTH: handle_int_list, - BYWEEKDAY: handle_BYWEEKDAY, - BYMONTHDAY: handle_int_list, - BYYEARDAY: handle_int_list, - BYEASTER: handle_int_list, - BYWEEKNO: handle_int_list, - BYHOUR: handle_int_list, - BYMINUTE: handle_int_list, - BYSECOND: handle_int_list -}; -//# sourceMappingURL=handlers.js.map \ No newline at end of file diff --git a/dist/esm/rrulestr/handlers.js.map b/dist/esm/rrulestr/handlers.js.map deleted file mode 100644 index 93df7d01..00000000 --- a/dist/esm/rrulestr/handlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../../src/rrulestr/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,UAAU,CAAA;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,EAAc,OAAO,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,yCAAyC;AACzC,IAAM,QAAQ,GAAG;IACf,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACN,CAAA;AAID,IAAM,cAAc,GAAG,0CAA0C,CAAA;AAEjE,MAAM,UAAU,cAAc,CAC5B,KAAa;IAEb,IAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACxC,IAAI,CAAC,KAAK;QAAE,OAAM;IAEV,IAAA,aAAE,EAAE,cAAG,EAAE,kBAAO,CAAU;IAClC,OAAO,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,KAAa;IAEb,IAAM,KAAK,GAAG,cA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IAAI,CAAC,SAAQ,CAAA;YACb,6BAA6B;YAC7B,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAChC,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAAE,MAAK;aAClD;YACD,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAA;YAC5B,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAe,CAAA;YAE/B,IAAI,CAAC;gBAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;SAC3B;QAED,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAW,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,IAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,eAAe;IACxB,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,eAAe;IAC3B,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,eAAe;IACvB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,eAAe;CACI,CAAA"} \ No newline at end of file diff --git a/dist/esm/rrulestr/index.d.ts b/dist/esm/rrulestr/index.d.ts deleted file mode 100644 index bf90de67..00000000 --- a/dist/esm/rrulestr/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import RRule from '../rrule'; -import RRuleSet from '../rruleset'; -export interface RRuleStrOptions { - dtstart: Date | null; - cache: boolean; - unfold: boolean; - forceset: boolean; - compatible: boolean; - tzid: string | null; -} -export declare function rrulestr(s: string, options?: Partial): RRule | RRuleSet; diff --git a/dist/esm/rrulestr/index.js b/dist/esm/rrulestr/index.js deleted file mode 100644 index e95fa262..00000000 --- a/dist/esm/rrulestr/index.js +++ /dev/null @@ -1,238 +0,0 @@ -import RRule from '../rrule'; -import RRuleSet from '../rruleset'; -import dateutil from '../dateutil'; -import { includes, split, compact } from '../helpers'; -import { handlers, handle_DTSTART, handle_TZID } from './handlers'; -/** - * RRuleStr - * To parse a set of rrule strings - */ -var DEFAULT_OPTIONS = { - dtstart: null, - cache: false, - unfold: false, - forceset: false, - compatible: false, - tzid: null -}; -function _parseRfcRRule(line, options) { - if (options === void 0) { options = {}; } - options.dtstart = options.dtstart || null; - options.cache = options.cache || false; - var name; - var value; - var nameRegex = /^([A-Z]+):(.*)$/; - var nameParts = nameRegex.exec(line); - if (nameParts && nameParts.length >= 3) { - name = nameParts[1]; - value = nameParts[2]; - if (name !== 'RRULE') - throw new Error("unknown parameter name " + name); - } - else { - value = line; - } - var rrkwargs = {}; - rrkwargs.dtstart = handle_DTSTART(line) || options.dtstart; - rrkwargs.tzid = handle_TZID(line) || options.tzid; - var pairs = value.split(';'); - for (var i = 0; i < pairs.length; i++) { - var parts = pairs[i].split('='); - name = parts[0].toUpperCase(); - if (/DTSTART|TZID/.test(name)) { - continue; - } - var value_1 = parts[1].toUpperCase(); - var paramHandler = handlers[name]; - if (typeof paramHandler !== 'function') { - throw new Error("unknown parameter '" + name + "':" + value_1); - } - if (name === 'BYDAY') - name = 'BYWEEKDAY'; - rrkwargs[name.toLowerCase()] = paramHandler(value_1); - } - rrkwargs.dtstart = rrkwargs.dtstart || options.dtstart; - rrkwargs.tzid = rrkwargs.tzid || options.tzid; - return new RRule(compact(rrkwargs), !options.cache); -} -function _parseRfc(s, options) { - if (options.compatible) { - options.forceset = true; - options.unfold = true; - } - var lines = splitIntoLines(s, options.unfold); - if (!options.forceset && - lines.length === 1 && - (s.indexOf(':') === -1 || s.indexOf('RRULE:') === 0)) { - return _parseRfcRRule(lines[0], { - cache: options.cache, - dtstart: options.dtstart - }); - } - var rrulevals = []; - var rdatevals = []; - var exrulevals = []; - var exdatevals = []; - var dtstart; - var tzid; - lines.forEach(function (line) { - if (!line) - return; - var _a = breakDownLine(line), name = _a.name, parms = _a.parms, value = _a.value; - switch (name) { - case 'RRULE': - if (parms.length) { - throw new Error("unsupported RRULE parm: " + parms.join(',')); - } - rrulevals.push(value); - break; - case 'RDATE': - for (var j = 0; j < parms.length; j++) { - var parm = parms[j]; - if (parm !== 'VALUE=DATE-TIME' && parm !== 'VALUE=DATE') { - throw new Error('unsupported RDATE parm: ' + parm); - } - } - rdatevals.push(value); - break; - case 'EXRULE': - if (parms.length) { - throw new Error("unsupported EXRULE parm: " + parms.join(',')); - } - exrulevals.push(value); - break; - case 'EXDATE': - for (var j = 0; j < parms.length; j++) { - var parm = parms[j]; - if (parm !== 'VALUE=DATE-TIME' && parm !== 'VALUE=DATE') { - throw new Error('unsupported EXDATE parm: ' + parm); - } - } - exdatevals.push(value); - break; - case 'DTSTART': - dtstart = dateutil.untilStringToDate(value); - if (parms.length) { - var _b = parms[0].split('='), key = _b[0], value_2 = _b[1]; - if (key === 'TZID') { - tzid = value_2; - } - } - break; - default: - throw new Error('unsupported property: ' + name); - } - }); - if (options.forceset || - rrulevals.length > 1 || - rdatevals.length || - exrulevals.length || - exdatevals.length) { - var rset_1 = new RRuleSet(!options.cache); - rrulevals.forEach(function (val) { - rset_1.rrule(_parseRfcRRule(val, { - dtstart: options.dtstart || dtstart - })); - }); - rdatevals.forEach(function (dates) { - dates.split(',').forEach(function (datestr) { - rset_1.rdate(dateutil.untilStringToDate(datestr)); - }); - }); - exrulevals.forEach(function (val) { - rset_1.exrule(_parseRfcRRule(val, { - dtstart: options.dtstart || dtstart - })); - }); - exdatevals.forEach(function (dates) { - dates.split(',').forEach(function (datestr) { - rset_1.exdate(dateutil.untilStringToDate(datestr)); - }); - }); - // @ts-ignore - if (options.compatible && options.dtstart) - rset_1.rdate(dtstart); - return rset_1; - } - return _parseRfcRRule(rrulevals[0], { - // @ts-ignore - dtstart: options.dtstart || dtstart, - cache: options.cache, - // @ts-ignore - tzid: options.tzid || tzid - }); -} -export function rrulestr(s, options) { - if (options === void 0) { options = {}; } - var invalid = []; - var keys = Object.keys(options); - var defaultKeys = Object.keys(DEFAULT_OPTIONS); - keys.forEach(function (key) { - if (!includes(defaultKeys, key)) - invalid.push(key); - }); - if (invalid.length) { - throw new Error('Invalid options: ' + invalid.join(', ')); - } - // Merge in default options - defaultKeys.forEach(function (key) { - if (!includes(keys, key)) - options[key] = DEFAULT_OPTIONS[key]; - }); - return _parseRfc(s, options); -} -function extractName(line) { - if (line.indexOf(':') === -1) { - return { - name: 'RRULE', - value: line - }; - } - var _a = split(line, ':', 1), name = _a[0], value = _a[1]; - return { - name: name, - value: value - }; -} -function breakDownLine(line) { - var _a = extractName(line), name = _a.name, value = _a.value; - var parms = name.split(';'); - if (!parms) - throw new Error('empty property name'); - return { - name: parms[0].toUpperCase(), - parms: parms.slice(1), - value: value - }; -} -function splitIntoLines(s, unfold) { - if (unfold === void 0) { unfold = false; } - s = s && s.trim(); - if (!s) - throw new Error('Invalid empty string'); - // More info about 'unfold' option - // Go head to http://www.ietf.org/rfc/rfc2445.txt - if (unfold) { - var lines = s.split('\n'); - var i = 0; - while (i < lines.length) { - // TODO - var line = (lines[i] = lines[i].replace(/\s+$/g, '')); - if (!line) { - lines.splice(i, 1); - } - else if (i > 0 && line[0] === ' ') { - lines[i - 1] += line.slice(1); - lines.splice(i, 1); - } - else { - i += 1; - } - } - return lines; - } - else { - return s.split(/\s/); - } -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/rrulestr/index.js.map b/dist/esm/rrulestr/index.js.map deleted file mode 100644 index d451c8ea..00000000 --- a/dist/esm/rrulestr/index.js.map +++ /dev/null @@ -1 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AC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;gBACnC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAC7B,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;aACnB;iBAAM;gBACL,CAAC,IAAI,CAAC,CAAA;aACP;SACF;QACD,OAAO,KAAK,CAAA;KACb;SAAM;QACL,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;KACrB;AACH,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index ec0973df..a5b26799 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rrule", - "version": "2.5.0", + "version": "2.5.1", "description": "JavaScript library for working with recurrence rules for calendar dates.", "homepage": "http://jakubroztocil.github.io/rrule/", "license": "SEE LICENSE IN LICENSE",