From ef05c3d9d3178e3b9a1ad520adc97d0d46c883b9 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 18:24:36 +0200 Subject: [PATCH 1/8] migrate tslint config to eslint --- .eslintrc.js | 188 +++++ package.json | 11 +- test/parseoptions.test.ts | 2 +- test/rrule.test.ts | 2 +- yarn.lock | 1612 +++++++++++++++++++++++++++++++------ 5 files changed, 1585 insertions(+), 230 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..f3cfe702 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,188 @@ +/* +👋 Hi! This file was autogenerated by tslint-to-eslint-config. +https://github.com/typescript-eslint/tslint-to-eslint-config + +It represents the closest reasonable ESLint configuration to this +project's original TSLint configuration. + +We recommend eventually switching this configuration to extend from +the recommended rulesets in typescript-eslint. +https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md + +Happy linting! 💖 +*/ +module.exports = { + "env": { + "browser": true, + "node": true + }, + "extends": [ + "prettier" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "tsconfig.json", + "sourceType": "module" + }, + "plugins": [ + "eslint-plugin-import", + "eslint-plugin-jsdoc", + "@typescript-eslint", + "@typescript-eslint/tslint" + ], + "root": true, + "rules": { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/member-delimiter-style": [ + "error", + { + "multiline": { + "delimiter": "none", + "requireLast": true + }, + "singleline": { + "delimiter": "semi", + "requireLast": false + } + } + ], + "@typescript-eslint/naming-convention": "error", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-unnecessary-qualifier": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unused-expressions": [ + "error", + { + "allowTaggedTemplates": true, + "allowShortCircuit": true + } + ], + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@typescript-eslint/semi": [ + "error", + "never" + ], + "@typescript-eslint/triple-slash-reference": [ + "error", + { + "path": "always", + "types": "prefer-import", + "lib": "always" + } + ], + "@typescript-eslint/tslint/config": [ + "error", + { + "rules": { + "block-spacing": true, + "brace-style": true, + "handle-callback-err": true, + "no-duplicate-case": true, + "no-empty-character-class": true, + "no-ex-assign": true, + "no-extra-boolean-cast": true, + "no-inner-declarations": true, + "no-multi-spaces": true, + "no-unexpected-multiline": true, + "object-curly-spacing": true, + "ter-arrow-spacing": true, + "ter-func-call-spacing": true, + "ter-indent": true, + "ter-no-irregular-whitespace": true, + "ter-no-sparse-arrays": true, + "valid-typeof": true, + "whitespace": true + } + } + ], + "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/unified-signatures": "error", + "brace-style": [ + "error", + "1tbs" + ], + "comma-dangle": "error", + "curly": [ + "error", + "multi-line" + ], + "eol-last": "error", + "eqeqeq": [ + "error", + "smart" + ], + "id-denylist": [ + "error", + "any", + "Number", + "number", + "String", + "string", + "Boolean", + "boolean", + "Undefined", + "undefined" + ], + "id-match": "error", + "import/no-deprecated": "error", + "jsdoc/check-alignment": "error", + "jsdoc/check-indentation": "error", + "jsdoc/newline-after-description": "error", + "new-parens": "error", + "no-caller": "error", + "no-cond-assign": "error", + "no-constant-condition": "error", + "no-control-regex": "error", + "no-duplicate-imports": "error", + "no-empty": "error", + "no-empty-function": "error", + "no-eval": "error", + "no-fallthrough": "error", + "no-invalid-regexp": "error", + "no-multiple-empty-lines": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-return-await": "error", + "no-throw-literal": "error", + "no-trailing-spaces": "error", + "no-underscore-dangle": "error", + "no-unused-expressions": "error", + "no-unused-labels": "error", + "no-var": "error", + "one-var": [ + "error", + "never" + ], + "quotes": "error", + "radix": "error", + "semi": "error", + "space-before-function-paren": [ + "error", + "always" + ], + "space-in-parens": [ + "error", + "never" + ], + "spaced-comment": [ + "error", + "always", + { + "markers": [ + "/" + ] + } + ], + "use-isnan": "error" + } +}; diff --git a/package.json b/package.json index a2784b65..14424e70 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "scripts": { "build": "yarn lint && tsc && webpack && tsc dist/esm/**/*.d.ts", - "lint": "yarn tslint --project . --fix --config tslint.json", + "lint": "yarn eslint --fix --config .eslintrc.js", "run-ts": "TS_NODE_PROJECT=tsconfig.test.json node --loader ts-node/esm", "test": "yarn run-ts ./node_modules/.bin/mocha **/*.test.ts", "test-ci": "yarn run-ts ./node_modules/.bin/nyc yarn run-ts ./node_modules/.bin/mocha **/*.test.ts" @@ -45,12 +45,21 @@ "@types/mocha": "^9.1.1", "@types/mockdate": "^3.0.0", "@types/node": "^17.0.41", + "@typescript-eslint/eslint-plugin": "^5.27.1", + "@typescript-eslint/eslint-plugin-tslint": "^5.27.1", + "@typescript-eslint/parser": "^5.27.1", "chai": "^4.2.0", "coverage": "^0.4.1", + "eslint": "^8.17.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsdoc": "^39.3.2", + "html-webpack-plugin": "^3.2.0", "husky": "^8.0.1", "mocha": "^10.0.0", "mockdate": "^3.0.5", "nyc": "^15.1.0", + "prettier": "^2.6.2", "source-map-loader": "^3.0.1", "source-map-support": "^0.5.16", "terser-webpack-plugin": "^5.3.3", diff --git a/test/parseoptions.test.ts b/test/parseoptions.test.ts index 883e42de..6d8cde43 100644 --- a/test/parseoptions.test.ts +++ b/test/parseoptions.test.ts @@ -5,7 +5,7 @@ import { RRule } from '../src' describe('TZID', () => { it('leaves null when null', () => { const options = parseOptions({ tzid: null }) - // tslint:disable-next-line:no-unused-expression + // eslint-disable-next-line no-unused-expression expect(options.parsedOptions.tzid).to.be.null }) diff --git a/test/rrule.test.ts b/test/rrule.test.ts index 9ec537d1..9c15a16a 100644 --- a/test/rrule.test.ts +++ b/test/rrule.test.ts @@ -3527,7 +3527,7 @@ describe('RRule', function () { ].forEach(function (pair) { const rule = pair[0] const rr = RRule.fromString(rule) - // tslint:disable-next-line:no-unused-expression + // eslint-disable-next-line no-unused-expression expect(rr.toText()).to.be.ok // assert.equal(rr.toText(), pair[1]) -- can't test this because it reports in local time which varies by machine }) diff --git a/yarn.lock b/yarn.lock index b99bdd4e..a9943f2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -216,6 +216,44 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== +"@es-joy/jsdoccomment@~0.31.0": + version "0.31.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.31.0.tgz#dbc342cc38eb6878c12727985e693eaef34302bc" + integrity sha512-tc1/iuQcnaiSIUVad72PBierDFpsxdUHtEF/OrfqvM1CBAsIoMP51j52jTMb3dXriwhieTo289InzZj72jL3EQ== + dependencies: + comment-parser "1.3.1" + esquery "^1.4.0" + jsdoc-type-pratt-parser "~3.1.0" + +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.3.2" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.9.2": + version "0.9.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" + integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -288,6 +326,27 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@tsconfig/node10@^1.0.7": version "1.0.8" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" @@ -349,11 +408,16 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/mocha@^9.1.1": version "9.1.1" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" @@ -371,6 +435,94 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b" integrity sha512-xA6drNNeqb5YyV5fO3OAEsnXLfO7uF0whiOfPTz5AeDo8KeZFmODKnvwPymMNO8qE/an8pVY/O50tig2SQCrGw== +"@typescript-eslint/eslint-plugin-tslint@^5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-5.27.1.tgz#9d89f72ee9c6f182af07da696f8ccb6803afd7d9" + integrity sha512-U95M4jCGNbag0T5OtnwVXQJ5qx/1V9QOipcv9pQnOdIwVPPSBuoLYluOChGeuoQLHN/TjfTPqKhTBKtI3NmnRA== + dependencies: + "@typescript-eslint/utils" "5.27.1" + lodash "^4.17.21" + +"@typescript-eslint/eslint-plugin@^5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz#fdf59c905354139046b41b3ed95d1609913d0758" + integrity sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw== + dependencies: + "@typescript-eslint/scope-manager" "5.27.1" + "@typescript-eslint/type-utils" "5.27.1" + "@typescript-eslint/utils" "5.27.1" + debug "^4.3.4" + functional-red-black-tree "^1.0.1" + ignore "^5.2.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.27.1.tgz#3a4dcaa67e45e0427b6ca7bb7165122c8b569639" + integrity sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ== + dependencies: + "@typescript-eslint/scope-manager" "5.27.1" + "@typescript-eslint/types" "5.27.1" + "@typescript-eslint/typescript-estree" "5.27.1" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz#4d1504392d01fe5f76f4a5825991ec78b7b7894d" + integrity sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg== + dependencies: + "@typescript-eslint/types" "5.27.1" + "@typescript-eslint/visitor-keys" "5.27.1" + +"@typescript-eslint/type-utils@5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz#369f695199f74c1876e395ebea202582eb1d4166" + integrity sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw== + dependencies: + "@typescript-eslint/utils" "5.27.1" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.1.tgz#34e3e629501349d38be6ae97841298c03a6ffbf1" + integrity sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg== + +"@typescript-eslint/typescript-estree@5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz#7621ee78607331821c16fffc21fc7a452d7bc808" + integrity sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw== + dependencies: + "@typescript-eslint/types" "5.27.1" + "@typescript-eslint/visitor-keys" "5.27.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.27.1.tgz#b4678b68a94bc3b85bf08f243812a6868ac5128f" + integrity sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.27.1" + "@typescript-eslint/types" "5.27.1" + "@typescript-eslint/typescript-estree" "5.27.1" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/visitor-keys@5.27.1": + version "5.27.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz#05a62666f2a89769dac2e6baa48f74e8472983af" + integrity sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ== + dependencies: + "@typescript-eslint/types" "5.27.1" + eslint-visitor-keys "^3.3.0" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" @@ -534,12 +686,17 @@ acorn-import-assertions@^1.7.6: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-walk@^8.1.1: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.5.0: +acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== @@ -557,7 +714,7 @@ ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -589,7 +746,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -632,16 +789,52 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-includes@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -655,13 +848,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -722,16 +908,31 @@ caching-transform@^4.0.0: package-hash "^4.0.0" write-file-atomic "^3.0.0" +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - caniuse-lite@^1.0.30001349: version "1.0.30001350" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001350.tgz#f0acc6472469d066a4357765eb73be5973eda918" @@ -767,7 +968,7 @@ chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -800,6 +1001,13 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== +clean-css@4.2.x: + version "4.2.4" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.4.tgz#733bf46eba4e607c6891ea57c24a989356831178" + integrity sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A== + dependencies: + source-map "~0.6.0" + clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -814,24 +1022,6 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -870,6 +1060,11 @@ colorette@^2.0.14: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.17.tgz#5dd4c0d15e2984b7433cb4a9f2ead45063b80c47" integrity sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g== +commander@2.17.x: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== + commander@^2.12.1: version "2.16.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" @@ -884,6 +1079,16 @@ commander@^7.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@~2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + +comment-parser@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" + integrity sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -942,7 +1147,7 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -951,13 +1156,27 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -debug@4.3.4: +debug@4.3.4, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -970,11 +1189,6 @@ decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - deep-eql@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" @@ -982,6 +1196,11 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + default-require-extensions@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" @@ -989,6 +1208,21 @@ default-require-extensions@^3.0.0: dependencies: strip-bom "^4.0.0" +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + diff@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" @@ -999,6 +1233,13 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + doctrine@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" @@ -1006,6 +1247,20 @@ doctrine@0.7.2: esutils "^1.1.6" isarray "0.0.1" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + electron-to-chromium@^1.4.147: version "1.4.148" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.148.tgz#437430e03c58ccd1d05701f66980afe54d2253ec" @@ -1021,6 +1276,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng== + enhanced-resolve@^5.0.0, enhanced-resolve@^5.9.3: version "5.9.3" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" @@ -1040,11 +1300,74 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-abstract@^1.5.1: + version "1.12.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + es6-error@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" @@ -1055,7 +1378,7 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@4.0.0: +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== @@ -1065,7 +1388,60 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -eslint-scope@5.1.1: +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" + integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== + dependencies: + debug "^3.2.7" + find-up "^2.1.0" + +eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-jsdoc@^39.3.2: + version "39.3.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.3.2.tgz#b9c3becdbd860a75b8bd07bd04a0eaaad7c79403" + integrity sha512-RSGN94RYzIJS/WfW3l6cXzRLfJWxvJgNQZ4w0WCaxJWDJMigtwTsILEAfKqmmPkT2rwMH/s3C7G5ChDE6cwPJg== + dependencies: + "@es-joy/jsdoccomment" "~0.31.0" + comment-parser "1.3.1" + debug "^4.3.4" + escape-string-regexp "^4.0.0" + esquery "^1.4.0" + semver "^7.3.7" + spdx-expression-parse "^3.0.1" + +eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -1073,11 +1449,93 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.17.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.17.0.tgz#1cfc4b6b6912f77d24b874ca1506b0fe09328c21" + integrity sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw== + dependencies: + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.9.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.2" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" + integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== + dependencies: + acorn "^8.7.1" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -1090,7 +1548,7 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -1123,21 +1581,59 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -fast-deep-equal@^3.1.1: +extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fastest-levenshtein@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1162,6 +1658,13 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -1177,10 +1680,29 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + +flatted@^3.1.0: + version "3.2.5" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" + integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" foreground-child@^1.5.6: version "1.5.6" @@ -1217,6 +1739,26 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + furi@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/furi/-/furi-1.3.0.tgz#5fd4186d805ae80a3acd29efaf954761003391f8" @@ -1230,7 +1772,7 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1, get-caller-file@^2.0.5: +get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -1240,6 +1782,15 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -1250,13 +1801,28 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -glob-parent@~5.1.2: +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -1285,7 +1851,7 @@ glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.1.3, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -1301,7 +1867,31 @@ globals@^11.1.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" -graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.1.15, graceful-fs@^4.1.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -1317,6 +1907,11 @@ handlebars@^4.1.2: optionalDependencies: uglify-js "^3.1.4" +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1327,7 +1922,31 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has@^1.0.3: +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-symbols@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -1342,7 +1961,7 @@ hasha@^5.0.0: is-stream "^2.0.0" type-fest "^0.8.0" -he@1.2.0: +he@1.2.0, he@1.2.x: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -1356,6 +1975,32 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +html-minifier@^3.2.3: + version "3.5.21" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" + integrity sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA== + dependencies: + camel-case "3.0.x" + clean-css "4.2.x" + commander "2.17.x" + he "1.2.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.4.x" + +html-webpack-plugin@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + integrity sha512-Br4ifmjQojUP4EmHnRBoUIYcZ9J7M4bTMcm7u6xoIAIuq2Nte4TzXX0533owvkQKQD1WeMTTTyD4Ni4QKxS0Bg== + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -1373,6 +2018,19 @@ iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-local@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" @@ -1404,6 +2062,15 @@ inherits@2: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" @@ -1413,6 +2080,13 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1420,12 +2094,34 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" dependencies: builtin-modules "^1.0.0" +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + +is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-core-module@^2.8.1: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" @@ -1433,6 +2129,17 @@ is-core-module@^2.8.1: dependencies: has "^1.0.3" +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -1448,23 +2155,30 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -1472,11 +2186,44 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-regex@^1.0.4, is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -1487,6 +2234,13 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -1601,14 +2355,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -js-yaml@^3.13.1: +js-yaml@3.13.1, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -1616,6 +2363,18 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsdoc-type-pratt-parser@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" + integrity sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw== + jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" @@ -1634,15 +2393,39 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" load-json-file@^4.0.0: version "4.0.0" @@ -1659,6 +2442,24 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + integrity sha512-tiv66G0SmiOx+pLWMtGEkfSEejxvb6N6uRrQjfWJIT79W9GMpgKeCAmm9aVBKtd4WEgntciI8CsGqjpDoCWJug== + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -1686,13 +2487,31 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lodash@^4.17.3: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +log-symbols@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" + chalk "^2.0.1" loupe@^2.3.1: version "2.3.4" @@ -1701,6 +2520,11 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== + lru-cache@^4.0.1: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" @@ -1740,7 +2564,12 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -micromatch@^4.0.0: +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.0, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -1765,20 +2594,30 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== +minimatch@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: - brace-expansion "^2.0.1" + brace-expansion "^1.1.7" -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" @@ -1788,7 +2627,14 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -mkdirp@^0.5.1: +mkdirp@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA== + dependencies: + minimist "0.0.8" + +mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -1828,20 +2674,25 @@ mockdate@*, mockdate@^3.0.5: resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-3.0.5.tgz#789be686deb3149e7df2b663d2bc4392bc3284fb" integrity sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ== +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== neo-async@^2.6.0: version "2.6.1" @@ -1853,6 +2704,21 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +node-environment-flags@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" + integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + node-preload@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" @@ -1929,6 +2795,60 @@ nyc@^15.1.0: test-exclude "^6.0.0" yargs "^15.0.2" +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-inspect@^1.12.0, object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +object-keys@^1.0.11, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-keys@^1.0.8: + version "1.0.12" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1950,14 +2870,30 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== dependencies: - p-try "^2.0.0" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" -p-limit@^2.2.0: +os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== @@ -1971,6 +2907,13 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -1999,6 +2942,11 @@ p-map@^3.0.0: dependencies: aggregate-error "^3.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -2014,6 +2962,19 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -2062,6 +3023,11 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -2094,6 +3060,23 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" + integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + dependencies: + renderkid "^2.0.1" + utila "~0.4" + process-on-spawn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" @@ -2110,6 +3093,11 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -2148,6 +3136,24 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" +regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" @@ -2172,6 +3178,11 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" @@ -2184,13 +3195,7 @@ resolve@^1.10.0: dependencies: path-parse "^1.0.6" -resolve@^1.3.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - dependencies: - path-parse "^1.0.5" - -resolve@^1.9.0: +resolve@^1.20.0, resolve@^1.22.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -2199,6 +3204,28 @@ resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.3.2: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + rimraf@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" @@ -2206,16 +3233,37 @@ rimraf@^3.0.0: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== + dependencies: + ret "~0.1.10" + "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -2234,7 +3282,7 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" -semver@^5.3.0, semver@^5.6.0: +semver@^5.3.0, semver@^5.6.0, semver@^5.7.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -2244,14 +3292,14 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.4: +semver@^7.3.4, semver@^7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" -serialize-javascript@6.0.0, serialize-javascript@^6.0.0: +serialize-javascript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== @@ -2282,15 +3330,24 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -signal-exit@^3.0.0, signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" -signal-exit@^3.0.2: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -2318,7 +3375,7 @@ source-map-support@^0.5.16, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -2328,17 +3385,17 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -spawn-wrap@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" - integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== +spawn-wrap@^1.4.2: + version "1.4.3" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.3.tgz#81b7670e170cca247d80bf5faf0cfb713bdcf848" + integrity sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw== dependencies: - foreground-child "^2.0.0" - is-windows "^1.0.2" - make-dir "^3.0.0" - rimraf "^3.0.0" + foreground-child "^1.5.6" + mkdirp "^0.5.0" + os-homedir "^1.0.1" + rimraf "^2.6.2" signal-exit "^3.0.2" - which "^2.0.1" + which "^1.3.0" spdx-correct@^3.0.0: version "3.0.0" @@ -2358,6 +3415,14 @@ spdx-expression-parse@^3.0.0: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" +spdx-expression-parse@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + spdx-license-ids@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" @@ -2367,6 +3432,14 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -2376,14 +3449,30 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" @@ -2392,7 +3481,7 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -2414,17 +3503,22 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@3.1.1: +strip-json-comments@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== dependencies: - has-flag "^4.0.0" + has-flag "^3.0.0" supports-color@^5.3.0: version "5.5.0" @@ -2447,11 +3541,23 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -2488,14 +3594,10 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= to-fast-properties@^2.0.0: version "2.0.0" @@ -2508,6 +3610,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= + ts-loader@^9.3.0: version "9.3.0" resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.0.tgz#980f4dbfb60e517179e15e10ed98e454b132159f" @@ -2537,6 +3644,16 @@ ts-node@^10.8.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" @@ -2590,11 +3707,30 @@ tsutils@^3.0.0: dependencies: tslib "^1.8.1" +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.8.0: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -2612,6 +3748,14 @@ typescript@^4.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== +uglify-js@3.4.x: + version "3.4.10" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" + integrity sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw== + dependencies: + commander "~2.19.0" + source-map "~0.6.1" + uglify-js@^3.1.4: version "3.7.2" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.2.tgz#cb1a601e67536e9ed094a92dd1e333459643d3f9" @@ -2620,6 +3764,16 @@ uglify-js@^3.1.4: commander "~2.20.3" source-map "~0.6.1" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -2627,6 +3781,19 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +util.promisify@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -2637,6 +3804,11 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + v8-to-istanbul@^3.2.3: version "3.2.6" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-3.2.6.tgz#42333fe6b2a9849b108ff781af6faa1a61390eac" @@ -2722,12 +3894,23 @@ webpack@^5.73.0: watchpack "^2.3.1" webpack-sources "^3.2.3" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.2.9, which@^1.3.1: +which@1.3.1, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -2741,20 +3924,27 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + wildcard@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -2764,24 +3954,6 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2802,11 +3974,6 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -2816,12 +3983,15 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== +yargs-parser@13.1.1, yargs-parser@^13.0.0, yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" -yargs-parser@^13.1.1: +yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== @@ -2845,49 +4015,37 @@ yargs-parser@^15.0.0: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs@13.3.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1" -yargs@^14.0.0: - version "14.2.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" - integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA== +yargs@^13.2.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== dependencies: cliui "^5.0.0" - decamelize "^1.2.0" find-up "^3.0.0" get-caller-file "^2.0.1" require-directory "^2.1.1" @@ -2896,24 +4054,24 @@ yargs@^14.0.0: string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^15.0.0" + yargs-parser "^13.1.2" -yargs@^15.0.2: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== +yargs@^14.0.0: + version "14.2.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" + integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA== dependencies: - cliui "^6.0.0" + cliui "^5.0.0" decamelize "^1.2.0" - find-up "^4.1.0" + find-up "^3.0.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^4.2.0" + string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.2" + yargs-parser "^15.0.0" yn@3.1.1: version "3.1.1" From e70263c58dfa36087dafeca3d0bbf60756cf3a02 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 18:28:27 +0200 Subject: [PATCH 2/8] remove tslint --- .eslintrc.js | 41 +--- package.json | 2 - tslint.json | 143 ------------ yarn.lock | 625 +++++++++++++++++++++++++-------------------------- 4 files changed, 312 insertions(+), 499 deletions(-) delete mode 100644 tslint.json diff --git a/.eslintrc.js b/.eslintrc.js index f3cfe702..3b4ab767 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,16 +1,3 @@ -/* -👋 Hi! This file was autogenerated by tslint-to-eslint-config. -https://github.com/typescript-eslint/tslint-to-eslint-config - -It represents the closest reasonable ESLint configuration to this -project's original TSLint configuration. - -We recommend eventually switching this configuration to extend from -the recommended rulesets in typescript-eslint. -https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md - -Happy linting! 💖 -*/ module.exports = { "env": { "browser": true, @@ -27,8 +14,7 @@ module.exports = { "plugins": [ "eslint-plugin-import", "eslint-plugin-jsdoc", - "@typescript-eslint", - "@typescript-eslint/tslint" + "@typescript-eslint" ], "root": true, "rules": { @@ -80,31 +66,6 @@ module.exports = { "lib": "always" } ], - "@typescript-eslint/tslint/config": [ - "error", - { - "rules": { - "block-spacing": true, - "brace-style": true, - "handle-callback-err": true, - "no-duplicate-case": true, - "no-empty-character-class": true, - "no-ex-assign": true, - "no-extra-boolean-cast": true, - "no-inner-declarations": true, - "no-multi-spaces": true, - "no-unexpected-multiline": true, - "object-curly-spacing": true, - "ter-arrow-spacing": true, - "ter-func-call-spacing": true, - "ter-indent": true, - "ter-no-irregular-whitespace": true, - "ter-no-sparse-arrays": true, - "valid-typeof": true, - "whitespace": true - } - } - ], "@typescript-eslint/type-annotation-spacing": "error", "@typescript-eslint/unified-signatures": "error", "brace-style": [ diff --git a/package.json b/package.json index 14424e70..5410c9aa 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "@types/mockdate": "^3.0.0", "@types/node": "^17.0.41", "@typescript-eslint/eslint-plugin": "^5.27.1", - "@typescript-eslint/eslint-plugin-tslint": "^5.27.1", "@typescript-eslint/parser": "^5.27.1", "chai": "^4.2.0", "coverage": "^0.4.1", @@ -65,7 +64,6 @@ "terser-webpack-plugin": "^5.3.3", "ts-loader": "^9.3.0", "ts-node": "^10.8.1", - "tslint": "^5.20.1", "tslint-eslint-rules": "^5.4.0", "typescript": "^4.7.3", "webpack": "^5.73.0", diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 9f2ec62b..00000000 --- a/tslint.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "extends": ["tslint-eslint-rules"], - "rules": { - // TSLint rules. - "no-internal-module": true, - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - }, - { - "call-signature": "onespace", - "index-signature": "onespace", - "parameter": "onespace", - "property-declaration": "onespace", - "variable-declaration": "onespace" - } - ], - "await-promise": true, - "curly": [true, "ignore-same-line"], - "label-position": true, - "no-arg": true, - "no-conditional-assignment": true, - "no-duplicate-imports": true, - "no-duplicate-variable": true, - "no-empty": true, - "no-eval": true, - "no-reference-import": true, - "no-return-await": true, - "no-switch-case-fall-through": true, - "no-unused-expression": [ - true, - "allow-fast-null-checks", - "allow-tagged-template" - ], - "no-var-keyword": true, - "radix": true, - "space-within-parens": [true, 0], - "triple-equals": [true, "allow-null-check"], - "use-isnan": true, - "eofline": true, - "ter-indent": [ - true, - 2, - { - "SwitchCase": 1 - } - ], - "no-trailing-whitespace": true, - "trailing-comma": [ - true, - { - "multiline": "never", - "singleline": "never" - } - ], - "class-name": true, - "comment-format": [true, "check-space"], - "jsdoc-format": true, - "new-parens": true, - "no-angle-bracket-type-assertion": true, - "no-consecutive-blank-lines": true, - "no-floating-promises": true, - "no-misused-new": true, - "no-string-throw": true, - "no-unnecessary-qualifier": true, - "no-unnecessary-type-assertion": true, - "one-line": [ - true, - "check-catch", - "check-finally", - "check-else", - "check-open-brace", - "check-whitespace" - ], - "one-variable-per-declaration": true, - "quotemark": [true, "single", "avoid-escape", "jsx-single"], - "semicolon": [true, "never"], - "space-before-function-paren": [true, "always"], - "unified-signatures": true, - "variable-name": [ - true, - "ban-keywords", - "check-format", - "allow-leading-underscore", - "allow-pascal-case" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - // 'check-module', - "check-rest-spread", - "check-type", - "check-typecast", - "check-type-operator", - "check-preblock" - ], - // TSLint ESLint rules. - "no-constant-condition": [ - true, - { - "checkLoops": false - } - ], - "no-control-regex": true, - "no-duplicate-case": true, - "no-empty-character-class": true, - "no-ex-assign": true, - "no-extra-boolean-cast": true, - "no-inner-declarations": [true, "functions"], - "no-invalid-regexp": true, - "ter-no-irregular-whitespace": true, - "no-regex-spaces": true, - "ter-no-sparse-arrays": true, - "ter-func-call-spacing": [true, "never"], - "no-unexpected-multiline": true, - "valid-typeof": true, - "ter-arrow-spacing": [ - true, - { - "before": true, - "after": true - } - ], - "no-multi-spaces": true, - "handle-callback-err": [true, "^(err|error)$"], - "block-spacing": [true, "always"], - "brace-style": [ - true, - "1tbs", - { - "allowSingleLine": true - } - ], - "object-curly-spacing": [true, "always"] - } -} diff --git a/yarn.lock b/yarn.lock index a9943f2b..397e7f07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,13 +10,6 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== - dependencies: - "@babel/highlight" "^7.0.0" - "@babel/code-frame@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" @@ -143,15 +136,6 @@ "@babel/traverse" "^7.18.2" "@babel/types" "^7.18.2" -"@babel/highlight@^7.0.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" - integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - "@babel/highlight@^7.16.7": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" @@ -435,14 +419,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b" integrity sha512-xA6drNNeqb5YyV5fO3OAEsnXLfO7uF0whiOfPTz5AeDo8KeZFmODKnvwPymMNO8qE/an8pVY/O50tig2SQCrGw== -"@typescript-eslint/eslint-plugin-tslint@^5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-5.27.1.tgz#9d89f72ee9c6f182af07da696f8ccb6803afd7d9" - integrity sha512-U95M4jCGNbag0T5OtnwVXQJ5qx/1V9QOipcv9pQnOdIwVPPSBuoLYluOChGeuoQLHN/TjfTPqKhTBKtI3NmnRA== - dependencies: - "@typescript-eslint/utils" "5.27.1" - lodash "^4.17.21" - "@typescript-eslint/eslint-plugin@^5.27.1": version "5.27.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz#fdf59c905354139046b41b3ed95d1609913d0758" @@ -729,6 +705,11 @@ ansi-colors@4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + ansi-regex@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" @@ -746,7 +727,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -820,11 +801,6 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -840,6 +816,11 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -848,6 +829,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -876,7 +864,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -933,6 +921,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + caniuse-lite@^1.0.30001349: version "1.0.30001350" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001350.tgz#f0acc6472469d066a4357765eb73be5973eda918" @@ -959,15 +952,6 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -1022,6 +1006,24 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -1065,10 +1067,6 @@ commander@2.17.x: resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@^2.12.1: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" - commander@^2.20.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -1156,6 +1154,22 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +css-select@^4.1.3: + version "4.3.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" + integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== + dependencies: + boolbase "^1.0.0" + css-what "^6.0.1" + domhandler "^4.3.1" + domutils "^2.8.0" + nth-check "^2.0.1" + +css-what@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + debug@4.3.4, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1189,6 +1203,11 @@ decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + deep-eql@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" @@ -1243,6 +1262,7 @@ dir-glob@^3.0.1: doctrine@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" + integrity sha512-qiB/Rir6Un6Ad/TIgTRzsremsTGWzs8j7woXvp14jgq00676uBiBT5eUOi+FgRywZFVy5Us/c04ISRpZhRbS6w== dependencies: esutils "^1.1.6" isarray "0.0.1" @@ -1261,6 +1281,43 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-converter@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== + dependencies: + utila "~0.4" + +dom-serializer@^1.0.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.5.2, domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + electron-to-chromium@^1.4.147: version "1.4.148" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.148.tgz#437430e03c58ccd1d05701f66980afe54d2253ec" @@ -1289,6 +1346,11 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" @@ -1556,6 +1618,7 @@ estraverse@^5.1.0, estraverse@^5.2.0: esutils@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" + integrity sha512-RG1ZkUT7iFJG9LSHr7KDuuMSlujfeTtMNIcInURxKAxhMtwQhI3NrQhz26gZQYlsYZQKzsnwtpKrFKj9K9Qu1A== esutils@^2.0.2: version "2.0.2" @@ -1581,14 +1644,6 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -1688,12 +1743,10 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" -flat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" - integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== - dependencies: - is-buffer "~2.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== flatted@^3.1.0: version "3.2.5" @@ -1772,7 +1825,7 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -1840,18 +1893,7 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3, glob@^7.1.6: +glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -1929,11 +1971,6 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-symbols@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -2001,6 +2038,16 @@ html-webpack-plugin@^3.2.0: toposort "^1.0.0" util.promisify "1.0.0" +htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -2102,11 +2149,6 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-buffer@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" @@ -2133,13 +2175,6 @@ is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -2179,6 +2214,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -2355,7 +2395,14 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1, js-yaml@^3.13.1: +js-yaml@4.1.0, js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -2363,13 +2410,6 @@ js-yaml@3.13.1, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - jsdoc-type-pratt-parser@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" @@ -2492,11 +2532,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -2506,12 +2541,13 @@ lodash@^4.17.3: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -log-symbols@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^2.0.1" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" loupe@^2.3.1: version "2.3.4" @@ -2594,12 +2630,12 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== dependencies: - brace-expansion "^1.1.7" + brace-expansion "^2.0.1" minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" @@ -2608,11 +2644,6 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -2627,20 +2658,6 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA== - dependencies: - minimist "0.0.8" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - mocha@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" @@ -2674,21 +2691,26 @@ mockdate@*, mockdate@^3.0.5: resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-3.0.5.tgz#789be686deb3149e7df2b663d2bc4392bc3284fb" integrity sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ== -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -2711,14 +2733,6 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -node-environment-flags@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" - integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - node-preload@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" @@ -2762,6 +2776,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + nyc@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" @@ -2804,24 +2825,14 @@ object-inspect@^1.12.0, object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-keys@^1.0.11, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - object-keys@^1.0.8: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object.assign@^4.1.2: version "4.1.2" @@ -2882,10 +2893,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -3002,10 +3009,6 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -3161,6 +3164,17 @@ release-zalgo@^1.0.0: dependencies: es6-error "^4.0.1" +renderkid@^2.0.1: + version "2.0.7" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" + integrity sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ== + dependencies: + css-select "^4.1.3" + dom-converter "^0.2.0" + htmlparser2 "^6.1.0" + lodash "^4.17.21" + strip-ansi "^3.0.1" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -3195,7 +3209,7 @@ resolve@^1.10.0: dependencies: path-parse "^1.0.6" -resolve@^1.20.0, resolve@^1.22.0: +resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -3204,28 +3218,11 @@ resolve@^1.20.0, resolve@^1.22.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.3.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - dependencies: - path-parse "^1.0.5" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - rimraf@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" @@ -3257,13 +3254,6 @@ safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== - dependencies: - ret "~0.1.10" - "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -3282,7 +3272,7 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" -semver@^5.3.0, semver@^5.6.0, semver@^5.7.0: +semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -3299,7 +3289,7 @@ semver@^7.3.4, semver@^7.3.7: dependencies: lru-cache "^6.0.0" -serialize-javascript@^6.0.0: +serialize-javascript@6.0.0, serialize-javascript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== @@ -3385,17 +3375,17 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -spawn-wrap@^1.4.2: - version "1.4.3" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.3.tgz#81b7670e170cca247d80bf5faf0cfb713bdcf848" - integrity sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw== +spawn-wrap@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" + integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== dependencies: - foreground-child "^1.5.6" - mkdirp "^0.5.0" - os-homedir "^1.0.1" - rimraf "^2.6.2" + foreground-child "^2.0.0" + is-windows "^1.0.2" + make-dir "^3.0.0" + rimraf "^3.0.0" signal-exit "^3.0.2" - which "^1.3.0" + which "^2.0.1" spdx-correct@^3.0.0: version "3.0.0" @@ -3432,14 +3422,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -3449,6 +3431,15 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string.prototype.trimend@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" @@ -3467,12 +3458,12 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= +strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: - ansi-regex "^3.0.0" + ansi-regex "^2.0.0" strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" @@ -3481,7 +3472,7 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -3503,22 +3494,17 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== +supports-color@8.1.1, supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: - has-flag "^3.0.0" + has-flag "^4.0.0" supports-color@^5.3.0: version "5.5.0" @@ -3541,13 +3527,6 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -3594,6 +3573,15 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -3658,7 +3646,7 @@ tslib@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" -tslib@^1.8.0, tslib@^1.8.1: +tslib@^1.8.1: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -3675,32 +3663,6 @@ tslint-eslint-rules@^5.4.0: tslib "1.9.0" tsutils "^3.0.0" -tslint@^5.20.1: - version "5.20.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" - integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^4.0.1" - glob "^7.1.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - mkdirp "^0.5.1" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.29.0" - -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" - tsutils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.0.0.tgz#0c5070a17a0503e056da038c48b5a1870a50a9ad" @@ -3774,6 +3736,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -3789,10 +3756,10 @@ util.promisify@1.0.0: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= uuid@^8.3.2: version "8.3.2" @@ -3910,7 +3877,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -3924,13 +3891,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - wildcard@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" @@ -3945,6 +3905,11 @@ wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -3954,6 +3919,24 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -3974,6 +3957,11 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -3983,7 +3971,12 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@13.1.1, yargs-parser@^13.0.0, yargs-parser@^13.1.1: +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== @@ -3991,14 +3984,6 @@ yargs-parser@13.1.1, yargs-parser@^13.0.0, yargs-parser@^13.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^14.0.0: version "14.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-14.0.0.tgz#42e25777b06718ec99eac2c3a98ad3de73b6818f" @@ -4015,37 +4000,49 @@ yargs-parser@^15.0.0: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" -yargs@13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" - integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" -yargs@^13.2.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== +yargs@^14.0.0: + version "14.2.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" + integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA== dependencies: cliui "^5.0.0" + decamelize "^1.2.0" find-up "^3.0.0" get-caller-file "^2.0.1" require-directory "^2.1.1" @@ -4054,24 +4051,24 @@ yargs@^13.2.2, yargs@^13.3.0: string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^13.1.2" + yargs-parser "^15.0.0" -yargs@^14.0.0: - version "14.2.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" - integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA== +yargs@^15.0.2: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: - cliui "^5.0.0" + cliui "^6.0.0" decamelize "^1.2.0" - find-up "^3.0.0" + find-up "^4.1.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^3.0.0" + string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^15.0.0" + yargs-parser "^18.1.2" yn@3.1.1: version "3.1.1" From 1f733d182933f6d18aa43f54006a92d2cf883ae2 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 18:33:32 +0200 Subject: [PATCH 3/8] add prettier --- .eslintrc.js | 267 +++++++++++++++++++++-------------------------- .prettierignore | 8 ++ .prettierrc.json | 5 + package.json | 6 +- yarn.lock | 19 ++++ 5 files changed, 157 insertions(+), 148 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.json diff --git a/.eslintrc.js b/.eslintrc.js index 3b4ab767..ad620f63 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,149 +1,124 @@ module.exports = { - "env": { - "browser": true, - "node": true - }, - "extends": [ - "prettier" + env: { + browser: true, + node: true, + }, + extends: ["prettier"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: "tsconfig.json", + sourceType: "module", + }, + plugins: [ + "eslint-plugin-import", + "eslint-plugin-jsdoc", + "@typescript-eslint", + ], + root: true, + rules: { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/member-delimiter-style": [ + "error", + { + multiline: { + delimiter: "none", + requireLast: true, + }, + singleline: { + delimiter: "semi", + requireLast: false, + }, + }, ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "tsconfig.json", - "sourceType": "module" - }, - "plugins": [ - "eslint-plugin-import", - "eslint-plugin-jsdoc", - "@typescript-eslint" + "@typescript-eslint/naming-convention": "error", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-unnecessary-qualifier": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unused-expressions": [ + "error", + { + allowTaggedTemplates: true, + allowShortCircuit: true, + }, ], - "root": true, - "rules": { - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/member-delimiter-style": [ - "error", - { - "multiline": { - "delimiter": "none", - "requireLast": true - }, - "singleline": { - "delimiter": "semi", - "requireLast": false - } - } - ], - "@typescript-eslint/naming-convention": "error", - "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unused-expressions": [ - "error", - { - "allowTaggedTemplates": true, - "allowShortCircuit": true - } - ], - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/quotes": [ - "error", - "single", - { - "avoidEscape": true - } - ], - "@typescript-eslint/semi": [ - "error", - "never" - ], - "@typescript-eslint/triple-slash-reference": [ - "error", - { - "path": "always", - "types": "prefer-import", - "lib": "always" - } - ], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unified-signatures": "error", - "brace-style": [ - "error", - "1tbs" - ], - "comma-dangle": "error", - "curly": [ - "error", - "multi-line" - ], - "eol-last": "error", - "eqeqeq": [ - "error", - "smart" - ], - "id-denylist": [ - "error", - "any", - "Number", - "number", - "String", - "string", - "Boolean", - "boolean", - "Undefined", - "undefined" - ], - "id-match": "error", - "import/no-deprecated": "error", - "jsdoc/check-alignment": "error", - "jsdoc/check-indentation": "error", - "jsdoc/newline-after-description": "error", - "new-parens": "error", - "no-caller": "error", - "no-cond-assign": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-duplicate-imports": "error", - "no-empty": "error", - "no-empty-function": "error", - "no-eval": "error", - "no-fallthrough": "error", - "no-invalid-regexp": "error", - "no-multiple-empty-lines": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-return-await": "error", - "no-throw-literal": "error", - "no-trailing-spaces": "error", - "no-underscore-dangle": "error", - "no-unused-expressions": "error", - "no-unused-labels": "error", - "no-var": "error", - "one-var": [ - "error", - "never" - ], - "quotes": "error", - "radix": "error", - "semi": "error", - "space-before-function-paren": [ - "error", - "always" - ], - "space-in-parens": [ - "error", - "never" - ], - "spaced-comment": [ - "error", - "always", - { - "markers": [ - "/" - ] - } - ], - "use-isnan": "error" - } -}; + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/quotes": [ + "error", + "single", + { + avoidEscape: true, + }, + ], + "@typescript-eslint/semi": ["error", "never"], + "@typescript-eslint/triple-slash-reference": [ + "error", + { + path: "always", + types: "prefer-import", + lib: "always", + }, + ], + "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/unified-signatures": "error", + "brace-style": ["error", "1tbs"], + "comma-dangle": "error", + curly: ["error", "multi-line"], + "eol-last": "error", + eqeqeq: ["error", "smart"], + "id-denylist": [ + "error", + "any", + "Number", + "number", + "String", + "string", + "Boolean", + "boolean", + "Undefined", + "undefined", + ], + "id-match": "error", + "import/no-deprecated": "error", + "jsdoc/check-alignment": "error", + "jsdoc/check-indentation": "error", + "jsdoc/newline-after-description": "error", + "new-parens": "error", + "no-caller": "error", + "no-cond-assign": "error", + "no-constant-condition": "error", + "no-control-regex": "error", + "no-duplicate-imports": "error", + "no-empty": "error", + "no-empty-function": "error", + "no-eval": "error", + "no-fallthrough": "error", + "no-invalid-regexp": "error", + "no-multiple-empty-lines": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-return-await": "error", + "no-throw-literal": "error", + "no-trailing-spaces": "error", + "no-underscore-dangle": "error", + "no-unused-expressions": "error", + "no-unused-labels": "error", + "no-var": "error", + "one-var": ["error", "never"], + quotes: "error", + radix: "error", + semi: "error", + "space-before-function-paren": ["error", "always"], + "space-in-parens": ["error", "never"], + "spaced-comment": [ + "error", + "always", + { + markers: ["/"], + }, + ], + "use-isnan": "error", + }, +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..0e9e8106 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +node_modules/ +bower_components/ +.idea +.vscode +*.log +coverage +.nyc_output +dist/ \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..f6db7ced --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,5 @@ +{ + "semi": false, + "tabWidth": 2, + "useTabs": false +} diff --git a/package.json b/package.json index 5410c9aa..a37fd8c0 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,9 @@ "url": "git://github.com/jakubroztocil/rrule.git" }, "scripts": { - "build": "yarn lint && tsc && webpack && tsc dist/esm/**/*.d.ts", - "lint": "yarn eslint --fix --config .eslintrc.js", + "build": "yarn lint && yarn format && tsc && webpack && tsc dist/esm/**/*.d.ts", + "lint": "yarn eslint --ext .ts,.js --fix --config .eslintrc.js", + "format": "yarn prettier --write .", "run-ts": "TS_NODE_PROJECT=tsconfig.test.json node --loader ts-node/esm", "test": "yarn run-ts ./node_modules/.bin/mocha **/*.test.ts", "test-ci": "yarn run-ts ./node_modules/.bin/nyc yarn run-ts ./node_modules/.bin/mocha **/*.test.ts" @@ -53,6 +54,7 @@ "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsdoc": "^39.3.2", + "eslint-plugin-prettier": "^4.0.0", "html-webpack-plugin": "^3.2.0", "husky": "^8.0.1", "mocha": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 397e7f07..0f75cc4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1503,6 +1503,13 @@ eslint-plugin-jsdoc@^39.3.2: semver "^7.3.7" spdx-expression-parse "^3.0.1" +eslint-plugin-prettier@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0" + integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ== + dependencies: + prettier-linter-helpers "^1.0.0" + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -1649,6 +1656,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" @@ -3068,6 +3080,13 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" From 95605824d5c3bd8a780d65c44e062b667ab9f3bd Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 19:46:09 +0200 Subject: [PATCH 4/8] format everything with prettier --- .eslintrc.js | 172 +-- .github/issue_template.md | 6 +- .prettierrc.json | 3 +- CHANGELOG.md | 7 +- README.md | 224 +-- bower.json | 29 +- codecov.yml | 10 +- src/cache.ts | 10 +- src/callbackiterresult.ts | 4 +- src/datetime.ts | 174 ++- src/dateutil.ts | 5 +- src/datewithzone.ts | 18 +- src/fake-luxon.ts | 4 +- src/helpers.ts | 26 +- src/iter/index.ts | 55 +- src/iter/poslist.ts | 9 +- src/iterinfo/easter.ts | 2 +- src/iterinfo/index.ts | 92 +- src/iterinfo/monthinfo.ts | 6 +- src/iterinfo/yearinfo.ts | 32 +- src/iterresult.ts | 14 +- src/iterset.ts | 4 +- src/masks.ts | 14 +- src/nlp/i18n.ts | 94 +- src/nlp/index.ts | 25 +- src/nlp/parsetext.ts | 74 +- src/nlp/totext.ts | 81 +- src/optionstostring.ts | 32 +- src/parseoptions.ts | 27 +- src/parsestring.ts | 33 +- src/rrule.ts | 68 +- src/rruleset.ts | 76 +- src/rrulestr.ts | 89 +- src/types.ts | 24 +- src/weekday.ts | 22 +- test/cache.test.ts | 126 +- test/dateutil.test.ts | 4 +- test/datewithzone.test.ts | 26 +- test/helpers.test.ts | 23 +- test/lib/utils.ts | 96 +- test/nlp.test.ts | 71 +- test/optionstostring.test.ts | 42 +- test/parsestring.test.ts | 60 +- test/rrule.test.ts | 2635 ++++++++++++++++++++-------------- test/rruleset.test.ts | 730 +++++----- test/rrulestr.test.ts | 329 +++-- tsconfig.test.json | 16 +- webpack.config.js | 27 +- 48 files changed, 3293 insertions(+), 2457 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ad620f63..a0b4f7e9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,122 +3,122 @@ module.exports = { browser: true, node: true, }, - extends: ["prettier"], - parser: "@typescript-eslint/parser", + extends: ['prettier'], + parser: '@typescript-eslint/parser', parserOptions: { - project: "tsconfig.json", - sourceType: "module", + project: 'tsconfig.json', + sourceType: 'module', }, plugins: [ - "eslint-plugin-import", - "eslint-plugin-jsdoc", - "@typescript-eslint", + 'eslint-plugin-import', + 'eslint-plugin-jsdoc', + '@typescript-eslint', ], root: true, rules: { - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/member-delimiter-style": [ - "error", + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/member-delimiter-style': [ + 'error', { multiline: { - delimiter: "none", + delimiter: 'none', requireLast: true, }, singleline: { - delimiter: "semi", + delimiter: 'semi', requireLast: false, }, }, ], - "@typescript-eslint/naming-convention": "error", - "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unused-expressions": [ - "error", + '@typescript-eslint/naming-convention': 'error', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-unnecessary-qualifier': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unused-expressions': [ + 'error', { allowTaggedTemplates: true, allowShortCircuit: true, }, ], - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/quotes": [ - "error", - "single", + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/quotes': [ + 'error', + 'single', { avoidEscape: true, }, ], - "@typescript-eslint/semi": ["error", "never"], - "@typescript-eslint/triple-slash-reference": [ - "error", + '@typescript-eslint/semi': ['error', 'never'], + '@typescript-eslint/triple-slash-reference': [ + 'error', { - path: "always", - types: "prefer-import", - lib: "always", + path: 'always', + types: 'prefer-import', + lib: 'always', }, ], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unified-signatures": "error", - "brace-style": ["error", "1tbs"], - "comma-dangle": "error", - curly: ["error", "multi-line"], - "eol-last": "error", - eqeqeq: ["error", "smart"], - "id-denylist": [ - "error", - "any", - "Number", - "number", - "String", - "string", - "Boolean", - "boolean", - "Undefined", - "undefined", + '@typescript-eslint/type-annotation-spacing': 'error', + '@typescript-eslint/unified-signatures': 'error', + 'brace-style': ['error', '1tbs'], + 'comma-dangle': 'error', + curly: ['error', 'multi-line'], + 'eol-last': 'error', + eqeqeq: ['error', 'smart'], + 'id-denylist': [ + 'error', + 'any', + 'Number', + 'number', + 'String', + 'string', + 'Boolean', + 'boolean', + 'Undefined', + 'undefined', ], - "id-match": "error", - "import/no-deprecated": "error", - "jsdoc/check-alignment": "error", - "jsdoc/check-indentation": "error", - "jsdoc/newline-after-description": "error", - "new-parens": "error", - "no-caller": "error", - "no-cond-assign": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-duplicate-imports": "error", - "no-empty": "error", - "no-empty-function": "error", - "no-eval": "error", - "no-fallthrough": "error", - "no-invalid-regexp": "error", - "no-multiple-empty-lines": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-return-await": "error", - "no-throw-literal": "error", - "no-trailing-spaces": "error", - "no-underscore-dangle": "error", - "no-unused-expressions": "error", - "no-unused-labels": "error", - "no-var": "error", - "one-var": ["error", "never"], - quotes: "error", - radix: "error", - semi: "error", - "space-before-function-paren": ["error", "always"], - "space-in-parens": ["error", "never"], - "spaced-comment": [ - "error", - "always", + 'id-match': 'error', + 'import/no-deprecated': 'error', + 'jsdoc/check-alignment': 'error', + 'jsdoc/check-indentation': 'error', + 'jsdoc/newline-after-description': 'error', + 'new-parens': 'error', + 'no-caller': 'error', + 'no-cond-assign': 'error', + 'no-constant-condition': 'error', + 'no-control-regex': 'error', + 'no-duplicate-imports': 'error', + 'no-empty': 'error', + 'no-empty-function': 'error', + 'no-eval': 'error', + 'no-fallthrough': 'error', + 'no-invalid-regexp': 'error', + 'no-multiple-empty-lines': 'error', + 'no-redeclare': 'error', + 'no-regex-spaces': 'error', + 'no-return-await': 'error', + 'no-throw-literal': 'error', + 'no-trailing-spaces': 'error', + 'no-underscore-dangle': 'error', + 'no-unused-expressions': 'error', + 'no-unused-labels': 'error', + 'no-var': 'error', + 'one-var': ['error', 'never'], + quotes: 'error', + radix: 'error', + semi: 'error', + 'space-before-function-paren': ['error', 'always'], + 'space-in-parens': ['error', 'never'], + 'spaced-comment': [ + 'error', + 'always', { - markers: ["/"], + markers: ['/'], }, ], - "use-isnan": "error", + 'use-isnan': 'error', }, } diff --git a/.github/issue_template.md b/.github/issue_template.md index 01d88ca4..cc75e8a7 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -4,12 +4,12 @@ Thank you for taking an interest in `rrule`! Please include the following in your report: - [ ] Verify that you've looked through existing issues for duplicates before - creating a new one + creating a new one - [ ] Code sample reproducing the issue. Be sure to include all input values you - are using such as the exact RRule string and dates. + are using such as the exact RRule string and dates. - [ ] Expected output - [ ] Actual output - [ ] The version of `rrule` you are using - [ ] Your operating system - [ ] Your local timezone (run `$ date` from the command line - of the machine showing the bug) + of the machine showing the bug) diff --git a/.prettierrc.json b/.prettierrc.json index f6db7ced..f3c020ec 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,6 @@ { "semi": false, "tabWidth": 2, - "useTabs": false + "useTabs": false, + "singleQuote": true } diff --git a/CHANGELOG.md b/CHANGELOG.md index 739dc137..d7ff5e95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,25 @@ ### Changelog - 2.7.0 (2022-06-05) + - Features: - **BREAKING CHANGE** Removes default export in favor of named exports - Removes Luxon dependency - 2.6.8 (2021-02-04) + - Bugfixes: - Solve circular imports (#444) - 2.6.6 (2020-08-23) + - Bugfixes: - Fixed broken npm package (#417) - 2.6.5 (2020-08-23) - Bugfixes: - - `luxon`-less binary should not contain any `luxon` imports (#410) - - Fixed `toText` pluralization of “minutes“ (#415) + - `luxon`-less binary should not contain any `luxon` imports (#410) + - Fixed `toText` pluralization of “minutes“ (#415) - 2.6.4 (2019-12-18) - Bugfixes: - Calculating series with unknown timezones will produce infinite loop (#320) diff --git a/README.md b/README.md index 7d8760f6..6fa622c4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -rrule.js -======== +# rrule.js **Library for working with recurrence rules for calendar dates.** @@ -18,13 +17,12 @@ RFC](https://tools.ietf.org/html/rfc5545), with a few important that, it supports parsing and serialization of recurrence rules from and to natural language. -* * * * * - +--- ### Quick Start -- [Demo app](http://jakubroztocil.github.io/rrule/) -- For contributors and maintainers: the code for the demo app is only on `gh-pages` branch +- [Demo app](http://jakubroztocil.github.io/rrule/) +- # For contributors and maintainers: the code for the demo app is only on `gh-pages` branch #### Client Side @@ -34,8 +32,8 @@ $ yarn add rrule Alternatively, download manually: - * [rrule.min.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.min.js) (bundled, minified) - * [rrule.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.js) (bundled, not minified) +- [rrule.min.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.min.js) (bundled, minified) +- [rrule.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.js) (bundled, not minified) ```html @@ -54,6 +52,7 @@ $ npm install rrule #### Usage **RRule:** + ```es6 import { RRule, RRuleSet, rrulestr } from 'rrule' @@ -95,15 +94,18 @@ rule.toText() ``` **RRuleSet:** + ```js const rruleSet = new RRuleSet() // Add a rrule to rruleSet -rruleSet.rrule(new RRule({ - freq: RRule.MONTHLY, - count: 5, - dtstart: new Date(Date.UTC(2012, 1, 1, 10, 30)) -})) +rruleSet.rrule( + new RRule({ + freq: RRule.MONTHLY, + count: 5, + dtstart: new Date(Date.UTC(2012, 1, 1, 10, 30)), + }) +) // Add a date to rruleSet rruleSet.rdate(new Date(Date.UTC(2012, 6, 1, 10, 30))) @@ -112,51 +114,60 @@ rruleSet.rdate(new Date(Date.UTC(2012, 6, 1, 10, 30))) rruleSet.rdate(new Date(Date.UTC(2012, 6, 2, 10, 30))) // Add a exclusion rrule to rruleSet -rruleSet.exrule(new RRule({ - freq: RRule.MONTHLY, - count: 2, - dtstart: new Date(Date.UTC(2012, 2, 1, 10, 30)) -})) +rruleSet.exrule( + new RRule({ + freq: RRule.MONTHLY, + count: 2, + dtstart: new Date(Date.UTC(2012, 2, 1, 10, 30)), + }) +) // Add a exclusion date to rruleSet rruleSet.exdate(new Date(Date.UTC(2012, 5, 1, 10, 30))) // Get all occurrence dates (Date instances): -rruleSet.all() -[ '2012-02-01T10:30:00.000Z', +rruleSet.all()[ + ('2012-02-01T10:30:00.000Z', '2012-05-01T10:30:00.000Z', '2012-07-01T10:30:00.000Z', - '2012-07-02T10:30:00.000Z' ] + '2012-07-02T10:30:00.000Z') +] // Get a slice: -rruleSet.between(new Date(Date.UTC(2012, 2, 1)), new Date(Date.UTC(2012, 6, 2))) -[ '2012-05-01T10:30:00.000Z', '2012-07-01T10:30:00.000Z' ] - +rruleSet.between( + new Date(Date.UTC(2012, 2, 1)), + new Date(Date.UTC(2012, 6, 2)) +)[('2012-05-01T10:30:00.000Z', '2012-07-01T10:30:00.000Z')] - // To string -rruleSet.valueOf() -['DTSTART:20120201T023000Z', - 'RRULE:FREQ=MONTHLY;COUNT=5', - 'RDATE:20120701T023000Z,20120702T023000Z', - 'EXRULE:FREQ=MONTHLY;COUNT=2', - 'EXDATE:20120601T023000Z'] +// To string +rruleSet.valueOf()[ + ('DTSTART:20120201T023000Z', + 'RRULE:FREQ=MONTHLY;COUNT=5', + 'RDATE:20120701T023000Z,20120702T023000Z', + 'EXRULE:FREQ=MONTHLY;COUNT=2', + 'EXDATE:20120601T023000Z') +] // To string rruleSet.toString() -'["DTSTART:20120201T023000Z","RRULE:FREQ=MONTHLY;COUNT=5","RDATE:20120701T023000Z,20120702T023000Z","EXRULE:FREQ=MONTHLY;COUNT=2","EXDATE:20120601T023000Z"]' +;('["DTSTART:20120201T023000Z","RRULE:FREQ=MONTHLY;COUNT=5","RDATE:20120701T023000Z,20120702T023000Z","EXRULE:FREQ=MONTHLY;COUNT=2","EXDATE:20120601T023000Z"]') ``` **rrulestr:** + ```js // Parse a RRule string, return a RRule object rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5') // Parse a RRule string, return a RRuleSet object -rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5', {forceset: true}) +rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5', { + forceset: true, +}) // Parse a RRuleSet string, return a RRuleSet object -rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z') - +rrulestr( + 'DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z' +) ``` ### Important: Use UTC dates @@ -210,7 +221,7 @@ DateTime.fromJSDate(date) For more examples see [python-dateutil](http://labix.org/python-dateutil/) documentation. -* * * * * +--- ### Timezone Support @@ -226,11 +237,11 @@ Example with `TZID`: new RRule({ dtstart: new Date(Date.UTC(2018, 1, 1, 10, 30)), count: 1, - tzid: 'Asia/Tokyo' -}).all() - -// assuming the system timezone is set to America/Los_Angeles, you get: -[ '2018-01-31T17:30:00.000Z' ] + tzid: 'Asia/Tokyo', +}).all()[ + // assuming the system timezone is set to America/Los_Angeles, you get: + '2018-01-31T17:30:00.000Z' +] // which is the time in Los Angeles when it's 2018-02-01T10:30:00 in Tokyo. ``` @@ -242,19 +253,15 @@ represented in UTC to avoid unexpected timezone offsets being applied, for examp new RRule({ freq: RRule.MONTHLY, dtstart: new Date(2018, 1, 1, 10, 30), - until: new Date(2018, 2, 31) -}).all() - -[ '2018-02-01T18:30:00.000Z', '2018-03-01T18:30:00.000Z' ] + until: new Date(2018, 2, 31), +}).all()[('2018-02-01T18:30:00.000Z', '2018-03-01T18:30:00.000Z')] // RIGHT: Will produce dates with recurrences at the correct time new RRule({ freq: RRule.MONTHLY, dtstart: new Date(Date.UTC(2018, 1, 1, 10, 30)), - until: new Date(Date.UTC(2018, 2, 31)) -}).all() - -[ '2018-02-01T10:30:00.000Z', '2018-03-01T10:30:00.000Z' ] + until: new Date(Date.UTC(2018, 2, 31)), +}).all()[('2018-02-01T10:30:00.000Z', '2018-03-01T10:30:00.000Z')] ``` ### API @@ -428,7 +435,6 @@ iCalendar RFC. Only `freq` is required. - `noCache`: Set to `true` to disable caching of results. If you will use the same rrule instance multiple times, enabling caching will improve the performance considerably. Enabled by default. @@ -436,9 +442,7 @@ performance considerably. Enabled by default. See also [python-dateutil](http://labix.org/python-dateutil/) documentation. - -* * * * * - +--- #### Instance properties @@ -454,9 +458,7 @@ documentation. the constructor. - -* * * * * - +--- #### Occurrence Retrieval Methods @@ -474,15 +476,16 @@ returns `true`. If a `false`-y value is returned, `date` isn't added to the result and the iteration is interrupted (possibly prematurely). ```javascript -rule.all() -[ '2012-02-01T10:30:00.000Z', +rule.all()[ + ('2012-02-01T10:30:00.000Z', '2012-05-01T10:30:00.000Z', '2012-07-01T10:30:00.000Z', - '2012-07-02T10:30:00.000Z' ] + '2012-07-02T10:30:00.000Z') +] -rule.all(function (date, i){return i < 2}) -[ '2012-02-01T10:30:00.000Z', - '2012-05-01T10:30:00.000Z' ] +rule.all(function (date, i) { + return i < 2 +})[('2012-02-01T10:30:00.000Z', '2012-05-01T10:30:00.000Z')] ``` ##### `RRule.prototype.between(after, before, inc=false [, iterator])` @@ -496,9 +499,9 @@ Optional `iterator` has the same function as it has with `RRule.prototype.all()`. ```javascript -rule.between(new Date(Date.UTC(2012, 7, 1)), new Date(Date.UTC(2012, 8, 1))) -['2012-08-27T10:30:00.000Z', - '2012-08-31T10:30:00.000Z'] +rule.between(new Date(Date.UTC(2012, 7, 1)), new Date(Date.UTC(2012, 8, 1)))[ + ('2012-08-27T10:30:00.000Z', '2012-08-31T10:30:00.000Z') +] ``` ##### `RRule.prototype.before(dt, inc=false)` @@ -507,7 +510,6 @@ Returns the last recurrence before the given `Date` instance. The `inc` argument defines what happens if `dt` is an occurrence. With `inc == true`, if `dt` itself is an occurrence, it will be returned. - ##### `RRule.prototype.after(dt, inc=false)` Returns the first recurrence @@ -518,9 +520,7 @@ occurrence, it will be returned. See also [python-dateutil](http://labix.org/python-dateutil/) documentation. - -* * * * * - +--- #### iCalendar RFC String Methods @@ -531,7 +531,7 @@ Only properties explicitly specified in `options` are included: ```javascript rule.toString() -"DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR" +;('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR') rule.toString() == RRule.optionsToString(rule.origOptions) true @@ -545,14 +545,14 @@ Converts `options` to iCalendar RFC `RRULE` string: // Get full a string representation of all options, // including the default and inferred ones. RRule.optionsToString(rule.options) -"DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;WKST=0;UNTIL=20130130T230000Z;BYDAY=MO,FR;BYHOUR=10;BYMINUTE=30;BYSECOND=0" +;('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;WKST=0;UNTIL=20130130T230000Z;BYDAY=MO,FR;BYHOUR=10;BYMINUTE=30;BYSECOND=0') // Cherry-pick only some options from an rrule: RRule.optionsToString({ freq: rule.options.freq, - dtstart: rule.options.dtstart + dtstart: rule.options.dtstart, }) -"DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;" +;('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;') ``` ##### `RRule.fromString(rfcString)` @@ -560,10 +560,12 @@ RRule.optionsToString({ Constructs an `RRule` instance from a complete `rfcString`: ```javascript -var rule = RRule.fromString("DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;") +var rule = RRule.fromString('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;') // This is equivalent -var rule = new RRule(RRule.parseString("DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY")) +var rule = new RRule( + RRule.parseString('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY') +) ``` ##### `RRule.parseString(rfcString)` @@ -576,7 +578,7 @@ options.dtstart = new Date(Date.UTC(2000, 1, 1)) var rule = new RRule(options) ``` -* * * * * +--- #### Natural Language Text Methods @@ -594,10 +596,10 @@ used (defaults to `rrule/nlp.js:ENGLISH`). ```javascript var rule = new RRule({ freq: RRule.WEEKLY, - count: 23 + count: 23, }) rule.toText() -"every week for 23 times" +;('every week for 23 times') ``` ##### `RRule.prototype.isFullyConvertibleToText()` @@ -624,17 +626,16 @@ options.dtstart = new Date(Date.UTC(2000, 1, 1)) var rule = new RRule(options) ``` - -* * * * * +--- #### `RRuleSet` Constructor ```javascript -new RRuleSet([noCache=false]) +new RRuleSet([(noCache = false)]) ``` The RRuleSet instance allows more complex recurrence setups, mixing multiple - rules, dates, exclusion rules, and exclusion dates. +rules, dates, exclusion rules, and exclusion dates. Default `noCache` argument is `false`, caching of results will be enabled, improving performance of multiple queries considerably. @@ -644,9 +645,11 @@ improving performance of multiple queries considerably. Include the given rrule instance in the recurrence set generation. ##### `RRuleSet.prototype.rdate(dt)` + Include the given datetime instance in the recurrence set generation. ##### `RRuleSet.prototype.exrule(rrule)` + Include the given rrule instance in the recurrence set exclusion list. Dates which are part of the given recurrence rules will not be generated, even if some inclusive rrule or rdate matches them. NOTE: EXRULE has been (deprecated @@ -654,11 +657,13 @@ in RFC 5545)[https://icalendar.org/iCalendar-RFC-5545/a-3-deprecated-features.ht and does not support a DTSTART property. ##### `RRuleSet.prototype.exdate(dt)` + Include the given datetime instance in the recurrence set exclusion list. Dates included that way will not be generated, even if some inclusive rrule or rdate matches them. ##### `RRuleSet.prototype.tzid(tz?)` + Sets or overrides the timezone identifier. Useful if there are no rrules in this RRuleSet and thus no DTSTART. @@ -694,7 +699,7 @@ Get list of included datetimes in this recurrence set. Get list of excluded datetimes in this recurrence set. -* * * * * +--- #### `rrulestr` Function @@ -735,38 +740,39 @@ If given, it must be a string that will be used when no `TZID` property is found in the parsed string. If it is not given, and the property is not found, `'UTC'` will be used by default. - -* * * * * +--- ### Differences From iCalendar RFC -* `RRule` has no `byday` keyword. The equivalent keyword has been replaced by -the `byweekday` keyword, to remove the ambiguity present in the original -keyword. -* Unlike documented in the RFC, the starting datetime, `dtstart`, is -not the first recurrence instance, unless it does fit in the specified rules. -This is in part due to this project being a port of -[python-dateutil](https://labix.org/python-dateutil#head-a65103993a21b717f6702063f3717e6e75b4ba66), -which has the same non-compliant functionality. Note that you can get the -original behavior by using a `RRuleSet` and adding the `dtstart` as an `rdate`. +- `RRule` has no `byday` keyword. The equivalent keyword has been replaced by + the `byweekday` keyword, to remove the ambiguity present in the original + keyword. +- Unlike documented in the RFC, the starting datetime, `dtstart`, is + not the first recurrence instance, unless it does fit in the specified rules. + This is in part due to this project being a port of + [python-dateutil](https://labix.org/python-dateutil#head-a65103993a21b717f6702063f3717e6e75b4ba66), + which has the same non-compliant functionality. Note that you can get the + original behavior by using a `RRuleSet` and adding the `dtstart` as an `rdate`. ```javascript var rruleSet = new RRuleSet() var start = new Date(Date.UTC(2012, 1, 1, 10, 30)) // Add a rrule to rruleSet -rruleSet.rrule(new RRule({ - freq: RRule.MONTHLY, - count: 5, - dtstart: start -})) +rruleSet.rrule( + new RRule({ + freq: RRule.MONTHLY, + count: 5, + dtstart: start, + }) +) // Add a date to rruleSet rruleSet.rdate(start) ``` -* Unlike documented in the RFC, every keyword is valid on every frequency (the -RFC documents that `byweekno` is only valid on yearly frequencies, for example). +- Unlike documented in the RFC, every keyword is valid on every frequency (the + RFC documents that `byweekno` is only valid on yearly frequencies, for example). ### Development @@ -792,10 +798,10 @@ $ yarn build #### Authors -* [Jakub Roztocil](http://roztocil.co/) - ([@jakubroztocil](http://twitter.com/jakubroztocil)) -* Lars Schöning ([@lyschoening](http://twitter.com/lyschoening)) -* David Golightly ([@davigoli](http://twitter.com/davigoli)) +- [Jakub Roztocil](http://roztocil.co/) + ([@jakubroztocil](http://twitter.com/jakubroztocil)) +- Lars Schöning ([@lyschoening](http://twitter.com/lyschoening)) +- David Golightly ([@davigoli](http://twitter.com/davigoli)) Python `dateutil` is written by [Gustavo Niemeyer](http://niemeyer.net/). @@ -805,21 +811,15 @@ more details. [npm-url]: https://npmjs.org/package/rrule [npm-image]: http://img.shields.io/npm/v/rrule.svg - [ci-url]: https://github.com/jakubroztocil/rrule/actions [ci-image]: https://github.com/jakubroztocil/rrule/workflows/Node%20CI/badge.svg - [downloads-url]: https://npmjs.org/package/rrule [downloads-image]: http://img.shields.io/npm/dm/rrule.svg?style=flat-square - [js-standard-url]: https://github.com/feross/standard [js-standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat - [gitter-url]: https://gitter.im/rrule-js/Lobby [gitter-image]: https://img.shields.io/gitter/room/nwjs/nw.js.svg - #### Related projects -* https://rrules.com/ — RESTful API to get back occurrences of RRULEs that conform to RFC 5545. - +- https://rrules.com/ — RESTful API to get back occurrences of RRULEs that conform to RFC 5545. diff --git a/bower.json b/bower.json index 01698de1..c2b8a50e 100644 --- a/bower.json +++ b/bower.json @@ -3,27 +3,20 @@ "version": "2.3.0", "description": "JavaScript library for working with recurrence rules for calendar dates.", "homepage": "http://jakubroztocil.github.io/rrule/", - "keywords": [ - "dates", - "recurrences", - "calendar", - "icalendar", - "rfc" - ], + "keywords": ["dates", "recurrences", "calendar", "icalendar", "rfc"], "repository": { "type": "git", "url": "git://github.com/jakubroztocil/rrule.git" }, - "authors": [{ - "name": "Jakub Roztočil", - "homepage": "http://subtleapps.com/" - }, { - "name": "Lars Schöning" - }], + "authors": [ + { + "name": "Jakub Roztočil", + "homepage": "http://subtleapps.com/" + }, + { + "name": "Lars Schöning" + } + ], "main": "dist/es5/rrule.js", - "ignore": [ - "**/.*", - "node_modules", - "components" - ] + "ignore": ["**/.*", "node_modules", "components"] } diff --git a/codecov.yml b/codecov.yml index 60f82f9a..9c01dea2 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,6 @@ ignore: - - "dist/" - - "test/" - - "node_modules/" - - ".github/" - - "webpack.config.js" \ No newline at end of file + - 'dist/' + - 'test/' + - 'node_modules/' + - '.github/' + - 'webpack.config.js' diff --git a/src/cache.ts b/src/cache.ts index 6108212c..6c71b7cb 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -4,7 +4,7 @@ import { isArray } from './helpers' export type CacheKeys = 'before' | 'after' | 'between' -function argsMatch ( +function argsMatch( left: IterArgs[keyof IterArgs] | undefined, right: IterArgs[keyof IterArgs] | undefined ) { @@ -32,7 +32,7 @@ export class Cache { * @param {Array,Date} value - an array of dates, one date, or null * @param {Object?} args - _iter arguments */ - public _cacheAdd ( + public _cacheAdd( what: CacheKeys | 'all', value: Date[] | Date | null, args?: Partial @@ -59,7 +59,7 @@ export class Cache { * [] - cached, but zero occurrences (all/between) * [Date1, DateN] - cached (all/between) */ - public _cacheGet ( + public _cacheGet( what: CacheKeys | 'all', args?: Partial ): Date | Date[] | false | null { @@ -103,7 +103,7 @@ export class Cache { return isArray(cached) ? dateutil.cloneDates(cached) : cached instanceof Date - ? dateutil.clone(cached) - : cached + ? dateutil.clone(cached) + : cached } } diff --git a/src/callbackiterresult.ts b/src/callbackiterresult.ts index 8dfa1b68..67c57d71 100644 --- a/src/callbackiterresult.ts +++ b/src/callbackiterresult.ts @@ -9,7 +9,7 @@ type Iterator = (d: Date, len: number) => boolean export default class CallbackIterResult extends IterResult<'all' | 'between'> { private iterator: Iterator - constructor ( + constructor( method: 'all' | 'between', args: Partial, iterator: Iterator @@ -19,7 +19,7 @@ export default class CallbackIterResult extends IterResult<'all' | 'between'> { this.iterator = iterator } - add (date: Date) { + add(date: Date) { if (this.iterator(date, this._result.length)) { this._result.push(date) return true diff --git a/src/datetime.ts b/src/datetime.ts index 09422f66..0f646119 100644 --- a/src/datetime.ts +++ b/src/datetime.ts @@ -8,38 +8,38 @@ export class Time { public second: number public millisecond: number - constructor ( - hour: number, - minute: number, - second: number, - millisecond: number - ) { + constructor( + hour: number, + minute: number, + second: number, + millisecond: number + ) { this.hour = hour this.minute = minute this.second = second this.millisecond = millisecond || 0 } - getHours () { + getHours() { return this.hour } - getMinutes () { + getMinutes() { return this.minute } - getSeconds () { + getSeconds() { return this.second } - getMilliseconds () { + getMilliseconds() { return this.millisecond } - getTime () { + getTime() { return ( - (this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 + - this.millisecond + (this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 + + this.millisecond ) } } @@ -49,62 +49,68 @@ export class DateTime extends Time { public month: number public year: number - static fromDate (date: Date) { + static fromDate(date: Date) { return new this( - date.getUTCFullYear(), - date.getUTCMonth() + 1, - date.getUTCDate(), - date.getUTCHours(), - date.getUTCMinutes(), - date.getUTCSeconds(), - date.valueOf() % 1000 - ) + date.getUTCFullYear(), + date.getUTCMonth() + 1, + date.getUTCDate(), + date.getUTCHours(), + date.getUTCMinutes(), + date.getUTCSeconds(), + date.valueOf() % 1000 + ) } - constructor ( - year: number, - month: number, - day: number, - hour: number, - minute: number, - second: number, - millisecond: number - ) { + constructor( + year: number, + month: number, + day: number, + hour: number, + minute: number, + second: number, + millisecond: number + ) { super(hour, minute, second, millisecond) this.year = year this.month = month this.day = day } - getWeekday () { + getWeekday() { return dateutil.getWeekday(new Date(this.getTime())) } - getTime () { + getTime() { return new Date( - Date.UTC( - this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond - ) - ).getTime() + Date.UTC( + this.year, + this.month - 1, + this.day, + this.hour, + this.minute, + this.second, + this.millisecond + ) + ).getTime() } - getDay () { + getDay() { return this.day } - getMonth () { + getMonth() { return this.month } - getYear () { + getYear() { return this.year } - public addYears (years: number) { + public addYears(years: number) { this.year += years } - public addMonths (months: number) { + public addMonths(months: number) { this.month += months if (this.month > 12) { const yearDiv = Math.floor(this.month / 12) @@ -118,7 +124,7 @@ export class DateTime extends Time { } } - public addWeekly (days: number, wkst: number) { + public addWeekly(days: number, wkst: number) { if (wkst > this.getWeekday()) { this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7 } else { @@ -128,14 +134,14 @@ export class DateTime extends Time { this.fixDay() } - public addDaily (days: number) { + public addDaily(days: number) { this.day += days this.fixDay() } - public addHours (hours: number, filtered: boolean, byhour: number[]) { + public addHours(hours: number, filtered: boolean, byhour: number[]) { if (filtered) { - // Jump to one iteration before next day + // Jump to one iteration before next day this.hour += Math.floor((23 - this.hour) / hours) * hours } @@ -151,11 +157,16 @@ export class DateTime extends Time { } } - public addMinutes (minutes: number, filtered: boolean, byhour: number[], byminute: number[]) { + public addMinutes( + minutes: number, + filtered: boolean, + byhour: number[], + byminute: number[] + ) { if (filtered) { - // Jump to one iteration before next day + // Jump to one iteration before next day this.minute += - Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes + Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes } while (true) { @@ -167,21 +178,28 @@ export class DateTime extends Time { } if ( - (empty(byhour) || includes(byhour, this.hour)) && - (empty(byminute) || includes(byminute, this.minute)) - ) { + (empty(byhour) || includes(byhour, this.hour)) && + (empty(byminute) || includes(byminute, this.minute)) + ) { break } } } - public addSeconds (seconds: number, filtered: boolean, byhour: number[], byminute: number[], bysecond: number[]) { + public addSeconds( + seconds: number, + filtered: boolean, + byhour: number[], + byminute: number[], + bysecond: number[] + ) { if (filtered) { - // Jump to one iteration before next day + // Jump to one iteration before next day this.second += - Math.floor( - (86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / seconds - ) * seconds + Math.floor( + (86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / + seconds + ) * seconds } while (true) { @@ -193,16 +211,16 @@ export class DateTime extends Time { } if ( - (empty(byhour) || includes(byhour, this.hour)) && - (empty(byminute) || includes(byminute, this.minute)) && - (empty(bysecond) || includes(bysecond, this.second)) - ) { + (empty(byhour) || includes(byhour, this.hour)) && + (empty(byminute) || includes(byminute, this.minute)) && + (empty(bysecond) || includes(bysecond, this.second)) + ) { break } } } - public fixDay () { + public fixDay() { if (this.day <= 28) { return } @@ -227,24 +245,24 @@ export class DateTime extends Time { } } - public add (options: ParsedOptions, filtered: boolean) { - const { - freq, - interval, - wkst, - byhour, - byminute, - bysecond - } = options + public add(options: ParsedOptions, filtered: boolean) { + const { freq, interval, wkst, byhour, byminute, bysecond } = options switch (freq) { - case Frequency.YEARLY: return this.addYears(interval) - case Frequency.MONTHLY: return this.addMonths(interval) - case Frequency.WEEKLY: return this.addWeekly(interval, wkst) - case Frequency.DAILY: return this.addDaily(interval) - case Frequency.HOURLY: return this.addHours(interval, filtered, byhour) - case Frequency.MINUTELY: return this.addMinutes(interval, filtered, byhour, byminute) - case Frequency.SECONDLY: return this.addSeconds(interval, filtered, byhour, byminute, bysecond) + case Frequency.YEARLY: + return this.addYears(interval) + case Frequency.MONTHLY: + return this.addMonths(interval) + case Frequency.WEEKLY: + return this.addWeekly(interval, wkst) + case Frequency.DAILY: + return this.addDaily(interval) + case Frequency.HOURLY: + return this.addHours(interval, filtered, byhour) + case Frequency.MINUTELY: + return this.addMinutes(interval, filtered, byhour, byminute) + case Frequency.SECONDLY: + return this.addSeconds(interval, filtered, byhour, byminute, bysecond) } } } diff --git a/src/dateutil.ts b/src/dateutil.ts index 9ed09b18..ddb4da4f 100644 --- a/src/dateutil.ts +++ b/src/dateutil.ts @@ -155,7 +155,7 @@ export namespace dateutil { /** * Sorts an array of Date or dateutil.Time objects */ - export const sort = function(dates: T[]) { + export const sort = function (dates: T[]) { dates.sort(function (a, b) { return a.getTime() - b.getTime() }) @@ -171,7 +171,7 @@ export namespace dateutil { padStart(date.getUTCHours(), 2, '0'), padStart(date.getUTCMinutes(), 2, '0'), padStart(date.getUTCSeconds(), 2, '0'), - utc ? 'Z' : '' + utc ? 'Z' : '', ].join('') } @@ -192,7 +192,6 @@ export namespace dateutil { ) ) } - } export default dateutil diff --git a/src/datewithzone.ts b/src/datewithzone.ts index 74e65c57..cac4f393 100644 --- a/src/datewithzone.ts +++ b/src/datewithzone.ts @@ -4,16 +4,16 @@ export class DateWithZone { public date: Date public tzid?: string | null - constructor (date: Date, tzid?: string | null) { + constructor(date: Date, tzid?: string | null) { this.date = date this.tzid = tzid } - private get isUTC () { + private get isUTC() { return !this.tzid || this.tzid.toUpperCase() === 'UTC' } - public toString () { + public toString() { const datestr = dateutil.timeToUntilString(this.date.getTime(), this.isUTC) if (!this.isUTC) { return `;TZID=${this.tzid}:${datestr}` @@ -22,18 +22,22 @@ export class DateWithZone { return `:${datestr}` } - public getTime () { + public getTime() { return this.date.getTime() } - public rezonedDate () { + public rezonedDate() { if (this.isUTC) { return this.date } const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone - const dateInLocalTZ = new Date(this.date.toLocaleString(undefined, { timeZone: localTimeZone })) - const dateInTargetTZ = new Date(this.date.toLocaleString(undefined, { timeZone: this.tzid ?? 'UTC' })) + const dateInLocalTZ = new Date( + this.date.toLocaleString(undefined, { timeZone: localTimeZone }) + ) + const dateInTargetTZ = new Date( + this.date.toLocaleString(undefined, { timeZone: this.tzid ?? 'UTC' }) + ) const tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime() return new Date(this.date.getTime() - tzOffset) diff --git a/src/fake-luxon.ts b/src/fake-luxon.ts index 6bdc8dde..253fedd2 100644 --- a/src/fake-luxon.ts +++ b/src/fake-luxon.ts @@ -1,5 +1,5 @@ export const DateTime = { - fromJSDate () { + fromJSDate() { throw new TypeError() - } + }, } diff --git a/src/helpers.ts b/src/helpers.ts index 33cc9cfd..9df37513 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -4,7 +4,9 @@ import { ALL_WEEKDAYS, WeekdayStr } from './weekday' -export const isPresent = function(value?: T | null | undefined): value is T { +export const isPresent = function ( + value?: T | null | undefined +): value is T { return value !== null && value !== undefined } @@ -31,11 +33,11 @@ export const range = function (start: number, end: number = start): number[] { return rang } -export const clone = function(array: T[]): T[] { +export const clone = function (array: T[]): T[] { return ([] as T[]).concat(array) } -export const repeat = function(value: T | T[], times: number): (T | T[])[] { +export const repeat = function (value: T | T[], times: number): (T | T[])[] { let i = 0 const array: (T | T[])[] = [] @@ -47,15 +49,19 @@ export const repeat = function(value: T | T[], times: number): (T | T[])[] { return array } -export const toArray = function(item: T | T[]): T[] { +export const toArray = function (item: T | T[]): T[] { if (isArray(item)) { return item } - return [ item ] + return [item] } -export function padStart (item: string | number, targetLength: number, padString: string = ' ') { +export function padStart( + item: string | number, + targetLength: number, + padString: string = ' ' +) { const str = String(item) targetLength = targetLength >> 0 if (str.length > targetLength) { @@ -67,7 +73,7 @@ export function padStart (item: string | number, targetLength: number, padString padString += repeat(padString, targetLength / padString.length) } - return padString.slice(0,targetLength) + String(str) + return padString.slice(0, targetLength) + String(str) } /** @@ -108,7 +114,7 @@ export const divmod = function (a: number, b: number) { return { div: Math.floor(a / b), mod: pymod(a, b) } } -export const empty = function(obj: T[] | null | undefined) { +export const empty = function (obj: T[] | null | undefined) { return !isPresent(obj) || obj.length === 0 } @@ -118,13 +124,13 @@ export const empty = function(obj: T[] | null | undefined) { * the fact that in Python an empty list's/tuple's * boolean value is False, whereas in JS it's true */ -export const notEmpty = function(obj: T[] | null | undefined): obj is T[] { +export const notEmpty = function (obj: T[] | null | undefined): obj is T[] { return !empty(obj) } /** * Return true if a value is in an array */ -export const includes = function(arr: T[] | null | undefined, val: T) { +export const includes = function (arr: T[] | null | undefined, val: T) { return notEmpty(arr) && arr.indexOf(val) !== -1 } diff --git a/src/iter/index.ts b/src/iter/index.ts index 495b64e7..c283e814 100644 --- a/src/iter/index.ts +++ b/src/iter/index.ts @@ -9,14 +9,11 @@ import { DateWithZone } from '../datewithzone' import { buildPoslist } from './poslist' import { Time, DateTime } from '../datetime' -export function iter (iterResult: IterResult, options: ParsedOptions) { - const { - dtstart, - freq, - interval, - until, - bysetpos - } = options +export function iter( + iterResult: IterResult, + options: ParsedOptions +) { + const { dtstart, freq, interval, until, bysetpos } = options let count = options.count if (count === 0 || interval === 0) { @@ -105,14 +102,19 @@ export function iter (iterResult: IterResult, op } if (!freqIsDailyOrGreater(freq)) { - timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0) + timeset = ii.gettimeset(freq)( + counterDate.hour, + counterDate.minute, + counterDate.second, + 0 + ) } ii.rebuild(counterDate.year, counterDate.month) } } -function isFiltered ( +function isFiltered( ii: Iterinfo, currentDay: number, options: ParsedOptions @@ -124,7 +126,7 @@ function isFiltered ( byeaster, bymonthday, bynmonthday, - byyearday + byyearday, } = options return ( @@ -146,24 +148,26 @@ function isFiltered ( ) } -function rezoneIfNeeded (date: Date, options: ParsedOptions) { +function rezoneIfNeeded(date: Date, options: ParsedOptions) { return new DateWithZone(date, options.tzid).rezonedDate() } -function emitResult (iterResult: IterResult) { +function emitResult(iterResult: IterResult) { return iterResult.getValue() } -function removeFilteredDays (dayset: (number | null)[], start: number, end: number, ii: Iterinfo, options: ParsedOptions) { +function removeFilteredDays( + dayset: (number | null)[], + start: number, + end: number, + ii: Iterinfo, + options: ParsedOptions +) { let filtered = false for (let dayCounter = start; dayCounter < end; dayCounter++) { let currentDay = dayset[dayCounter] as number - filtered = isFiltered( - ii, - currentDay, - options - ) + filtered = isFiltered(ii, currentDay, options) if (filtered) dayset[currentDay] = null } @@ -171,13 +175,12 @@ function removeFilteredDays (dayset: (number | null)[], start: number, end: numb return filtered } -function makeTimeset (ii: Iterinfo, counterDate: DateTime, options: ParsedOptions): Time[] | null { - const { - freq, - byhour, - byminute, - bysecond - } = options +function makeTimeset( + ii: Iterinfo, + counterDate: DateTime, + options: ParsedOptions +): Time[] | null { + const { freq, byhour, byminute, bysecond } = options if (freqIsDailyOrGreater(freq)) { return buildTimeset(options) diff --git a/src/iter/poslist.ts b/src/iter/poslist.ts index 575a2b85..6c05723f 100644 --- a/src/iter/poslist.ts +++ b/src/iter/poslist.ts @@ -3,7 +3,14 @@ import Iterinfo from '../iterinfo/index' import { pymod, isPresent, includes } from '../helpers' import { Time } from '../datetime' -export function buildPoslist (bysetpos: number[], timeset: Time[], start: number, end: number, ii: Iterinfo, dayset: (number | null)[]) { +export function buildPoslist( + bysetpos: number[], + timeset: Time[], + start: number, + end: number, + ii: Iterinfo, + dayset: (number | null)[] +) { const poslist: Date[] = [] for (let j = 0; j < bysetpos.length; j++) { diff --git a/src/iterinfo/easter.ts b/src/iterinfo/easter.ts index e4ef7aa3..077b296a 100644 --- a/src/iterinfo/easter.ts +++ b/src/iterinfo/easter.ts @@ -1,4 +1,4 @@ -export function easter (y: number, offset: number = 0) { +export function easter(y: number, offset: number = 0) { const a = y % 19 const b = Math.floor(y / 100) const c = y % 100 diff --git a/src/iterinfo/index.ts b/src/iterinfo/index.ts index 896fed33..c8ecf42c 100644 --- a/src/iterinfo/index.ts +++ b/src/iterinfo/index.ts @@ -1,10 +1,5 @@ import dateutil from '../dateutil' -import { - notEmpty, - repeat, - range, - isPresent -} from '../helpers' +import { notEmpty, repeat, range, isPresent } from '../helpers' import { ParsedOptions, Frequency } from '../types' import { YearInfo, rebuildYear } from './yearinfo' import { rebuildMonth, MonthInfo } from './monthinfo' @@ -23,9 +18,9 @@ export default class Iterinfo { public monthinfo: MonthInfo public eastermask: number[] | null - constructor (private options: ParsedOptions) {} + constructor(private options: ParsedOptions) {} - rebuild (year: number, month: number) { + rebuild(year: number, month: number) { const options = this.options if (year !== this.lastyear) { @@ -38,7 +33,12 @@ export default class Iterinfo { ) { const { yearlen, mrange, wdaymask } = this.yearinfo this.monthinfo = rebuildMonth( - year, month, yearlen, mrange, wdaymask, options + year, + month, + yearlen, + mrange, + wdaymask, + options ) } @@ -47,59 +47,59 @@ export default class Iterinfo { } } - get lastyear () { + get lastyear() { return this.monthinfo ? this.monthinfo.lastyear : null } - get lastmonth () { + get lastmonth() { return this.monthinfo ? this.monthinfo.lastmonth : null } - get yearlen () { + get yearlen() { return this.yearinfo.yearlen } - get yearordinal () { + get yearordinal() { return this.yearinfo.yearordinal } - get mrange () { + get mrange() { return this.yearinfo.mrange } - get wdaymask () { + get wdaymask() { return this.yearinfo.wdaymask } - get mmask () { + get mmask() { return this.yearinfo.mmask } - get wnomask () { + get wnomask() { return this.yearinfo.wnomask } - get nwdaymask () { + get nwdaymask() { return this.monthinfo ? this.monthinfo.nwdaymask : [] } - get nextyearlen () { + get nextyearlen() { return this.yearinfo.nextyearlen } - get mdaymask () { + get mdaymask() { return this.yearinfo.mdaymask } - get nmdaymask () { + get nmdaymask() { return this.yearinfo.nmdaymask } - ydayset () { + ydayset() { return [range(this.yearlen), 0, this.yearlen] } - mdayset (_: any, month: number, __: any) { + mdayset(_: any, month: number, __: any) { const start = this.mrange[month - 1] const end = this.mrange[month] const set = repeat(null, this.yearlen) @@ -107,7 +107,7 @@ export default class Iterinfo { return [set, start, end] } - wdayset (year: number, month: number, day: number) { + wdayset(year: number, month: number, day: number) { // We need to handle cross-year weeks here. const set = repeat(null, this.yearlen + 7) let i = @@ -122,7 +122,7 @@ export default class Iterinfo { return [set, start, i] } - ddayset (year: number, month: number, day: number) { + ddayset(year: number, month: number, day: number) { const set = repeat(null, this.yearlen) as (number | null)[] const i = dateutil.toOrdinal(new Date(Date.UTC(year, month - 1, day))) - @@ -131,43 +131,53 @@ export default class Iterinfo { return [set, i, i + 1] } - htimeset (hour: number, _: number, second: number, millisecond: number) { + htimeset(hour: number, _: number, second: number, millisecond: number) { let set: Time[] = [] - this.options.byminute.forEach(minute => { + this.options.byminute.forEach((minute) => { set = set.concat(this.mtimeset(hour, minute, second, millisecond)) }) dateutil.sort(set) return set } - mtimeset (hour: number, minute: number, _: number, millisecond: number) { - const set = this.options.bysecond.map(second => - new Time(hour, minute, second, millisecond) + mtimeset(hour: number, minute: number, _: number, millisecond: number) { + const set = this.options.bysecond.map( + (second) => new Time(hour, minute, second, millisecond) ) dateutil.sort(set) return set } - stimeset (hour: number, minute: number, second: number, millisecond: number) { + stimeset(hour: number, minute: number, second: number, millisecond: number) { return [new Time(hour, minute, second, millisecond)] } - getdayset (freq: Frequency): (y: number, m: number, d: number) => DaySet { + getdayset(freq: Frequency): (y: number, m: number, d: number) => DaySet { switch (freq) { - case Frequency.YEARLY: return this.ydayset.bind(this) - case Frequency.MONTHLY: return this.mdayset.bind(this) - case Frequency.WEEKLY: return this.wdayset.bind(this) - case Frequency.DAILY: return this.ddayset.bind(this) - default: return this.ddayset.bind(this) + case Frequency.YEARLY: + return this.ydayset.bind(this) + case Frequency.MONTHLY: + return this.mdayset.bind(this) + case Frequency.WEEKLY: + return this.wdayset.bind(this) + case Frequency.DAILY: + return this.ddayset.bind(this) + default: + return this.ddayset.bind(this) } } - gettimeset (freq: Frequency.HOURLY | Frequency.MINUTELY | Frequency.SECONDLY): (h: number, m: number, s: number, ms: number) => Time[] { + gettimeset( + freq: Frequency.HOURLY | Frequency.MINUTELY | Frequency.SECONDLY + ): (h: number, m: number, s: number, ms: number) => Time[] { switch (freq) { - case Frequency.HOURLY: return this.htimeset.bind(this) - case Frequency.MINUTELY: return this.mtimeset.bind(this) - case Frequency.SECONDLY: return this.stimeset.bind(this) + case Frequency.HOURLY: + return this.htimeset.bind(this) + case Frequency.MINUTELY: + return this.mtimeset.bind(this) + case Frequency.SECONDLY: + return this.stimeset.bind(this) } } } diff --git a/src/iterinfo/monthinfo.ts b/src/iterinfo/monthinfo.ts index c96f9bb1..051a6927 100644 --- a/src/iterinfo/monthinfo.ts +++ b/src/iterinfo/monthinfo.ts @@ -8,7 +8,7 @@ export interface MonthInfo { nwdaymask: number[] } -export function rebuildMonth ( +export function rebuildMonth( year: number, month: number, yearlen: number, @@ -19,7 +19,7 @@ export function rebuildMonth ( const result: MonthInfo = { lastyear: year, lastmonth: month, - nwdaymask: [] + nwdaymask: [], } let ranges: number[][] = [] @@ -51,7 +51,7 @@ export function rebuildMonth ( for (let k = 0; k < options.bynweekday!.length; k++) { let i - const [ wday, n ] = options.bynweekday![k] + const [wday, n] = options.bynweekday![k] if (n < 0) { i = last + (n + 1) * 7 i -= pymod(wdaymask[i] - wday, 7) diff --git a/src/iterinfo/yearinfo.ts b/src/iterinfo/yearinfo.ts index 3ac5cc0b..0116d20e 100644 --- a/src/iterinfo/yearinfo.ts +++ b/src/iterinfo/yearinfo.ts @@ -1,7 +1,17 @@ import { ParsedOptions } from '../types' import dateutil from '../dateutil' import { empty, repeat, pymod, includes } from '../helpers' -import { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE } from '../masks' +import { + M365MASK, + MDAY365MASK, + NMDAY365MASK, + WDAYMASK, + M365RANGE, + M366MASK, + MDAY366MASK, + NMDAY366MASK, + M366RANGE, +} from '../masks' export interface YearInfo { yearlen: 365 | 366 @@ -16,7 +26,7 @@ export interface YearInfo { wnomask: number[] | null } -export function rebuildYear (year: number, options: ParsedOptions) { +export function rebuildYear(year: number, options: ParsedOptions) { const firstyday = new Date(Date.UTC(year, 0, 1)) const yearlen = dateutil.isLeapYear(year) ? 366 : 365 @@ -30,7 +40,7 @@ export function rebuildYear (year: number, options: ParsedOptions) { yearordinal, yearweekday, ...baseYearMasks(year), - wnomask: null + wnomask: null, } if (empty(options.byweekno)) { @@ -40,14 +50,13 @@ export function rebuildYear (year: number, options: ParsedOptions) { result.wnomask = repeat(0, yearlen + 7) as number[] let firstwkst: number let wyearlen: number - let no1wkst = firstwkst = pymod(7 - yearweekday + options.wkst, 7) + let no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7)) if (no1wkst >= 4) { no1wkst = 0 // Number of days in the year, plus the days we got // from last year. - wyearlen = - result.yearlen + pymod(yearweekday - options.wkst, 7) + wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7) } else { // Number of days in the year, minus the days we // left in last year. @@ -113,10 +122,7 @@ export function rebuildYear (year: number, options: ParsedOptions) { new Date(Date.UTC(year - 1, 0, 1)) ) - let lno1wkst = pymod( - 7 - lyearweekday.valueOf() + options.wkst, - 7 - ) + let lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7) const lyearlen = dateutil.isLeapYear(year - 1) ? 366 : 365 let weekst: number @@ -140,7 +146,7 @@ export function rebuildYear (year: number, options: ParsedOptions) { return result } -function baseYearMasks (year: number) { +function baseYearMasks(year: number) { const yearlen = dateutil.isLeapYear(year) ? 366 : 365 const firstyday = new Date(Date.UTC(year, 0, 1)) const wday = dateutil.getWeekday(firstyday) @@ -151,7 +157,7 @@ function baseYearMasks (year: number) { mdaymask: MDAY365MASK, nmdaymask: NMDAY365MASK, wdaymask: WDAYMASK.slice(wday), - mrange: M365RANGE + mrange: M365RANGE, } } @@ -160,6 +166,6 @@ function baseYearMasks (year: number) { mdaymask: MDAY366MASK, nmdaymask: NMDAY366MASK, wdaymask: WDAYMASK.slice(wday), - mrange: M366RANGE + mrange: M366RANGE, } } diff --git a/src/iterresult.ts b/src/iterresult.ts index d7111847..8bc669bb 100644 --- a/src/iterresult.ts +++ b/src/iterresult.ts @@ -23,7 +23,7 @@ export default class IterResult { public _result: Date[] = [] public total = 0 - constructor (method: M, args: Partial) { + constructor(method: M, args: Partial) { this.method = method this.args = args @@ -31,7 +31,9 @@ export default class IterResult { this.maxDate = args.inc ? args.before! : new Date(args.before!.getTime() - 1) - this.minDate = args.inc ? args.after! : new Date(args.after!.getTime() + 1) + this.minDate = args.inc + ? args.after! + : new Date(args.after!.getTime() + 1) } else if (method === 'before') { this.maxDate = args.inc ? args.dt! : new Date(args.dt!.getTime() - 1) } else if (method === 'after') { @@ -47,7 +49,7 @@ export default class IterResult { * @return {Boolean} true if it makes sense to continue the iteration * false if we're done. */ - accept (date: Date) { + accept(date: Date) { ++this.total const tooEarly = this.minDate && date < this.minDate const tooLate = this.maxDate && date > this.maxDate @@ -71,7 +73,7 @@ export default class IterResult { * @param {Date} date that is part of the result. * @return {Boolean} whether we are interested in more values. */ - add (date: Date) { + add(date: Date) { this._result.push(date) return true } @@ -81,7 +83,7 @@ export default class IterResult { * and 'between' an array. * @return {Date,Array?} */ - getValue (): IterResultType { + getValue(): IterResultType { const res = this._result switch (this.method) { case 'all': @@ -94,7 +96,7 @@ export default class IterResult { } } - clone () { + clone() { return new IterResult(this.method, this.args) } } diff --git a/src/iterset.ts b/src/iterset.ts index 9d90a0c0..df54483a 100644 --- a/src/iterset.ts +++ b/src/iterset.ts @@ -5,7 +5,7 @@ import { iter } from './iter' import dateutil from './dateutil' import { QueryMethodTypes, IterResultType } from './types' -export function iterSet ( +export function iterSet( iterResult: IterResult, _rrule: RRule[], _exrule: RRule[], @@ -16,7 +16,7 @@ export function iterSet ( const _exdateHash: { [k: number]: boolean } = {} const _accept = iterResult.accept - function evalExdate (after: Date, before: Date) { + function evalExdate(after: Date, before: Date) { _exrule.forEach(function (rrule) { rrule.between(after, before, true).forEach(function (date) { _exdateHash[Number(date)] = true diff --git a/src/masks.ts b/src/masks.ts index 42505b10..e06fa045 100644 --- a/src/masks.ts +++ b/src/masks.ts @@ -19,7 +19,7 @@ const M365MASK = [ ...repeat(10, 31), ...repeat(11, 30), ...repeat(12, 31), - ...repeat(1, 7) + ...repeat(1, 7), ] const M366MASK = [ @@ -35,7 +35,7 @@ const M366MASK = [ ...repeat(10, 31), ...repeat(11, 30), ...repeat(12, 31), - ...repeat(1, 7) + ...repeat(1, 7), ] const M28 = range(1, 29) @@ -56,7 +56,7 @@ const MDAY366MASK = [ ...M31, ...M30, ...M31, - ...M31.slice(0, 7) + ...M31.slice(0, 7), ] const MDAY365MASK = [ @@ -72,7 +72,7 @@ const MDAY365MASK = [ ...M31, ...M30, ...M31, - ...M31.slice(0, 7) + ...M31.slice(0, 7), ] const NM28 = range(-28, 0) @@ -93,7 +93,7 @@ const NMDAY366MASK = [ ...NM31, ...NM30, ...NM31, - ...NM31.slice(0, 7) + ...NM31.slice(0, 7), ] const NMDAY365MASK = [ @@ -109,7 +109,7 @@ const NMDAY365MASK = [ ...NM31, ...NM30, ...NM31, - ...NM31.slice(0, 7) + ...NM31.slice(0, 7), ] const M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366] @@ -130,5 +130,5 @@ export { MDAY365MASK, MDAY366MASK, NMDAY365MASK, - NMDAY366MASK + NMDAY366MASK, } diff --git a/src/nlp/i18n.ts b/src/nlp/i18n.ts index 63941b3b..1b2e3953 100644 --- a/src/nlp/i18n.ts +++ b/src/nlp/i18n.ts @@ -12,19 +12,33 @@ export interface Language { const ENGLISH: Language = { dayNames: [ - 'Sunday', 'Monday', 'Tuesday', 'Wednesday', - 'Thursday', 'Friday', 'Saturday' + 'Sunday', + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', ], monthNames: [ - 'January', 'February', 'March', 'April', 'May', - 'June', 'July', 'August', 'September', 'October', - 'November', 'December' + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', ], tokens: { - 'SKIP': /^[ \r\n\t]+|^\.$/, - 'number': /^[1-9][0-9]*/, - 'numberAsText': /^(one|two|three)/i, - 'every': /^every/i, + SKIP: /^[ \r\n\t]+|^\.$/, + number: /^[1-9][0-9]*/, + numberAsText: /^(one|two|three)/i, + every: /^every/i, 'day(s)': /^days?/i, 'weekday(s)': /^weekdays?/i, 'week(s)': /^weeks?/i, @@ -32,38 +46,38 @@ const ENGLISH: Language = { 'minute(s)': /^minutes?/i, 'month(s)': /^months?/i, 'year(s)': /^years?/i, - 'on': /^(on|in)/i, - 'at': /^(at)/i, - 'the': /^the/i, - 'first': /^first/i, - 'second': /^second/i, - 'third': /^third/i, - 'nth': /^([1-9][0-9]*)(\.|th|nd|rd|st)/i, - 'last': /^last/i, - 'for': /^for/i, + on: /^(on|in)/i, + at: /^(at)/i, + the: /^the/i, + first: /^first/i, + second: /^second/i, + third: /^third/i, + nth: /^([1-9][0-9]*)(\.|th|nd|rd|st)/i, + last: /^last/i, + for: /^for/i, 'time(s)': /^times?/i, - 'until': /^(un)?til/i, - 'monday': /^mo(n(day)?)?/i, - 'tuesday': /^tu(e(s(day)?)?)?/i, - 'wednesday': /^we(d(n(esday)?)?)?/i, - 'thursday': /^th(u(r(sday)?)?)?/i, - 'friday': /^fr(i(day)?)?/i, - 'saturday': /^sa(t(urday)?)?/i, - 'sunday': /^su(n(day)?)?/i, - 'january': /^jan(uary)?/i, - 'february': /^feb(ruary)?/i, - 'march': /^mar(ch)?/i, - 'april': /^apr(il)?/i, - 'may': /^may/i, - 'june': /^june?/i, - 'july': /^july?/i, - 'august': /^aug(ust)?/i, - 'september': /^sep(t(ember)?)?/i, - 'october': /^oct(ober)?/i, - 'november': /^nov(ember)?/i, - 'december': /^dec(ember)?/i, - 'comma': /^(,\s*|(and|or)\s*)+/i - } + until: /^(un)?til/i, + monday: /^mo(n(day)?)?/i, + tuesday: /^tu(e(s(day)?)?)?/i, + wednesday: /^we(d(n(esday)?)?)?/i, + thursday: /^th(u(r(sday)?)?)?/i, + friday: /^fr(i(day)?)?/i, + saturday: /^sa(t(urday)?)?/i, + sunday: /^su(n(day)?)?/i, + january: /^jan(uary)?/i, + february: /^feb(ruary)?/i, + march: /^mar(ch)?/i, + april: /^apr(il)?/i, + may: /^may/i, + june: /^june?/i, + july: /^july?/i, + august: /^aug(ust)?/i, + september: /^sep(t(ember)?)?/i, + october: /^oct(ober)?/i, + november: /^nov(ember)?/i, + december: /^dec(ember)?/i, + comma: /^(,\s*|(and|or)\s*)+/i, + }, } export default ENGLISH diff --git a/src/nlp/index.ts b/src/nlp/index.ts index bfaed219..a3da90b2 100644 --- a/src/nlp/index.ts +++ b/src/nlp/index.ts @@ -5,14 +5,14 @@ import { Frequency } from '../types' import ENGLISH, { Language } from './i18n' /*! -* rrule.js - Library for working with recurrence rules for calendar dates. -* https://github.com/jakubroztocil/rrule -* -* Copyright 2010, Jakub Roztocil and Lars Schoning -* Licenced under the BSD licence. -* https://github.com/jakubroztocil/rrule/blob/master/LICENCE -* -*/ + * rrule.js - Library for working with recurrence rules for calendar dates. + * https://github.com/jakubroztocil/rrule + * + * Copyright 2010, Jakub Roztocil and Lars Schoning + * Licenced under the BSD licence. + * https://github.com/jakubroztocil/rrule/blob/master/LICENCE + * + */ /** * @@ -105,7 +105,7 @@ const common = [ 'interval', 'byweekday', 'bymonthday', - 'bymonth' + 'bymonth', ] ToText.IMPLEMENTED = [] @@ -120,7 +120,12 @@ ToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common) // Export // ============================================================================= -const toText = function (rrule: RRule, gettext?: GetText, language?: Language, dateFormatter?: DateFormatter) { +const toText = function ( + rrule: RRule, + gettext?: GetText, + language?: Language, + dateFormatter?: DateFormatter +) { return new ToText(rrule, gettext, language, dateFormatter).toString() } diff --git a/src/nlp/parsetext.ts b/src/nlp/parsetext.ts index 76150eb0..e3b91bf7 100644 --- a/src/nlp/parsetext.ts +++ b/src/nlp/parsetext.ts @@ -14,21 +14,21 @@ class Parser { public value: RegExpExecArray | null private done = true - constructor (rules: { [k: string]: RegExp }) { + constructor(rules: { [k: string]: RegExp }) { this.rules = rules } - start (text: string) { + start(text: string) { this.text = text this.done = false return this.nextSymbol() } - isDone () { + isDone() { return this.done && this.symbol === null } - nextSymbol () { + nextSymbol() { let best: RegExpExecArray | null let bestSymbol: string const p = this @@ -63,7 +63,7 @@ class Parser { this.value = null return } - // @ts-ignore + // @ts-ignore } while (bestSymbol === 'SKIP') // @ts-ignore @@ -72,7 +72,7 @@ class Parser { return true } - accept (name: string) { + accept(name: string) { if (this.symbol === name) { if (this.value) { const v = this.value @@ -87,18 +87,18 @@ class Parser { return false } - acceptNumber () { + acceptNumber() { return this.accept('number') as RegExpExecArray } - expect (name: string) { + expect(name: string) { if (this.accept(name)) return true throw new Error('expected ' + name + ' but found ' + this.symbol) } } -export default function parseText (text: string, language: Language = ENGLISH) { +export default function parseText(text: string, language: Language = ENGLISH) { const options: Partial = {} const ttr = new Parser(language.tokens) @@ -107,7 +107,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { S() return options - function S () { + function S() { // every [n] ttr.expect('every') let n = ttr.acceptNumber() @@ -127,13 +127,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { // DAILY on weekdays is not a valid rule case 'weekday(s)': options.freq = RRule.WEEKLY - options.byweekday = [ - RRule.MO, - RRule.TU, - RRule.WE, - RRule.TH, - RRule.FR - ] + options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR] ttr.nextSymbol() F() break @@ -186,7 +180,9 @@ export default function parseText (text: string, language: Language = ENGLISH) { case 'saturday': case 'sunday': options.freq = RRule.WEEKLY - const key: WeekdayStr = ttr.symbol.substr(0, 2).toUpperCase() as WeekdayStr + const key: WeekdayStr = ttr.symbol + .substr(0, 2) + .toUpperCase() as WeekdayStr options.byweekday = [RRule[key]] if (!ttr.nextSymbol()) return @@ -197,7 +193,9 @@ export default function parseText (text: string, language: Language = ENGLISH) { let wkd = decodeWKD() as keyof typeof RRule if (!wkd) { - throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday') + throw new Error( + 'Unexpected symbol ' + ttr.symbol + ', expected weekday' + ) } // @ts-ignore @@ -231,7 +229,9 @@ export default function parseText (text: string, language: Language = ENGLISH) { let m = decodeM() if (!m) { - throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month') + throw new Error( + 'Unexpected symbol ' + ttr.symbol + ', expected month' + ) } options.bymonth.push(m) @@ -247,7 +247,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } } - function ON () { + function ON() { const on = ttr.accept('on') const the = ttr.accept('the') if (!(on || the)) return @@ -282,25 +282,23 @@ export default function parseText (text: string, language: Language = ENGLISH) { } else if (ttr.symbol === 'weekday(s)') { ttr.nextSymbol() if (!options.byweekday) { - options.byweekday = [ - RRule.MO, - RRule.TU, - RRule.WE, - RRule.TH, - RRule.FR - ] + options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR] } } else if (ttr.symbol === 'week(s)') { ttr.nextSymbol() let n = ttr.acceptNumber() if (!n) { - throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number') + throw new Error( + 'Unexpected symbol ' + ttr.symbol + ', expected week number' + ) } options.byweekno = [parseInt(n[0], 10)] while (ttr.accept('comma')) { n = ttr.acceptNumber() if (!n) { - throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday') + throw new Error( + 'Unexpected symbol ' + ttr.symbol + '; expected monthday' + ) } options.byweekno.push(parseInt(n[0], 10)) } @@ -316,7 +314,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on')) } - function AT () { + function AT() { const at = ttr.accept('at') if (!at) return @@ -336,7 +334,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } while (ttr.accept('comma') || ttr.accept('at')) } - function decodeM () { + function decodeM() { switch (ttr.symbol) { case 'january': return 1 @@ -367,7 +365,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } } - function decodeWKD () { + function decodeWKD() { switch (ttr.symbol) { case 'monday': case 'tuesday': @@ -382,7 +380,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } } - function decodeNTH () { + function decodeNTH() { switch (ttr.symbol) { case 'last': ttr.nextSymbol() @@ -408,7 +406,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } } - function MDAYs () { + function MDAYs() { ttr.accept('on') ttr.accept('the') @@ -421,7 +419,9 @@ export default function parseText (text: string, language: Language = ENGLISH) { while (ttr.accept('comma')) { nth = decodeNTH() if (!nth) { - throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday') + throw new Error( + 'Unexpected symbol ' + ttr.symbol + '; expected monthday' + ) } options.bymonthday.push(nth) @@ -429,7 +429,7 @@ export default function parseText (text: string, language: Language = ENGLISH) { } } - function F () { + function F() { if (ttr.symbol === 'until') { const date = Date.parse(ttr.text) diff --git a/src/nlp/totext.ts b/src/nlp/totext.ts index ee84eee2..1ed6d2f8 100644 --- a/src/nlp/totext.ts +++ b/src/nlp/totext.ts @@ -21,11 +21,15 @@ const contains = function (arr: string[], val: string) { export type GetText = (id: string | number | Weekday) => string -const defaultGetText: GetText = id => id.toString() +const defaultGetText: GetText = (id) => id.toString() export type DateFormatter = (year: number, month: string, day: number) => string -const defaultDateFormatter: DateFormatter = (year: number, month: string, day: number) => `${month} ${day}, ${year}` +const defaultDateFormatter: DateFormatter = ( + year: number, + month: string, + day: number +) => `${month} ${day}, ${year}` /** * @@ -52,7 +56,12 @@ export default class ToText { isEveryDay: boolean } | null - constructor (rrule: RRule, gettext: GetText = defaultGetText, language: Language = ENGLISH, dateFormatter: DateFormatter = defaultDateFormatter) { + constructor( + rrule: RRule, + gettext: GetText = defaultGetText, + language: Language = ENGLISH, + dateFormatter: DateFormatter = defaultDateFormatter + ) { this.text = [] this.language = language || ENGLISH this.gettext = gettext @@ -100,7 +109,7 @@ export default class ToText { days.indexOf('TH') !== -1 && days.indexOf('FR') !== -1 && days.indexOf('SA') !== -1 && - days.indexOf('SU') !== -1 + days.indexOf('SU') !== -1, } const sortWeekDays = function (a: Weekday, b: Weekday) { @@ -122,7 +131,7 @@ export default class ToText { * @param {RRule} rrule * @return {Boolean} */ - static isFullyConvertible (rrule: RRule) { + static isFullyConvertible(rrule: RRule) { let canConvert = true if (!(rrule.options.freq in ToText.IMPLEMENTED)) return false @@ -136,7 +145,7 @@ export default class ToText { return canConvert } - isFullyConvertible () { + isFullyConvertible() { return ToText.isFullyConvertible(this.rrule) } @@ -146,7 +155,7 @@ export default class ToText { * be omitted from the output an "(~ approximate)" will be appended. * @return {*} */ - toString () { + toString() { const gettext = this.gettext if (!(this.options.freq! in ToText.IMPLEMENTED)) { @@ -160,7 +169,13 @@ export default class ToText { if (this.options.until) { this.add(gettext('until')) const until = this.options.until - this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate())) + this.add( + this.dateFormatter( + until.getUTCFullYear(), + this.language.monthNames[until.getUTCMonth()], + until.getUTCDate() + ) + ) } else if (this.options.count) { this.add(gettext('for')) .add(this.options.count.toString()) @@ -174,7 +189,7 @@ export default class ToText { return this.text.join('') } - HOURLY () { + HOURLY() { const gettext = this.gettext if (this.options.interval !== 1) this.add(this.options.interval!.toString()) @@ -184,7 +199,7 @@ export default class ToText { ) } - MINUTELY () { + MINUTELY() { const gettext = this.gettext if (this.options.interval !== 1) this.add(this.options.interval!.toString()) @@ -196,7 +211,7 @@ export default class ToText { ) } - DAILY () { + DAILY() { const gettext = this.gettext if (this.options.interval !== 1) this.add(this.options.interval!.toString()) @@ -211,7 +226,6 @@ export default class ToText { this.add( this.plural(this.options.interval!) ? gettext('days') : gettext('day') ) - } if (this.origOptions.bymonth) { @@ -228,7 +242,7 @@ export default class ToText { } } - WEEKLY () { + WEEKLY() { const gettext = this.gettext if (this.options.interval !== 1) { @@ -267,7 +281,7 @@ export default class ToText { } } - MONTHLY () { + MONTHLY() { const gettext = this.gettext if (this.origOptions.bymonth) { @@ -279,7 +293,8 @@ export default class ToText { } this._bymonth() } else { - if (this.options.interval !== 1) this.add(this.options.interval!.toString()) + if (this.options.interval !== 1) + this.add(this.options.interval!.toString()) this.add( this.plural(this.options.interval!) ? gettext('months') @@ -295,7 +310,7 @@ export default class ToText { } } - YEARLY () { + YEARLY() { const gettext = this.gettext if (this.origOptions.bymonth) { @@ -307,7 +322,8 @@ export default class ToText { } this._bymonth() } else { - if (this.options.interval !== 1) this.add(this.options.interval!.toString()) + if (this.options.interval !== 1) + this.add(this.options.interval!.toString()) this.add( this.plural(this.options.interval!) ? gettext('years') : gettext('year') ) @@ -336,7 +352,7 @@ export default class ToText { } } - private _bymonthday () { + private _bymonthday() { const gettext = this.gettext if (this.byweekday && this.byweekday.allWeeks) { this.add(gettext('on')) @@ -353,7 +369,7 @@ export default class ToText { // this.add(gettext('DAY')) } - private _byweekday () { + private _byweekday() { const gettext = this.gettext if (this.byweekday!.allWeeks && !this.byweekday!.isWeekdays) { this.add(gettext('on')).add( @@ -370,7 +386,7 @@ export default class ToText { } } - private _byhour () { + private _byhour() { const gettext = this.gettext this.add(gettext('at')).add( @@ -378,13 +394,13 @@ export default class ToText { ) } - private _bymonth () { + private _bymonth() { this.add( this.list(this.options.bymonth!, this.monthtext, this.gettext('and')) ) } - nth (n: number | string) { + nth(n: number | string) { n = parseInt(n.toString(), 10) let nth: string let npos: number @@ -414,29 +430,34 @@ export default class ToText { return n < 0 ? nth + ' ' + gettext('last') : nth } - monthtext (m: number) { + monthtext(m: number) { return this.language.monthNames[m - 1] } - weekdaytext (wday: Weekday | number) { - const weekday = - isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday() + weekdaytext(wday: Weekday | number) { + const weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday() return ( - ((wday as Weekday).n ? this.nth((wday as Weekday).n!) + ' ' : '') + this.language.dayNames[weekday] + ((wday as Weekday).n ? this.nth((wday as Weekday).n!) + ' ' : '') + + this.language.dayNames[weekday] ) } - plural (n: number) { + plural(n: number) { return n % 100 !== 1 } - add (s: string) { + add(s: string) { this.text.push(' ') this.text.push(s) return this } - list (arr: ByWeekday | ByWeekday[], callback?: GetText, finalDelim?: string, delim: string = ',') { + list( + arr: ByWeekday | ByWeekday[], + callback?: GetText, + finalDelim?: string, + delim: string = ',' + ) { if (!isArray(arr)) { arr = [arr] } diff --git a/src/optionstostring.ts b/src/optionstostring.ts index 3e088128..6389fbdb 100644 --- a/src/optionstostring.ts +++ b/src/optionstostring.ts @@ -5,7 +5,7 @@ import { Weekday } from './weekday' import dateutil from './dateutil' import { DateWithZone } from './datewithzone' -export function optionsToString (options: Partial) { +export function optionsToString(options: Partial) { let rrule: string[][] = [] let dtstart: string = '' const keys: (keyof Options)[] = Object.keys(options) as (keyof Options)[] @@ -33,7 +33,7 @@ export function optionsToString (options: Partial) { } break case 'BYWEEKDAY': - /* + /* NOTE: BYWEEKDAY is a special case. RRule() deconstructs the rule.options.byweekday array into an array of Weekday arguments. @@ -45,17 +45,19 @@ export function optionsToString (options: Partial) { */ key = 'BYDAY' - outValue = toArray(value).map(wday => { - if (wday instanceof Weekday) { - return wday - } + outValue = toArray(value) + .map((wday) => { + if (wday instanceof Weekday) { + return wday + } - if (isArray(wday)) { - return new Weekday(wday[0], wday[1]) - } + if (isArray(wday)) { + return new Weekday(wday[0], wday[1]) + } - return new Weekday(wday) - }).toString() + return new Weekday(wday) + }) + .toString() break case 'DTSTART': @@ -83,16 +85,18 @@ export function optionsToString (options: Partial) { } } - const rules = rrule.map(([key, value]) => `${key}=${value.toString()}`).join(';') + const rules = rrule + .map(([key, value]) => `${key}=${value.toString()}`) + .join(';') let ruleString = '' if (rules !== '') { ruleString = `RRULE:${rules}` } - return [ dtstart, ruleString ].filter(x => !!x).join('\n') + return [dtstart, ruleString].filter((x) => !!x).join('\n') } -function buildDtstart (dtstart?: number, tzid?: string | null) { +function buildDtstart(dtstart?: number, tzid?: string | null) { if (!dtstart) { return '' } diff --git a/src/parseoptions.ts b/src/parseoptions.ts index 21733a6c..643855c7 100644 --- a/src/parseoptions.ts +++ b/src/parseoptions.ts @@ -1,18 +1,26 @@ import { Options, ParsedOptions, freqIsDailyOrGreater } from './types' -import { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr } from './helpers' +import { + includes, + notEmpty, + isPresent, + isNumber, + isArray, + isWeekdayStr, +} from './helpers' import { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule' import dateutil from './dateutil' import { Weekday } from './weekday' import { Time } from './datetime' -export function initializeOptions (options: Partial) { +export function initializeOptions(options: Partial) { const invalid: string[] = [] const keys = Object.keys(options) as (keyof Options)[] // Shallow copy for options and origOptions and check for invalid for (const key of keys) { if (!includes(defaultKeys, key)) invalid.push(key) - if (dateutil.isDate(options[key]) && !dateutil.isValidDate(options[key])) invalid.push(key) + if (dateutil.isDate(options[key]) && !dateutil.isValidDate(options[key])) + invalid.push(key) } if (invalid.length) { @@ -22,7 +30,7 @@ export function initializeOptions (options: Partial) { return { ...options } } -export function parseOptions (options: Partial) { +export function parseOptions(options: Partial) { const opts = { ...DEFAULT_OPTIONS, ...initializeOptions(options) } if (isPresent(opts.byeaster)) opts.freq = RRule.YEARLY @@ -168,8 +176,7 @@ export function parseOptions (options: Partial) { // byhour if (!isPresent(opts.byhour)) { - opts.byhour = - opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null + opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null } else if (isNumber(opts.byhour)) { opts.byhour = [opts.byhour] } @@ -193,16 +200,16 @@ export function parseOptions (options: Partial) { return { parsedOptions: opts as ParsedOptions } } -export function buildTimeset (opts: ParsedOptions) { +export function buildTimeset(opts: ParsedOptions) { const millisecondModulo = opts.dtstart.getTime() % 1000 if (!freqIsDailyOrGreater(opts.freq)) { return [] } const timeset: Time[] = [] - opts.byhour.forEach(hour => { - opts.byminute.forEach(minute => { - opts.bysecond.forEach(second => { + opts.byhour.forEach((hour) => { + opts.byminute.forEach((minute) => { + opts.bysecond.forEach((second) => { timeset.push(new Time(hour, minute, second, millisecondModulo)) }) }) diff --git a/src/parsestring.ts b/src/parsestring.ts index b1b38e53..14ca17b1 100644 --- a/src/parsestring.ts +++ b/src/parsestring.ts @@ -3,21 +3,26 @@ import { Weekday } from './weekday' import dateutil from './dateutil' import { Days } from './rrule' -export function parseString (rfcString: string): Partial { - const options = rfcString.split('\n').map(parseLine).filter(x => x !== null) +export function parseString(rfcString: string): Partial { + const options = rfcString + .split('\n') + .map(parseLine) + .filter((x) => x !== null) return { ...options[0], ...options[1] } } -export function parseDtstart (line: string) { +export function parseDtstart(line: string) { const options: Partial = {} - const dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(line) + const dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec( + line + ) if (!dtstartWithZone) { return options } - const [ _, tzid, dtstart ] = dtstartWithZone + const [_, tzid, dtstart] = dtstartWithZone if (tzid) { options.tzid = tzid @@ -26,7 +31,7 @@ export function parseDtstart (line: string) { return options } -function parseLine (rfcString: string) { +function parseLine(rfcString: string) { rfcString = rfcString.replace(/^\s+|\s+$/, '') if (!rfcString.length) return null @@ -35,7 +40,7 @@ function parseLine (rfcString: string) { return parseRrule(rfcString) } - const [ _, key ] = header + const [_, key] = header switch (key.toUpperCase()) { case 'RRULE': case 'EXRULE': @@ -47,14 +52,14 @@ function parseLine (rfcString: string) { } } -function parseRrule (line: string) { +function parseRrule(line: string) { const strippedLine = line.replace(/^RRULE:/i, '') const options = parseDtstart(strippedLine) const attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';') - attrs.forEach(attr => { - const [ key, value ] = attr.split('=') + attrs.forEach((attr) => { + const [key, value] = attr.split('=') switch (key.toUpperCase()) { case 'FREQ': options.freq = Frequency[value.toUpperCase() as keyof typeof Frequency] @@ -102,7 +107,7 @@ function parseRrule (line: string) { return options } -function parseNumber (value: string) { +function parseNumber(value: string) { if (value.indexOf(',') !== -1) { const values = value.split(',') return values.map(parseIndividualNumber) @@ -111,7 +116,7 @@ function parseNumber (value: string) { return parseIndividualNumber(value) } -function parseIndividualNumber (value: string) { +function parseIndividualNumber(value: string) { if (/^[+-]?\d+$/.test(value)) { return Number(value) } @@ -119,10 +124,10 @@ function parseIndividualNumber (value: string) { return value } -function parseWeekday (value: string) { +function parseWeekday(value: string) { const days = value.split(',') - return days.map(day => { + return days.map((day) => { if (day.length === 2) { // MO, TU, ... return Days[day as keyof typeof Days] // wday instanceof Weekday diff --git a/src/rrule.ts b/src/rrule.ts index c1526a8e..13ab3da1 100644 --- a/src/rrule.ts +++ b/src/rrule.ts @@ -5,7 +5,14 @@ import CallbackIterResult from './callbackiterresult' import { Language } from './nlp/i18n' import { fromText, parseText, toText, isFullyConvertible } from './nlp/index' import { DateFormatter, GetText } from './nlp/totext' -import { ParsedOptions, Options, Frequency, QueryMethods, QueryMethodTypes, IterResultType } from './types' +import { + ParsedOptions, + Options, + Frequency, + QueryMethods, + QueryMethodTypes, + IterResultType, +} from './types' import { parseOptions, initializeOptions } from './parseoptions' import { parseString } from './parsestring' import { optionsToString } from './optionstostring' @@ -24,7 +31,7 @@ export const Days = { TH: new Weekday(3), FR: new Weekday(4), SA: new Weekday(5), - SU: new Weekday(6) + SU: new Weekday(6), } export const DEFAULT_OPTIONS: Options = { @@ -46,7 +53,7 @@ export const DEFAULT_OPTIONS: Options = { byhour: null, byminute: null, bysecond: null, - byeaster: null + byeaster: null, } export const defaultKeys = Object.keys(DEFAULT_OPTIONS) as (keyof Options)[] @@ -71,7 +78,7 @@ export class RRule implements QueryMethods { 'DAILY', 'HOURLY', 'MINUTELY', - 'SECONDLY' + 'SECONDLY', ] static readonly YEARLY = Frequency.YEARLY @@ -90,7 +97,7 @@ export class RRule implements QueryMethods { static readonly SA = Days.SA static readonly SU = Days.SU - constructor (options: Partial = {}, noCache: boolean = false) { + constructor(options: Partial = {}, noCache: boolean = false) { // RFC string this._cache = noCache ? null : new Cache() @@ -100,32 +107,34 @@ export class RRule implements QueryMethods { this.options = parsedOptions } - static parseText (text: string, language?: Language) { + static parseText(text: string, language?: Language) { return parseText(text, language) } - static fromText (text: string, language?: Language) { + static fromText(text: string, language?: Language) { return fromText(text, language) } static parseString = parseString - static fromString (str: string) { + static fromString(str: string) { return new RRule(RRule.parseString(str) || undefined) } static optionsToString = optionsToString - protected _iter (iterResult: IterResult): IterResultType { + protected _iter( + iterResult: IterResult + ): IterResultType { return iter(iterResult, this.options) } - private _cacheGet (what: CacheKeys | 'all', args?: Partial) { + private _cacheGet(what: CacheKeys | 'all', args?: Partial) { if (!this._cache) return false return this._cache._cacheGet(what, args) } - public _cacheAdd ( + public _cacheAdd( what: CacheKeys | 'all', value: Date[] | Date | null, args?: Partial @@ -140,7 +149,7 @@ export class RRule implements QueryMethods { * to stop the iteration. * @return Array containing all recurrences. */ - all (iterator?: (d: Date, len: number) => boolean): Date[] { + all(iterator?: (d: Date, len: number) => boolean): Date[] { if (iterator) { return this._iter(new CallbackIterResult('all', {}, iterator)) } @@ -160,23 +169,22 @@ export class RRule implements QueryMethods { * list, if they are found in the recurrence set. * @return Array */ - between ( + between( after: Date, before: Date, inc: boolean = false, iterator?: (d: Date, len: number) => boolean ): Date[] { - if (!dateutil.isValidDate(after) || !dateutil.isValidDate(before)) throw new Error('Invalid date passed in to RRule.between') + if (!dateutil.isValidDate(after) || !dateutil.isValidDate(before)) + throw new Error('Invalid date passed in to RRule.between') const args = { before, after, - inc + inc, } if (iterator) { - return this._iter( - new CallbackIterResult('between', args, iterator) - ) + return this._iter(new CallbackIterResult('between', args, iterator)) } let result = this._cacheGet('between', args) @@ -193,8 +201,9 @@ export class RRule implements QueryMethods { * With inc == True, if dt itself is an occurrence, it will be returned. * @return Date or null */ - before (dt: Date, inc = false): Date { - if (!dateutil.isValidDate(dt)) throw new Error('Invalid date passed in to RRule.before') + before(dt: Date, inc = false): Date { + if (!dateutil.isValidDate(dt)) + throw new Error('Invalid date passed in to RRule.before') const args = { dt: dt, inc: inc } let result = this._cacheGet('before', args) if (result === false) { @@ -210,8 +219,9 @@ export class RRule implements QueryMethods { * With inc == True, if dt itself is an occurrence, it will be returned. * @return Date or null */ - after (dt: Date, inc = false): Date { - if (!dateutil.isValidDate(dt)) throw new Error('Invalid date passed in to RRule.after') + after(dt: Date, inc = false): Date { + if (!dateutil.isValidDate(dt)) + throw new Error('Invalid date passed in to RRule.after') const args = { dt: dt, inc: inc } let result = this._cacheGet('after', args) if (result === false) { @@ -225,7 +235,7 @@ export class RRule implements QueryMethods { * Returns the number of recurrences in this set. It will have go trough * the whole recurrence, if this hasn't been done before. */ - count (): number { + count(): number { return this.all().length } @@ -234,7 +244,7 @@ export class RRule implements QueryMethods { * @see * @return String */ - toString () { + toString() { return optionsToString(this.origOptions) } @@ -242,11 +252,15 @@ export class RRule implements QueryMethods { * Will convert all rules described in nlp:ToText * to text. */ - toText (gettext?: GetText, language?: Language, dateFormatter?: DateFormatter) { + toText( + gettext?: GetText, + language?: Language, + dateFormatter?: DateFormatter + ) { return toText(this, gettext, language, dateFormatter) } - isFullyConvertibleToText () { + isFullyConvertibleToText() { return isFullyConvertible(this) } @@ -254,7 +268,7 @@ export class RRule implements QueryMethods { * @return a RRule instance with the same freq and options * as this one (cache is not cloned) */ - clone (): RRule { + clone(): RRule { return new RRule(this.origOptions) } } diff --git a/src/rruleset.ts b/src/rruleset.ts index d4c89cd1..6f10b2fd 100644 --- a/src/rruleset.ts +++ b/src/rruleset.ts @@ -7,7 +7,7 @@ import { QueryMethodTypes, IterResultType } from './types' import { rrulestr } from './rrulestr' import { optionsToString } from './optionstostring' -function createGetterSetter (fieldName: string) { +function createGetterSetter(fieldName: string) { return (field?: T) => { if (field !== undefined) { this[`_${fieldName}`] = field @@ -41,7 +41,7 @@ export class RRuleSet extends RRule { * The same stratagy as RRule on cache, default to false * @constructor */ - constructor (noCache: boolean = false) { + constructor(noCache: boolean = false) { super({}, noCache) this._rrule = [] @@ -53,7 +53,9 @@ export class RRuleSet extends RRule { dtstart = createGetterSetter.apply(this, ['dtstart']) tzid = createGetterSetter.apply(this, ['tzid']) - _iter (iterResult: IterResult): IterResultType { + _iter( + iterResult: IterResult + ): IterResultType { return iterSet( iterResult, this._rrule, @@ -69,7 +71,7 @@ export class RRuleSet extends RRule { * * @param {RRule} */ - rrule (rrule: RRule) { + rrule(rrule: RRule) { _addRule(rrule, this._rrule) } @@ -78,7 +80,7 @@ export class RRuleSet extends RRule { * * @param {RRule} */ - exrule (rrule: RRule) { + exrule(rrule: RRule) { _addRule(rrule, this._exrule) } @@ -87,7 +89,7 @@ export class RRuleSet extends RRule { * * @param {Date} */ - rdate (date: Date) { + rdate(date: Date) { _addDate(date, this._rdate) } @@ -96,7 +98,7 @@ export class RRuleSet extends RRule { * * @param {Date} */ - exdate (date: Date) { + exdate(date: Date) { _addDate(date, this._exdate) } @@ -105,8 +107,8 @@ export class RRuleSet extends RRule { * * @return List of rrules */ - rrules () { - return this._rrule.map(e => rrulestr(e.toString())) + rrules() { + return this._rrule.map((e) => rrulestr(e.toString())) } /** @@ -114,8 +116,8 @@ export class RRuleSet extends RRule { * * @return List of exrules */ - exrules () { - return this._exrule.map(e => rrulestr(e.toString())) + exrules() { + return this._exrule.map((e) => rrulestr(e.toString())) } /** @@ -123,8 +125,8 @@ export class RRuleSet extends RRule { * * @return List of rdates */ - rdates () { - return this._rdate.map(e => new Date(e.getTime())) + rdates() { + return this._rdate.map((e) => new Date(e.getTime())) } /** @@ -132,11 +134,11 @@ export class RRuleSet extends RRule { * * @return List of exdates */ - exdates () { - return this._exdate.map(e => new Date(e.getTime())) + exdates() { + return this._exdate.map((e) => new Date(e.getTime())) } - valueOf () { + valueOf() { let result: string[] = [] if (!this._rrule.length && this._dtstart) { @@ -149,22 +151,20 @@ export class RRuleSet extends RRule { this._exrule.forEach(function (exrule) { result = result.concat( - exrule.toString().split('\n') - .map(line => line.replace(/^RRULE:/, 'EXRULE:')) - .filter(line => !/^DTSTART/.test(line)) + exrule + .toString() + .split('\n') + .map((line) => line.replace(/^RRULE:/, 'EXRULE:')) + .filter((line) => !/^DTSTART/.test(line)) ) }) if (this._rdate.length) { - result.push( - rdatesToString('RDATE', this._rdate, this.tzid()) - ) + result.push(rdatesToString('RDATE', this._rdate, this.tzid())) } if (this._exdate.length) { - result.push( - rdatesToString('EXDATE', this._exdate, this.tzid()) - ) + result.push(rdatesToString('EXDATE', this._exdate, this.tzid())) } return result @@ -176,26 +176,26 @@ export class RRuleSet extends RRule { * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH */ - toString () { + toString() { return this.valueOf().join('\n') } /** * Create a new RRuleSet Object completely base on current instance */ - clone (): RRuleSet { + clone(): RRuleSet { const rrs = new RRuleSet(!!this._cache) - this._rrule.forEach(rule => rrs.rrule(rule.clone())) - this._exrule.forEach(rule => rrs.exrule(rule.clone())) - this._rdate.forEach(date => rrs.rdate(new Date(date.getTime()))) - this._exdate.forEach(date => rrs.exdate(new Date(date.getTime()))) + this._rrule.forEach((rule) => rrs.rrule(rule.clone())) + this._exrule.forEach((rule) => rrs.exrule(rule.clone())) + this._rdate.forEach((date) => rrs.rdate(new Date(date.getTime()))) + this._exdate.forEach((date) => rrs.exdate(new Date(date.getTime()))) return rrs } } -function _addRule (rrule: RRule, collection: RRule[]) { +function _addRule(rrule: RRule, collection: RRule[]) { if (!(rrule instanceof RRule)) { throw new TypeError(String(rrule) + ' is not RRule instance') } @@ -205,7 +205,7 @@ function _addRule (rrule: RRule, collection: RRule[]) { } } -function _addDate (date: Date, collection: Date[]) { +function _addDate(date: Date, collection: Date[]) { if (!(date instanceof Date)) { throw new TypeError(String(date) + ' is not Date instance') } @@ -215,13 +215,17 @@ function _addDate (date: Date, collection: Date[]) { } } -function rdatesToString (param: string, rdates: Date[], tzid: string | undefined) { +function rdatesToString( + param: string, + rdates: Date[], + tzid: string | undefined +) { const isUTC = !tzid || tzid.toUpperCase() === 'UTC' const header = isUTC ? `${param}:` : `${param};TZID=${tzid}:` const dateString = rdates - .map(rdate => dateutil.timeToUntilString(rdate.valueOf(), isUTC)) - .join(',') + .map((rdate) => dateutil.timeToUntilString(rdate.valueOf(), isUTC)) + .join(',') return `${header}${dateString}` } diff --git a/src/rrulestr.ts b/src/rrulestr.ts index 7513438d..8086ff9a 100644 --- a/src/rrulestr.ts +++ b/src/rrulestr.ts @@ -24,10 +24,10 @@ const DEFAULT_OPTIONS: RRuleStrOptions = { unfold: false, forceset: false, compatible: false, - tzid: null + tzid: null, } -export function parseInput (s: string, options: Partial) { +export function parseInput(s: string, options: Partial) { let rrulevals: Partial[] = [] let rdatevals: Date[] = [] let exrulevals: Partial[] = [] @@ -37,7 +37,7 @@ export function parseInput (s: string, options: Partial) { const lines = splitIntoLines(s, options.unfold) - lines.forEach(line => { + lines.forEach((line) => { if (!line) return const { name, parms, value } = breakDownLine(line) @@ -51,7 +51,7 @@ export function parseInput (s: string, options: Partial) { break case 'RDATE': - const [ _, rdateTzid ] = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)! + const [_, rdateTzid] = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)! if (rdateTzid && !tzid) { tzid = rdateTzid } @@ -84,19 +84,13 @@ export function parseInput (s: string, options: Partial) { rrulevals, rdatevals, exrulevals, - exdatevals + exdatevals, } } -function buildRule (s: string, options: Partial) { - const { - rrulevals, - rdatevals, - exrulevals, - exdatevals, - dtstart, - tzid - } = parseInput(s, options) +function buildRule(s: string, options: Partial) { + const { rrulevals, rdatevals, exrulevals, exdatevals, dtstart, tzid } = + parseInput(s, options) const noCache = options.cache === false @@ -117,29 +111,19 @@ function buildRule (s: string, options: Partial) { rset.dtstart(dtstart) rset.tzid(tzid || undefined) - rrulevals.forEach(val => { - rset.rrule( - new RRule( - groomRruleOptions(val, dtstart, tzid), - noCache - ) - ) + rrulevals.forEach((val) => { + rset.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache)) }) - rdatevals.forEach(date => { + rdatevals.forEach((date) => { rset.rdate(date) }) - exrulevals.forEach(val => { - rset.exrule( - new RRule( - groomRruleOptions(val, dtstart, tzid), - noCache - ) - ) + exrulevals.forEach((val) => { + rset.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache)) }) - exdatevals.forEach(date => { + exdatevals.forEach((date) => { rset.exdate(date) }) @@ -148,29 +132,36 @@ function buildRule (s: string, options: Partial) { } const val = rrulevals[0] || {} - return new RRule(groomRruleOptions( - val, - val.dtstart || options.dtstart || dtstart, - val.tzid || options.tzid || tzid - ), noCache) + return new RRule( + groomRruleOptions( + val, + val.dtstart || options.dtstart || dtstart, + val.tzid || options.tzid || tzid + ), + noCache + ) } -export function rrulestr ( +export function rrulestr( s: string, options: Partial = {} ): RRule | RRuleSet { return buildRule(s, initializeOptions(options)) } -function groomRruleOptions (val: Partial, dtstart?: Date | null, tzid?: string | null) { +function groomRruleOptions( + val: Partial, + dtstart?: Date | null, + tzid?: string | null +) { return { ...val, dtstart, - tzid + tzid, } } -function initializeOptions (options: Partial) { +function initializeOptions(options: Partial) { const invalid: string[] = [] const keys = Object.keys(options) as (keyof typeof options)[] const defaultKeys = Object.keys( @@ -188,22 +179,22 @@ function initializeOptions (options: Partial) { return { ...DEFAULT_OPTIONS, ...options } } -function extractName (line: string) { +function extractName(line: string) { if (line.indexOf(':') === -1) { return { name: 'RRULE', - value: line + value: line, } } const [name, value] = split(line, ':', 1) return { name, - value + value, } } -function breakDownLine (line: string) { +function breakDownLine(line: string) { const { name, value } = extractName(line) let parms = name.split(';') if (!parms) throw new Error('empty property name') @@ -211,11 +202,11 @@ function breakDownLine (line: string) { return { name: parms[0].toUpperCase(), parms: parms.slice(1), - value + value, } } -function splitIntoLines (s: string, unfold = false) { +function splitIntoLines(s: string, unfold = false) { s = s && s.trim() if (!s) throw new Error('Invalid empty string') @@ -243,18 +234,18 @@ function splitIntoLines (s: string, unfold = false) { return lines } -function validateDateParm (parms: string[]) { - parms.forEach(parm => { +function validateDateParm(parms: string[]) { + parms.forEach((parm) => { if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) { throw new Error('unsupported RDATE/EXDATE parm: ' + parm) } }) } -function parseRDate (rdateval: string, parms: string[]) { +function parseRDate(rdateval: string, parms: string[]) { validateDateParm(parms) return rdateval .split(',') - .map(datestr => dateutil.untilStringToDate(datestr)) + .map((datestr) => dateutil.untilStringToDate(datestr)) } diff --git a/src/types.ts b/src/types.ts index bbf1d85a..e540563c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,14 +1,18 @@ import { Weekday, WeekdayStr } from './weekday' export interface QueryMethods { - all (): Date[] - between (after: Date, before: Date, inc: boolean): Date[] - before (date: Date, inc: boolean): Date - after (date: Date, inc: boolean): Date + all(): Date[] + between(after: Date, before: Date, inc: boolean): Date[] + before(date: Date, inc: boolean): Date + after(date: Date, inc: boolean): Date } export type QueryMethodTypes = keyof QueryMethods -export type IterResultType = M extends 'all' | 'between' ? Date[] : (Date | null) +export type IterResultType = M extends + | 'all' + | 'between' + ? Date[] + : Date | null export enum Frequency { YEARLY = 0, @@ -17,10 +21,16 @@ export enum Frequency { DAILY = 3, HOURLY = 4, MINUTELY = 5, - SECONDLY = 6 + SECONDLY = 6, } -export function freqIsDailyOrGreater (freq: Frequency): freq is Frequency.YEARLY | Frequency.MONTHLY | Frequency.WEEKLY | Frequency.DAILY { +export function freqIsDailyOrGreater( + freq: Frequency +): freq is + | Frequency.YEARLY + | Frequency.MONTHLY + | Frequency.WEEKLY + | Frequency.DAILY { return freq < Frequency.HOURLY } diff --git a/src/weekday.ts b/src/weekday.ts index a9f879ae..dc4d61c6 100644 --- a/src/weekday.ts +++ b/src/weekday.ts @@ -3,41 +3,49 @@ // ============================================================================= export type WeekdayStr = 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU' -export const ALL_WEEKDAYS: WeekdayStr[] = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] +export const ALL_WEEKDAYS: WeekdayStr[] = [ + 'MO', + 'TU', + 'WE', + 'TH', + 'FR', + 'SA', + 'SU', +] export class Weekday { public readonly weekday: number public readonly n?: number - constructor (weekday: number, n?: number) { + constructor(weekday: number, n?: number) { if (n === 0) throw new Error("Can't create weekday with n == 0") this.weekday = weekday this.n = n } - static fromStr (str: WeekdayStr): Weekday { + static fromStr(str: WeekdayStr): Weekday { return new Weekday(ALL_WEEKDAYS.indexOf(str)) } // __call__ - Cannot call the object directly, do it through // e.g. RRule.TH.nth(-1) instead, - nth (n: number) { + nth(n: number) { return this.n === n ? this : new Weekday(this.weekday, n) } // __eq__ - equals (other: Weekday) { + equals(other: Weekday) { return this.weekday === other.weekday && this.n === other.n } // __repr__ - toString () { + toString() { let s: string = ALL_WEEKDAYS[this.weekday] if (this.n) s = (this.n > 0 ? '+' : '') + String(this.n) + s return s } - getJsWeekday () { + getJsWeekday() { return this.weekday === 6 ? 0 : this.weekday + 1 } } diff --git a/test/cache.test.ts b/test/cache.test.ts index 00939d32..b2445a2a 100644 --- a/test/cache.test.ts +++ b/test/cache.test.ts @@ -1,101 +1,101 @@ -import { Cache } from "../src/cache"; -import { expect } from "chai"; -import { IterArgs } from "../src/iterresult"; +import { Cache } from '../src/cache' +import { expect } from 'chai' +import { IterArgs } from '../src/iterresult' const dates = [ - new Date("2021-01-01T00:00:00.000+00:00"), - new Date("2021-01-02T00:00:00.000+00:00"), - new Date("2021-01-03T00:00:00.000+00:00"), - new Date("2021-01-04T00:00:00.000+00:00"), - new Date("2021-01-05T00:00:00.000+00:00"), - new Date("2021-01-06T00:00:00.000+00:00"), - new Date("2021-01-07T00:00:00.000+00:00"), -]; - -describe("Cache", () => { - it("returns false for an empty cache", () => { - const cache = new Cache(); + new Date('2021-01-01T00:00:00.000+00:00'), + new Date('2021-01-02T00:00:00.000+00:00'), + new Date('2021-01-03T00:00:00.000+00:00'), + new Date('2021-01-04T00:00:00.000+00:00'), + new Date('2021-01-05T00:00:00.000+00:00'), + new Date('2021-01-06T00:00:00.000+00:00'), + new Date('2021-01-07T00:00:00.000+00:00'), +] + +describe('Cache', () => { + it('returns false for an empty cache', () => { + const cache = new Cache() const args: Partial = { - after: new Date("2021-01-01T00:00:00.000+00:00"), - before: new Date("2021-01-08T00:00:00.000+00:00"), + after: new Date('2021-01-01T00:00:00.000+00:00'), + before: new Date('2021-01-08T00:00:00.000+00:00'), inc: true, - }; + } - expect(cache._cacheGet("between", args)).to.be.false; - }); + expect(cache._cacheGet('between', args)).to.be.false + }) - it("returns an empty array for a cached but empty set", () => { - const cache = new Cache(); + it('returns an empty array for a cached but empty set', () => { + const cache = new Cache() const args: Partial = { - after: new Date("2021-01-01T00:00:00.000+00:00"), - before: new Date("2021-01-08T00:00:00.000+00:00"), + after: new Date('2021-01-01T00:00:00.000+00:00'), + before: new Date('2021-01-08T00:00:00.000+00:00'), inc: true, - }; + } - cache._cacheAdd("between", [], args); + cache._cacheAdd('between', [], args) - expect(cache._cacheGet("between", args)).to.eql([]); - }); + expect(cache._cacheGet('between', args)).to.eql([]) + }) it('returns cached entries if the "what" and the args both match', () => { - const cache = new Cache(); + const cache = new Cache() const args: Partial = { - after: new Date("2021-01-01T00:00:00.000+00:00"), - before: new Date("2021-01-08T00:00:00.000+00:00"), + after: new Date('2021-01-01T00:00:00.000+00:00'), + before: new Date('2021-01-08T00:00:00.000+00:00'), inc: true, - }; + } - cache._cacheAdd("between", dates, args); + cache._cacheAdd('between', dates, args) - expect(cache._cacheGet("between", args)).to.eql(dates); - }); + expect(cache._cacheGet('between', args)).to.eql(dates) + }) it('does not return cached entries if the "what" matches but the args do not', () => { - const cache = new Cache(); + const cache = new Cache() const args: Partial = { - after: new Date("2021-01-01T00:00:00.000+00:00"), - before: new Date("2021-01-08T00:00:00.000+00:00"), + after: new Date('2021-01-01T00:00:00.000+00:00'), + before: new Date('2021-01-08T00:00:00.000+00:00'), inc: true, - }; + } - cache._cacheAdd("between", dates, args); + cache._cacheAdd('between', dates, args) expect( - cache._cacheGet("between", { + cache._cacheGet('between', { ...args, /** 1ms later than the args used for the insert */ - after: new Date("2021-01-01T00:00:00.001+00:00"), + after: new Date('2021-01-01T00:00:00.001+00:00'), }) - ).to.equal(false); - }); + ).to.equal(false) + }) it('does not return cached entries if args match but the "what" does not', () => { - const cache = new Cache(); + const cache = new Cache() const args: Partial = { - after: new Date("2021-01-01T00:00:00.000+00:00"), - before: new Date("2021-01-08T00:00:00.000+00:00"), + after: new Date('2021-01-01T00:00:00.000+00:00'), + before: new Date('2021-01-08T00:00:00.000+00:00'), inc: true, - }; + } - cache._cacheAdd("between", dates, args); + cache._cacheAdd('between', dates, args) - expect(cache._cacheGet("after", args)).to.equal(false); - }); + expect(cache._cacheGet('after', args)).to.equal(false) + }) it('reuses dates cached for the "all" method when querying using another method', () => { - const cache = new Cache(); + const cache = new Cache() const args: Partial = { - after: new Date("2021-01-04T00:00:00.000+00:00"), - before: new Date("2021-01-06T00:00:00.000+00:00"), + after: new Date('2021-01-04T00:00:00.000+00:00'), + before: new Date('2021-01-06T00:00:00.000+00:00'), inc: true, - }; + } - cache._cacheAdd("all", dates); + cache._cacheAdd('all', dates) - expect(cache._cacheGet("between", args)).to.eql([ - new Date("2021-01-04T00:00:00.000+00:00"), - new Date("2021-01-05T00:00:00.000+00:00"), - new Date("2021-01-06T00:00:00.000+00:00"), - ]); - }); -}); + expect(cache._cacheGet('between', args)).to.eql([ + new Date('2021-01-04T00:00:00.000+00:00'), + new Date('2021-01-05T00:00:00.000+00:00'), + new Date('2021-01-06T00:00:00.000+00:00'), + ]) + }) +}) diff --git a/test/dateutil.test.ts b/test/dateutil.test.ts index d6bd196a..52139dc8 100644 --- a/test/dateutil.test.ts +++ b/test/dateutil.test.ts @@ -4,6 +4,8 @@ import { expect } from 'chai' describe('untilStringToDate', () => { it('parses a date string', () => { const date = dateutil.untilStringToDate('19970902T090000') - expect(date.getTime()).to.equal(new Date(Date.UTC(1997, 8, 2, 9, 0, 0, 0)).getTime()) + expect(date.getTime()).to.equal( + new Date(Date.UTC(1997, 8, 2, 9, 0, 0, 0)).getTime() + ) }) }) diff --git a/test/datewithzone.test.ts b/test/datewithzone.test.ts index d247d4f1..64ec321a 100644 --- a/test/datewithzone.test.ts +++ b/test/datewithzone.test.ts @@ -1,19 +1,25 @@ -import { DateWithZone } from "../src/datewithzone"; -import { expect } from "chai"; +import { DateWithZone } from '../src/datewithzone' +import { expect } from 'chai' import { set as setMockDate, reset as resetMockDate } from 'mockdate' -import { expectedDate } from "./lib/utils"; +import { expectedDate } from './lib/utils' describe('toString', () => { it('returns the date when no tzid is present', () => { const dt = new DateWithZone(new Date(Date.UTC(2010, 9, 5, 11, 0, 0))) expect(dt.toString()).to.equal(':20101005T110000Z') - const dt2 = new DateWithZone(new Date(Date.UTC(2010, 9, 5, 11, 0, 0)), 'UTC') + const dt2 = new DateWithZone( + new Date(Date.UTC(2010, 9, 5, 11, 0, 0)), + 'UTC' + ) expect(dt2.toString()).to.equal(':20101005T110000Z') - }) + }) it('returns the date with tzid when present', () => { - const dt = new DateWithZone(new Date(Date.UTC(2010, 9, 5, 11, 0, 0)), 'Asia/Tokyo') + const dt = new DateWithZone( + new Date(Date.UTC(2010, 9, 5, 11, 0, 0)), + 'Asia/Tokyo' + ) expect(dt.toString()).to.equal(';TZID=Asia/Tokyo:20101005T110000') }) }) @@ -39,9 +45,13 @@ describe('rezonedDate', () => { const d = new Date(Date.parse('20101005T110000')) const dt = new DateWithZone(d, targetZone) expect(dt.rezonedDate()).to.deep.equal( - expectedDate(new Date(Date.parse('20101005T110000')), currentLocalDate, targetZone) + expectedDate( + new Date(Date.parse('20101005T110000')), + currentLocalDate, + targetZone + ) ) resetMockDate() }) -}) \ No newline at end of file +}) diff --git a/test/helpers.test.ts b/test/helpers.test.ts index 7efd7d55..359c8dc0 100644 --- a/test/helpers.test.ts +++ b/test/helpers.test.ts @@ -1,6 +1,17 @@ -import { empty, includes, pymod, divmod, split, clone, range, repeat, isPresent, isArray } from '../src/helpers' +import { + empty, + includes, + pymod, + divmod, + split, + clone, + range, + repeat, + isPresent, + isArray, +} from '../src/helpers' import { expect } from 'chai' -import { isNumber } from 'util'; +import { isNumber } from 'util' describe('isPresent', () => { it('is false if object is null', () => { @@ -95,7 +106,11 @@ describe('divmod', () => { describe('split', () => { it('splits on the separator', () => { - expect(split('one-two-three', '-', 0)).to.deep.equal(['one', 'two', 'three']) + expect(split('one-two-three', '-', 0)).to.deep.equal([ + 'one', + 'two', + 'three', + ]) }) it('only splits the specified number when nonzero', () => { @@ -129,4 +144,4 @@ describe('repeat', () => { it('repeats an array', () => { expect(repeat(['foo'], 3)).to.deep.equal([['foo'], ['foo'], ['foo']]) }) -}) \ No newline at end of file +}) diff --git a/test/lib/utils.ts b/test/lib/utils.ts index 708f8746..decc33b7 100644 --- a/test/lib/utils.ts +++ b/test/lib/utils.ts @@ -2,14 +2,21 @@ import { expect } from 'chai' import { ExclusiveTestFunction, TestFunction } from 'mocha' import { RRule, RRuleSet } from '../../src' -const assertDatesEqual = function (actual: Date | Date[], expected: Date | Date[], msg?: string) { +const assertDatesEqual = function ( + actual: Date | Date[], + expected: Date | Date[], + msg?: string +) { msg = msg ? ' [' + msg + '] ' : '' if (!(actual instanceof Array)) actual = [actual] if (!(expected instanceof Array)) expected = [expected] if (expected.length > 1) { - expect(actual).to.have.length(expected.length, msg + 'number of recurrences') + expect(actual).to.have.length( + expected.length, + msg + 'number of recurrences' + ) msg = ' - ' } @@ -17,7 +24,9 @@ const assertDatesEqual = function (actual: Date | Date[], expected: Date | Date[ const act = actual[i] const exp = expected[i] expect(exp instanceof Date ? exp.toString() : exp).to.equal( - act.toString(), msg + (i + 1) + '/' + expected.length) + act.toString(), + msg + (i + 1) + '/' + expected.length + ) } } @@ -28,11 +37,25 @@ const extractTime = function (date: Date) { /** * datetime.datetime */ -export const datetime = function (y: number, m: number, d: number, h: number = 0, i: number = 0, s: number = 0) { +export const datetime = function ( + y: number, + m: number, + d: number, + h: number = 0, + i: number = 0, + s: number = 0 +) { return new Date(Date.UTC(y, m - 1, d, h, i, s)) } -export const datetimeUTC = function (y: number, m: number, d: number, h: number = 0, i: number = 0, s: number = 0) { +export const datetimeUTC = function ( + y: number, + m: number, + d: number, + h: number = 0, + i: number = 0, + s: number = 0 +) { return new Date(Date.UTC(y, m - 1, d, h, i, s)) } @@ -41,7 +64,7 @@ export const datetimeUTC = function (y: number, m: number, d: number, h: number */ export const parse = function (str: string) { const parts = str.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})/) - let [ _, y, m, d, h, i, s ] = parts + let [_, y, m, d, h, i, s] = parts const year = Number(y) const month = Number(m[0] === '0' ? m[1] : m) - 1 const day = Number(d[0] === '0' ? d[1] : d) @@ -61,7 +84,7 @@ export const testRecurring = function ( msg: string, testObj: any, expectedDates: Date | Date[], - itFunc: TestFunction | ExclusiveTestFunction = it, + itFunc: TestFunction | ExclusiveTestFunction = it ) { let rule: any let method: string @@ -83,9 +106,14 @@ export const testRecurring = function ( // Use text and string representation of the rrule as the message. if (rule instanceof RRule) { - msg = msg + ' [' + + msg = + msg + + ' [' + (rule.isFullyConvertibleToText() ? rule.toText() : 'no text repr') + - ']' + ' [' + rule.toString() + ']' + ']' + + ' [' + + rule.toString() + + ']' } else { msg = msg + ' ' + rule.toString() } @@ -97,8 +125,10 @@ export const testRecurring = function ( time = Date.now() - time const maxTestDuration = 200 - expect(time).to.be.lessThan(maxTestDuration, - `${rule}\' method "${method}" should finish in ${maxTestDuration} ms, but took ${time} ms`) + expect(time).to.be.lessThan( + maxTestDuration, + `${rule}\' method "${method}" should finish in ${maxTestDuration} ms, but took ${time} ms` + ) if (!(actualDates instanceof Array)) actualDates = [actualDates] if (!(expectedDates instanceof Array)) expectedDates = [expectedDates] @@ -109,7 +139,9 @@ export const testRecurring = function ( // ========================================================== if (ctx.ALSO_TEST_SUBSECOND_PRECISION) { - expect(actualDates.map(extractTime)).to.deep.equal(expectedDates.map(extractTime)) + expect(actualDates.map(extractTime)).to.deep.equal( + expectedDates.map(extractTime) + ) } if (ctx.ALSO_TEST_STRING_FUNCTIONS) { @@ -117,13 +149,20 @@ export const testRecurring = function ( const str = rule.toString() const rrule2 = RRule.fromString(str) const string2 = rrule2.toString() - expect(str).to.equal(string2, 'toString() == fromString(toString()).toString()') + expect(str).to.equal( + string2, + 'toString() == fromString(toString()).toString()' + ) if (method === 'all') { assertDatesEqual(rrule2.all(), expectedDates, 'fromString().all()') } } - if (ctx.ALSO_TEST_NLP_FUNCTIONS && rule.isFullyConvertibleToText && rule.isFullyConvertibleToText()) { + if ( + ctx.ALSO_TEST_NLP_FUNCTIONS && + rule.isFullyConvertibleToText && + rule.isFullyConvertibleToText() + ) { // Test fromText()/toText(). const str = rule.toString() const text = rule.toText() @@ -133,7 +172,10 @@ export const testRecurring = function ( // Test fromText()/toString(). const rrule3 = RRule.fromText(text, rule.options.dtstart) - expect(rrule3.toString()).to.equal(str, 'toString() == fromText(toText()).toString()') + expect(rrule3.toString()).to.equal( + str, + 'toString() == fromText(toText()).toString()' + ) } if (method === 'all' && ctx.ALSO_TEST_BEFORE_AFTER_BETWEEN) { @@ -178,8 +220,14 @@ export const testRecurring = function ( assertDatesEqual(rule.before(date, true), date, 'before, inc=true') // Test after() and before() with inc=false. - next && assertDatesEqual(rule.after(date, false), next, 'after, inc=false') - prev && assertDatesEqual(rule.before(date, false), prev, 'before, inc=false') + next && + assertDatesEqual(rule.after(date, false), next, 'after, inc=false') + prev && + assertDatesEqual( + rule.before(date, false), + prev, + 'before, inc=false' + ) } } } @@ -194,11 +242,19 @@ testRecurring.skip = function () { it.skip.apply(it, arguments) } -export function expectedDate(startDate: Date, currentLocalDate: Date, targetZone: string): Date { +export function expectedDate( + startDate: Date, + currentLocalDate: Date, + targetZone: string +): Date { // get the tzoffset between the client tz and the target tz const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone - const dateInLocalTZ = new Date(startDate.toLocaleString(undefined, { timeZone: localTimeZone })) - const dateInTargetTZ = new Date(startDate.toLocaleString(undefined, { timeZone: targetZone })) + const dateInLocalTZ = new Date( + startDate.toLocaleString(undefined, { timeZone: localTimeZone }) + ) + const dateInTargetTZ = new Date( + startDate.toLocaleString(undefined, { timeZone: targetZone }) + ) const tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime() return new Date(startDate.getTime() - tzOffset) diff --git a/test/nlp.test.ts b/test/nlp.test.ts index b9b89cd9..254114c9 100644 --- a/test/nlp.test.ts +++ b/test/nlp.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai' -import { RRule } from '../src'; -import { optionsToString } from '../src/optionstostring'; -import {DateFormatter} from '../src/nlp/totext' +import { RRule } from '../src' +import { optionsToString } from '../src/optionstostring' +import { DateFormatter } from '../src/nlp/totext' const texts = [ ['Every day', 'RRULE:FREQ=DAILY'], @@ -25,7 +25,7 @@ const texts = [ ['Every month on the last Monday', 'RRULE:FREQ=MONTHLY;BYDAY=-1MO'], ['Every month on the 2nd last Friday', 'RRULE:FREQ=MONTHLY;BYDAY=-2FR'], // ['Every week until January 1, 2007', 'RRULE:FREQ=WEEKLY;UNTIL=20070101T080000Z'], - ['Every week for 20 times', 'RRULE:FREQ=WEEKLY;COUNT=20'] + ['Every week for 20 times', 'RRULE:FREQ=WEEKLY;COUNT=20'], ] describe('NLP', () => { @@ -41,8 +41,10 @@ describe('NLP', () => { texts.forEach(function (item) { const text = item[0] const str = item[1] - expect(RRule.fromString(str).toText().toLowerCase()).equals(text.toLowerCase(), - str + ' => ' + text) + expect(RRule.fromString(str).toText().toLowerCase()).equals( + text.toLowerCase(), + str + ' => ' + text + ) }) }) @@ -50,14 +52,17 @@ describe('NLP', () => { texts.forEach(function (item) { const text = item[0] const str = item[1] - expect(optionsToString(RRule.parseText(text))).equals(str, text + ' => ' + str) + expect(optionsToString(RRule.parseText(text))).equals( + str, + text + ' => ' + str + ) }) }) it('permits integers in byweekday (#153)', () => { const rrule = new RRule({ freq: RRule.WEEKLY, - byweekday: 0 + byweekday: 0, }) expect(rrule.toText()).to.equal('every week on Monday') @@ -65,48 +70,60 @@ describe('NLP', () => { }) it('sorts monthdays correctly (#101)', () => { - const options = { "freq": 2, "bymonthday": [3, 10, 17, 24] } + const options = { freq: 2, bymonthday: [3, 10, 17, 24] } const rule = new RRule(options) expect(rule.toText()).to.equal('every week on the 3rd, 10th, 17th and 24th') }) it('shows correct text for every day', () => { - const options = { "freq": RRule.WEEKLY, byweekday: [ - RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR, RRule.SA, RRule.SU - ]} + const options = { + freq: RRule.WEEKLY, + byweekday: [ + RRule.MO, + RRule.TU, + RRule.WE, + RRule.TH, + RRule.FR, + RRule.SA, + RRule.SU, + ], + } const rule = new RRule(options) expect(rule.toText()).to.equal('every day') }) it('shows correct text for every minute', () => { - const options = { 'freq': RRule.MINUTELY }; - const rule = new RRule(options); - expect(rule.toText()).to.equal('every minute'); - }); + const options = { freq: RRule.MINUTELY } + const rule = new RRule(options) + expect(rule.toText()).to.equal('every minute') + }) it('shows correct text for every (plural) minutes', () => { - const options = { 'freq': RRule.MINUTELY, 'interval': 2 }; - const rule = new RRule(options); - expect(rule.toText()).to.equal('every 2 minutes'); - }); + const options = { freq: RRule.MINUTELY, interval: 2 } + const rule = new RRule(options) + expect(rule.toText()).to.equal('every 2 minutes') + }) - it('by default formats \'until\' correctly', () => { + it("by default formats 'until' correctly", () => { const rrule = new RRule({ freq: RRule.WEEKLY, - until: new Date(Date.UTC(2012, 10, 10)) + until: new Date(Date.UTC(2012, 10, 10)), }) expect(rrule.toText()).to.equal('every week until November 10, 2012') }) - it('formats \'until\' as desired if asked', () => { + it("formats 'until' as desired if asked", () => { const rrule = new RRule({ freq: RRule.WEEKLY, - until: new Date(Date.UTC(2012, 10, 10)) + until: new Date(Date.UTC(2012, 10, 10)), }) - const dateFormatter: DateFormatter = (year, month, day) => `${day}. ${month}, ${year}` + const dateFormatter: DateFormatter = (year, month, day) => + `${day}. ${month}, ${year}` - expect(rrule.toText(undefined, undefined, dateFormatter)).to.equal('every week until 10. November, 2012') + expect(rrule.toText(undefined, undefined, dateFormatter)).to.equal( + 'every week until 10. November, 2012' + ) }) -}) \ No newline at end of file +}) diff --git a/test/optionstostring.test.ts b/test/optionstostring.test.ts index 81449e3b..01e670e0 100644 --- a/test/optionstostring.test.ts +++ b/test/optionstostring.test.ts @@ -1,23 +1,37 @@ -import { Options } from "../src/types"; -import { RRule } from "../src/rrule"; -import { optionsToString } from "../src/optionstostring"; -import { expect } from "chai"; +import { Options } from '../src/types' +import { RRule } from '../src/rrule' +import { optionsToString } from '../src/optionstostring' +import { expect } from 'chai' describe('optionsToString', () => { it('serializes valid single lines of rrules', function () { - const expectations: ([ Partial, string ][]) = [ - [{ freq: RRule.WEEKLY, until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) }, 'RRULE:FREQ=WEEKLY;UNTIL=20100101T000000Z' ], - [{ dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), tzid: 'America/New_York' }, 'DTSTART;TZID=America/New_York:19970902T090000' ], + const expectations: [Partial, string][] = [ [ - { dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), freq: RRule.WEEKLY }, - 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=WEEKLY' + { freq: RRule.WEEKLY, until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) }, + 'RRULE:FREQ=WEEKLY;UNTIL=20100101T000000Z', ], [ - { dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), tzid: 'America/New_York', freq: RRule.WEEKLY }, - 'DTSTART;TZID=America/New_York:19970902T090000\n' + - 'RRULE:FREQ=WEEKLY' - ] + { + dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), + tzid: 'America/New_York', + }, + 'DTSTART;TZID=America/New_York:19970902T090000', + ], + [ + { + dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), + freq: RRule.WEEKLY, + }, + 'DTSTART:19970902T090000Z\n' + 'RRULE:FREQ=WEEKLY', + ], + [ + { + dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), + tzid: 'America/New_York', + freq: RRule.WEEKLY, + }, + 'DTSTART;TZID=America/New_York:19970902T090000\n' + 'RRULE:FREQ=WEEKLY', + ], ] expectations.forEach(function (item) { diff --git a/test/parsestring.test.ts b/test/parsestring.test.ts index 65b4f7a4..eef64030 100644 --- a/test/parsestring.test.ts +++ b/test/parsestring.test.ts @@ -1,17 +1,35 @@ import { RRule } from '../src/rrule' import { expect } from 'chai' import { parseString } from '../src/parsestring' -import { Options, Frequency } from '../src/types'; +import { Options, Frequency } from '../src/types' describe('parseString', () => { it('parses valid single lines of rrules', function () { - const expectations: ([ string, Partial][]) = [ - ['FREQ=WEEKLY;UNTIL=20100101T000000Z', { freq: RRule.WEEKLY, until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) }], + const expectations: [string, Partial][] = [ + [ + 'FREQ=WEEKLY;UNTIL=20100101T000000Z', + { freq: RRule.WEEKLY, until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) }, + ], // Parse also `date` but return `date-time` - ['FREQ=WEEKLY;UNTIL=20100101', { freq: RRule.WEEKLY, until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) }], - ['DTSTART;TZID=America/New_York:19970902T090000', { dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), tzid: 'America/New_York' }], - ['RRULE:DTSTART;TZID=America/New_York:19970902T090000', { dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), tzid: 'America/New_York' }] + [ + 'FREQ=WEEKLY;UNTIL=20100101', + { freq: RRule.WEEKLY, until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) }, + ], + [ + 'DTSTART;TZID=America/New_York:19970902T090000', + { + dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), + tzid: 'America/New_York', + }, + ], + [ + 'RRULE:DTSTART;TZID=America/New_York:19970902T090000', + { + dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), + tzid: 'America/New_York', + }, + ], ] expectations.forEach(function (item) { @@ -22,25 +40,24 @@ describe('parseString', () => { }) it('parses multiline rules', () => { - const expectations: ([ string, Partial][]) = [ + const expectations: [string, Partial][] = [ [ 'DTSTART;TZID=America/New_York:19970902T090000\nRRULE:FREQ=WEEKLY;UNTIL=20100101T000000Z', { dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), tzid: 'America/New_York', freq: RRule.WEEKLY, - until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)) - } + until: new Date(Date.UTC(2010, 0, 1, 0, 0, 0)), + }, ], [ - 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3\n', + 'DTSTART:19970902T090000Z\n' + 'RRULE:FREQ=YEARLY;COUNT=3\n', { dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), freq: RRule.YEARLY, - count: 3 - } - ] + count: 3, + }, + ], ] expectations.forEach(function (item) { @@ -51,12 +68,15 @@ describe('parseString', () => { }) it('parses legacy dtstart in rrule', () => { - const expectations: ([ string, Partial][]) = [ - ['RRULE:FREQ=WEEKLY;DTSTART;TZID=America/New_York:19970902T090000', { - freq: Frequency.WEEKLY, - dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), - tzid: 'America/New_York' - }] + const expectations: [string, Partial][] = [ + [ + 'RRULE:FREQ=WEEKLY;DTSTART;TZID=America/New_York:19970902T090000', + { + freq: Frequency.WEEKLY, + dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), + tzid: 'America/New_York', + }, + ], ] expectations.forEach(function (item) { diff --git a/test/rrule.test.ts b/test/rrule.test.ts index 9c15a16a..a20d6a4f 100644 --- a/test/rrule.test.ts +++ b/test/rrule.test.ts @@ -25,15 +25,16 @@ describe('RRule', function () { const s2 = rrulestr(s1).toString() expect(s1).equals(s2, s1 + ' => ' + s2) }) - + it('rrulestr itteration not infinite when interval 0', function () { - ['FREQ=YEARLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', - 'FREQ=MONTHLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', - 'FREQ=DAILY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', - 'FREQ=HOURLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', - 'FREQ=MINUTELY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', - 'FREQ=SECONDLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO'] - .map((s) => expect(rrulestr(s).count()).to.equal(0)) + ;[ + 'FREQ=YEARLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', + 'FREQ=MONTHLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', + 'FREQ=DAILY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', + 'FREQ=HOURLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', + 'FREQ=MINUTELY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', + 'FREQ=SECONDLY;INTERVAL=0;BYSETPOS=1;BYDAY=MO', + ].map((s) => expect(rrulestr(s).count()).to.equal(0)) }) it('does not mutate the passed-in options object', function () { @@ -41,7 +42,7 @@ describe('RRule', function () { freq: RRule.MONTHLY, dtstart: new Date(2013, 0, 1), count: 3, - bymonthday: [28] + bymonthday: [28], } const rule = new RRule(options) @@ -49,3481 +50,3973 @@ describe('RRule', function () { freq: RRule.MONTHLY, dtstart: new Date(2013, 0, 1), count: 3, - bymonthday: [28] + bymonthday: [28], }) expect(rule.origOptions).deep.equals(options) }) - testRecurring('missing Feb 28 https://github.com/jakubroztocil/rrule/issues/21', + testRecurring( + 'missing Feb 28 https://github.com/jakubroztocil/rrule/issues/21', new RRule({ freq: RRule.MONTHLY, dtstart: new Date(Date.UTC(2013, 0, 1)), count: 3, - bymonthday: [28] + bymonthday: [28], }), [ new Date(Date.UTC(2013, 0, 28)), new Date(Date.UTC(2013, 1, 28)), - new Date(Date.UTC(2013, 2, 28)) + new Date(Date.UTC(2013, 2, 28)), ] ) // ============================================================================= - // The original `dateutil.rrule` test suite converted from Py to JS. - // ============================================================================= + // The original `dateutil.rrule` test suite converted from Py to JS. + // ============================================================================= - testRecurring('testBefore', + testRecurring( + 'testBefore', { rrule: new RRule({ freq: RRule.DAILY, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), method: 'before', - args: [parse('19970905T090000')] + args: [parse('19970905T090000')], }, datetime(1997, 9, 4, 9, 0) ) - testRecurring('testBeforeInc', + testRecurring( + 'testBeforeInc', { rrule: new RRule({ freq: RRule.DAILY, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), method: 'before', - args: [parse('19970905T090000'), true] + args: [parse('19970905T090000'), true], }, datetime(1997, 9, 5, 9, 0) ) - testRecurring('testAfter', + testRecurring( + 'testAfter', { rrule: new RRule({ freq: RRule.DAILY, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), method: 'after', - args: [parse('19970904T090000')] + args: [parse('19970904T090000')], }, datetime(1997, 9, 5, 9, 0) ) - testRecurring('testAfterInc', + testRecurring( + 'testAfterInc', { rrule: new RRule({ freq: RRule.DAILY, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), method: 'after', - args: [parse('19970904T090000'), true] + args: [parse('19970904T090000'), true], }, datetime(1997, 9, 4, 9, 0) ) - testRecurring('testBetween', + testRecurring( + 'testBetween', { rrule: new RRule({ freq: RRule.DAILY, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), method: 'between', - args: [parse('19970902T090000'), parse('19970906T090000')] + args: [parse('19970902T090000'), parse('19970906T090000')], }, [ datetime(1997, 9, 3, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 5, 9, 0) + datetime(1997, 9, 5, 9, 0), ] ) - testRecurring('testBetweenInc', + testRecurring( + 'testBetweenInc', { rrule: new RRule({ freq: RRule.DAILY, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), method: 'between', - args: [parse('19970902T090000'), parse('19970906T090000'), true] + args: [parse('19970902T090000'), parse('19970906T090000'), true], }, [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 9, 0), datetime(1997, 9, 4, 9, 0), datetime(1997, 9, 5, 9, 0), - datetime(1997, 9, 6, 9, 0) + datetime(1997, 9, 6, 9, 0), ] ) - testRecurring('testYearly', + testRecurring( + 'testYearly', new RRule({ freq: RRule.YEARLY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1998, 9, 2, 9, 0), - datetime(1999, 9, 2, 9, 0) + datetime(1999, 9, 2, 9, 0), ] ) - testRecurring('testYearlyInterval', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyInterval', + new RRule({ + freq: RRule.YEARLY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1999, 9, 2, 9, 0), - datetime(2001, 9, 2, 9, 0) + datetime(2001, 9, 2, 9, 0), ] ) - testRecurring('testYearlyIntervalLarge', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyIntervalLarge', + new RRule({ + freq: RRule.YEARLY, count: 3, interval: 100, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(2097, 9, 2, 9, 0), - datetime(2197, 9, 2, 9, 0) + datetime(2197, 9, 2, 9, 0), ] ) - testRecurring('testYearlyByMonth', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonth', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 2, 9, 0), datetime(1998, 3, 2, 9, 0), - datetime(1999, 1, 2, 9, 0) + datetime(1999, 1, 2, 9, 0), ] ) - testRecurring('testYearlyByMonthDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthDay', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 9, 0), datetime(1997, 10, 1, 9, 0), - datetime(1997, 10, 3, 9, 0) + datetime(1997, 10, 3, 9, 0), ] ) - testRecurring('testYearlyByMonthAndMonthDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndMonthDay', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 9, 0), datetime(1998, 1, 7, 9, 0), - datetime(1998, 3, 5, 9, 0) + datetime(1998, 3, 5, 9, 0), ] ) - testRecurring('testYearlyByWeekDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByWeekDay', + new RRule({ + freq: RRule.YEARLY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testYearlyByNWeekDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByNWeekDay', + new RRule({ + freq: RRule.YEARLY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 25, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 12, 31, 9, 0) + datetime(1998, 12, 31, 9, 0), ] ) - testRecurring('testYearlyByNWeekDayLarge', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByNWeekDayLarge', + new RRule({ + freq: RRule.YEARLY, count: 3, byweekday: [RRule.TU.nth(13), RRule.TH.nth(-13)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 10, 2, 9, 0), datetime(1998, 3, 31, 9, 0), - datetime(1998, 10, 8, 9, 0) + datetime(1998, 10, 8, 9, 0), ] ) - testRecurring('testYearlyByMonthAndWeekDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndWeekDay', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 1, 8, 9, 0) + datetime(1998, 1, 8, 9, 0), ] ) - testRecurring('testYearlyByMonthAndNWeekDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndNWeekDay', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 6, 9, 0), datetime(1998, 1, 29, 9, 0), - datetime(1998, 3, 3, 9, 0) + datetime(1998, 3, 3, 9, 0), ] ) - testRecurring('testYearlyByMonthAndNWeekDayLarge', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndNWeekDayLarge', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(3), RRule.TH.nth(-3)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 15, 9, 0), datetime(1998, 1, 20, 9, 0), - datetime(1998, 3, 12, 9, 0) + datetime(1998, 3, 12, 9, 0), ] ) - testRecurring('testYearlyByMonthDayAndWeekDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 2, 3, 9, 0), - datetime(1998, 3, 3, 9, 0) + datetime(1998, 3, 3, 9, 0), ] ) - testRecurring('testYearlyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 3, 3, 9, 0), - datetime(2001, 3, 1, 9, 0) + datetime(2001, 3, 1, 9, 0), ] ) - testRecurring('testYearlyByYearDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByYearDay', + new RRule({ + freq: RRule.YEARLY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testYearlyByYearDayNeg', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByYearDayNeg', + new RRule({ + freq: RRule.YEARLY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testYearlyByMonthAndYearDay', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndYearDay', + new RRule({ + freq: RRule.YEARLY, count: 4, bymonth: [4, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 4, 10, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testYearlyByMonthAndYearDayNeg', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.YEARLY, count: 4, bymonth: [4, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 4, 10, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testYearlyByWeekNo', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByWeekNo', + new RRule({ + freq: RRule.YEARLY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 9, 0), datetime(1998, 5, 12, 9, 0), - datetime(1998, 5, 13, 9, 0) + datetime(1998, 5, 13, 9, 0), ] ) - testRecurring('testYearlyByWeekNoAndWeekDay', + testRecurring( + 'testYearlyByWeekNoAndWeekDay', // That's a nice one. The first days of week number one // may be in the last year. - new RRule({freq: RRule.YEARLY, + new RRule({ + freq: RRule.YEARLY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 9, 0), datetime(1999, 1, 4, 9, 0), - datetime(2000, 1, 3, 9, 0) + datetime(2000, 1, 3, 9, 0), ] ) - testRecurring('testYearlyByWeekNoAndWeekDayLarge', + testRecurring( + 'testYearlyByWeekNoAndWeekDayLarge', // Another nice test. The last days of week number 52/53 // may be in the next year. - new RRule({freq: RRule.YEARLY, + new RRule({ + freq: RRule.YEARLY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1998, 12, 27, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testYearlyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.YEARLY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1999, 1, 3, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testYearlyByEaster', - new RRule({ count: 3, - byeaster: 0, - dtstart: parse('19970902T090000') - }), + testRecurring( + 'testYearlyByEaster', + new RRule({ count: 3, byeaster: 0, dtstart: parse('19970902T090000') }), [ datetime(1998, 4, 12, 9, 0), datetime(1999, 4, 4, 9, 0), - datetime(2000, 4, 23, 9, 0) + datetime(2000, 4, 23, 9, 0), ] ) - testRecurring('testYearlyByEasterPos', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByEasterPos', + new RRule({ + freq: RRule.YEARLY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 9, 0), datetime(1999, 4, 5, 9, 0), - datetime(2000, 4, 24, 9, 0) + datetime(2000, 4, 24, 9, 0), ] ) - testRecurring('testYearlyByEasterNeg', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByEasterNeg', + new RRule({ + freq: RRule.YEARLY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 9, 0), datetime(1999, 4, 3, 9, 0), - datetime(2000, 4, 22, 9, 0) + datetime(2000, 4, 22, 9, 0), ] ) - testRecurring('testYearlyByWeekNoAndWeekDay53', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.YEARLY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 9, 0), datetime(2004, 12, 27, 9, 0), - datetime(2009, 12, 28, 9, 0) + datetime(2009, 12, 28, 9, 0), ] ) - testRecurring('testYearlyByHour', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByHour', + new RRule({ + freq: RRule.YEARLY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1998, 9, 2, 6, 0), - datetime(1998, 9, 2, 18, 0) + datetime(1998, 9, 2, 18, 0), ] ) - testRecurring('testYearlyByMinute', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMinute', + new RRule({ + freq: RRule.YEARLY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6), datetime(1997, 9, 2, 9, 18), - datetime(1998, 9, 2, 9, 6) + datetime(1998, 9, 2, 9, 6), ] ) - testRecurring('testYearlyBySecond', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyBySecond', + new RRule({ + freq: RRule.YEARLY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1998, 9, 2, 9, 0, 6) + datetime(1998, 9, 2, 9, 0, 6), ] ) - testRecurring('testYearlyByHourAndMinute', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByHourAndMinute', + new RRule({ + freq: RRule.YEARLY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6), datetime(1997, 9, 2, 18, 18), - datetime(1998, 9, 2, 6, 6) + datetime(1998, 9, 2, 6, 6), ] ) - testRecurring('testYearlyByHourAndSecond', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByHourAndSecond', + new RRule({ + freq: RRule.YEARLY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1998, 9, 2, 6, 0, 6) + datetime(1998, 9, 2, 6, 0, 6), ] ) - testRecurring('testYearlyByMinuteAndSecond', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByMinuteAndSecond', + new RRule({ + freq: RRule.YEARLY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testYearlyByHourAndMinuteAndSecond', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.YEARLY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testYearlyBySetPos', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testYearlyBySetPos', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonthday: 15, byhour: [6, 18], bysetpos: [3, -3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 11, 15, 18, 0), datetime(1998, 2, 15, 6, 0), - datetime(1998, 11, 15, 18, 0) + datetime(1998, 11, 15, 18, 0), ] ) - testRecurring('testYearlyBetweenInc', + testRecurring( + 'testYearlyBetweenInc', { rrule: new RRule({ freq: RRule.YEARLY, - dtstart: parse('20150101T000000') + dtstart: parse('20150101T000000'), }), method: 'between', - args: [parse('20160101T000000'), parse('20160101T000000'), true] + args: [parse('20160101T000000'), parse('20160101T000000'), true], }, - [ - datetime(2016, 1, 1) - ] + [datetime(2016, 1, 1)] ) - testRecurring('testYearlyBetweenIncLargeSpan', + testRecurring( + 'testYearlyBetweenIncLargeSpan', { rrule: new RRule({ freq: RRule.YEARLY, - dtstart: parse('19200101T000000') // Error because date lower than dateutil.ORDINAL_BASE + dtstart: parse('19200101T000000'), // Error because date lower than dateutil.ORDINAL_BASE }), method: 'between', - args: [parse('20160101T000000'), parse('20160101T000000'), true] + args: [parse('20160101T000000'), parse('20160101T000000'), true], }, - [ - datetime(2016, 1, 1) - ] + [datetime(2016, 1, 1)] ) - testRecurring('testMonthly', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthly', + new RRule({ + freq: RRule.MONTHLY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 10, 2, 9, 0), - datetime(1997, 11, 2, 9, 0) + datetime(1997, 11, 2, 9, 0), ] ) - testRecurring('testMonthlyInterval', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyInterval', + new RRule({ + freq: RRule.MONTHLY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 11, 2, 9, 0), - datetime(1998, 1, 2, 9, 0) + datetime(1998, 1, 2, 9, 0), ] ) - testRecurring('testMonthlyIntervalLarge', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyIntervalLarge', + new RRule({ + freq: RRule.MONTHLY, count: 3, interval: 18, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1999, 3, 2, 9, 0), - datetime(2000, 9, 2, 9, 0) + datetime(2000, 9, 2, 9, 0), ] ) - testRecurring('testMonthlyByMonth', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonth', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 2, 9, 0), datetime(1998, 3, 2, 9, 0), - datetime(1999, 1, 2, 9, 0) + datetime(1999, 1, 2, 9, 0), ] ) - testRecurring('testMonthlyByMonthDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 9, 0), datetime(1997, 10, 1, 9, 0), - datetime(1997, 10, 3, 9, 0) + datetime(1997, 10, 3, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndMonthDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndMonthDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 9, 0), datetime(1998, 1, 7, 9, 0), - datetime(1998, 3, 5, 9, 0) + datetime(1998, 3, 5, 9, 0), ] ) - testRecurring('testMonthlyByWeekDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByWeekDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testMonthlyByNWeekDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByNWeekDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 25, 9, 0), - datetime(1997, 10, 7, 9, 0) + datetime(1997, 10, 7, 9, 0), ] ) - testRecurring('testMonthlyByNWeekDayLarge', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByNWeekDayLarge', + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekday: [RRule.TU.nth(3), RRule.TH.nth(-3)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 11, 9, 0), datetime(1997, 9, 16, 9, 0), - datetime(1997, 10, 16, 9, 0) + datetime(1997, 10, 16, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndWeekDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndWeekDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 1, 8, 9, 0) + datetime(1998, 1, 8, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndNWeekDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndNWeekDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 6, 9, 0), datetime(1998, 1, 29, 9, 0), - datetime(1998, 3, 3, 9, 0) + datetime(1998, 3, 3, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndNWeekDayLarge', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndNWeekDayLarge', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(3), RRule.TH.nth(-3)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 15, 9, 0), datetime(1998, 1, 20, 9, 0), - datetime(1998, 3, 12, 9, 0) + datetime(1998, 3, 12, 9, 0), ] ) - testRecurring('testMonthlyByMonthDayAndWeekDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 2, 3, 9, 0), - datetime(1998, 3, 3, 9, 0) + datetime(1998, 3, 3, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 3, 3, 9, 0), - datetime(2001, 3, 1, 9, 0) + datetime(2001, 3, 1, 9, 0), ] ) - testRecurring('testMonthlyByYearDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByYearDay', + new RRule({ + freq: RRule.MONTHLY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testMonthlyByYearDayNeg', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByYearDayNeg', + new RRule({ + freq: RRule.MONTHLY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndYearDay', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndYearDay', + new RRule({ + freq: RRule.MONTHLY, count: 4, bymonth: [4, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 4, 10, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testMonthlyByMonthAndYearDayNeg', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.MONTHLY, count: 4, bymonth: [4, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 4, 10, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testMonthlyByWeekNo', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByWeekNo', + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 9, 0), datetime(1998, 5, 12, 9, 0), - datetime(1998, 5, 13, 9, 0) + datetime(1998, 5, 13, 9, 0), ] ) - testRecurring('testMonthlyByWeekNoAndWeekDay', + testRecurring( + 'testMonthlyByWeekNoAndWeekDay', // That's a nice one. The first days of week number one // may be in the last year. - new RRule({freq: RRule.MONTHLY, + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 9, 0), datetime(1999, 1, 4, 9, 0), - datetime(2000, 1, 3, 9, 0) + datetime(2000, 1, 3, 9, 0), ] ) - testRecurring('testMonthlyByWeekNoAndWeekDayLarge', + testRecurring( + 'testMonthlyByWeekNoAndWeekDayLarge', // Another nice test. The last days of week number 52/53 // may be in the next year. - new RRule({freq: RRule.MONTHLY, + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1998, 12, 27, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testMonthlyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1999, 1, 3, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testMonthlyByWeekNoAndWeekDay53', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.MONTHLY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 9, 0), datetime(2004, 12, 27, 9, 0), - datetime(2009, 12, 28, 9, 0) + datetime(2009, 12, 28, 9, 0), ] ) - testRecurring('testMonthlyByEaster', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByEaster', + new RRule({ + freq: RRule.MONTHLY, count: 3, byeaster: 0, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 12, 9, 0), datetime(1999, 4, 4, 9, 0), - datetime(2000, 4, 23, 9, 0) + datetime(2000, 4, 23, 9, 0), ] ) - testRecurring('testMonthlyByEasterPos', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByEasterPos', + new RRule({ + freq: RRule.MONTHLY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 9, 0), datetime(1999, 4, 5, 9, 0), - datetime(2000, 4, 24, 9, 0) + datetime(2000, 4, 24, 9, 0), ] ) - testRecurring('testMonthlyByEasterNeg', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByEasterNeg', + new RRule({ + freq: RRule.MONTHLY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 9, 0), datetime(1999, 4, 3, 9, 0), - datetime(2000, 4, 22, 9, 0) + datetime(2000, 4, 22, 9, 0), ] ) - testRecurring('testMonthlyByHour', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByHour', + new RRule({ + freq: RRule.MONTHLY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1997, 10, 2, 6, 0), - datetime(1997, 10, 2, 18, 0) + datetime(1997, 10, 2, 18, 0), ] ) - testRecurring('testMonthlyByMinute', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMinute', + new RRule({ + freq: RRule.MONTHLY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6), datetime(1997, 9, 2, 9, 18), - datetime(1997, 10, 2, 9, 6) + datetime(1997, 10, 2, 9, 6), ] ) - testRecurring('testMonthlyBySecond', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyBySecond', + new RRule({ + freq: RRule.MONTHLY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1997, 10, 2, 9, 0, 6) + datetime(1997, 10, 2, 9, 0, 6), ] ) - testRecurring('testMonthlyByHourAndMinute', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByHourAndMinute', + new RRule({ + freq: RRule.MONTHLY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6), datetime(1997, 9, 2, 18, 18), - datetime(1997, 10, 2, 6, 6) + datetime(1997, 10, 2, 6, 6), ] ) - testRecurring('testMonthlyByHourAndSecond', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByHourAndSecond', + new RRule({ + freq: RRule.MONTHLY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1997, 10, 2, 6, 0, 6) + datetime(1997, 10, 2, 6, 0, 6), ] ) - testRecurring('testMonthlyByMinuteAndSecond', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByMinuteAndSecond', + new RRule({ + freq: RRule.MONTHLY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testMonthlyByHourAndMinuteAndSecond', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.MONTHLY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testMonthlyBySetPos', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyBySetPos', + new RRule({ + freq: RRule.MONTHLY, count: 3, bymonthday: [13, 17], byhour: [6, 18], bysetpos: [3, -3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 13, 18, 0), datetime(1997, 9, 17, 6, 0), - datetime(1997, 10, 13, 18, 0) + datetime(1997, 10, 13, 18, 0), ] ) - testRecurring('testMonthlyNegByMonthDayJanFebForNonLeapYear', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyNegByMonthDayJanFebForNonLeapYear', + new RRule({ + freq: RRule.MONTHLY, count: 4, bymonthday: -1, - dtstart: parse('20131201T0900000') + dtstart: parse('20131201T0900000'), }), [ datetime(2013, 12, 31, 9, 0), datetime(2014, 1, 31, 9, 0), datetime(2014, 2, 28, 9, 0), - datetime(2014, 3, 31, 9, 0) + datetime(2014, 3, 31, 9, 0), ] ) - testRecurring('testMonthlyNegByMonthDayJanFebForLeapYear', - new RRule({freq: RRule.MONTHLY, + testRecurring( + 'testMonthlyNegByMonthDayJanFebForLeapYear', + new RRule({ + freq: RRule.MONTHLY, count: 4, bymonthday: -1, - dtstart: parse('20151201T0900000') + dtstart: parse('20151201T0900000'), }), [ datetime(2015, 12, 31, 9, 0), datetime(2016, 1, 31, 9, 0), datetime(2016, 2, 29, 9, 0), - datetime(2016, 3, 31, 9, 0) + datetime(2016, 3, 31, 9, 0), ] ) - testRecurring('testWeekly', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeekly', + new RRule({ + freq: RRule.WEEKLY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 9, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testWeeklyInterval', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyInterval', + new RRule({ + freq: RRule.WEEKLY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 16, 9, 0), - datetime(1997, 9, 30, 9, 0) + datetime(1997, 9, 30, 9, 0), ] ) - testRecurring('testWeeklyIntervalLarge', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyIntervalLarge', + new RRule({ + freq: RRule.WEEKLY, count: 3, interval: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1998, 1, 20, 9, 0), - datetime(1998, 6, 9, 9, 0) + datetime(1998, 6, 9, 9, 0), ] ) - testRecurring('testWeeklyByMonth', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonth', + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 6, 9, 0), datetime(1998, 1, 13, 9, 0), - datetime(1998, 1, 20, 9, 0) + datetime(1998, 1, 20, 9, 0), ] ) - testRecurring('testWeeklyByMonthDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 9, 0), datetime(1997, 10, 1, 9, 0), - datetime(1997, 10, 3, 9, 0) + datetime(1997, 10, 3, 9, 0), ] ) - testRecurring('testWeeklyByMonthAndMonthDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthAndMonthDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 9, 0), datetime(1998, 1, 7, 9, 0), - datetime(1998, 3, 5, 9, 0) + datetime(1998, 3, 5, 9, 0), ] ) - testRecurring('testWeeklyByWeekDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByWeekDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testWeeklyByNWeekDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByNWeekDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testWeeklyByMonthAndWeekDay', + testRecurring( + 'testWeeklyByMonthAndWeekDay', // This test is interesting, because it crosses the year // boundary in a weekly period to find day '1' as a // valid recurrence. - new RRule({freq: RRule.WEEKLY, + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 1, 8, 9, 0) + datetime(1998, 1, 8, 9, 0), ] ) - testRecurring('testWeeklyByMonthAndNWeekDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthAndNWeekDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 1, 8, 9, 0) + datetime(1998, 1, 8, 9, 0), ] ) - testRecurring('testWeeklyByMonthDayAndWeekDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 2, 3, 9, 0), - datetime(1998, 3, 3, 9, 0) + datetime(1998, 3, 3, 9, 0), ] ) - testRecurring('testWeeklyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.WEEKLY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 3, 3, 9, 0), - datetime(2001, 3, 1, 9, 0) + datetime(2001, 3, 1, 9, 0), ] ) - testRecurring('testWeeklyByYearDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByYearDay', + new RRule({ + freq: RRule.WEEKLY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testWeeklyByYearDayNeg', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByYearDayNeg', + new RRule({ + freq: RRule.WEEKLY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testWeeklyByMonthAndYearDay', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthAndYearDay', + new RRule({ + freq: RRule.WEEKLY, count: 4, bymonth: [1, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 1, 1, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testWeeklyByMonthAndYearDayNeg', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.WEEKLY, count: 4, bymonth: [1, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 1, 1, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testWeeklyByWeekNo', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByWeekNo', + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 9, 0), datetime(1998, 5, 12, 9, 0), - datetime(1998, 5, 13, 9, 0) + datetime(1998, 5, 13, 9, 0), ] ) - testRecurring('testWeeklyByWeekNoAndWeekDay', + testRecurring( + 'testWeeklyByWeekNoAndWeekDay', // That's a nice one. The first days of week number one // may be in the last year. - new RRule({freq: RRule.WEEKLY, + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 9, 0), datetime(1999, 1, 4, 9, 0), - datetime(2000, 1, 3, 9, 0) + datetime(2000, 1, 3, 9, 0), ] ) - testRecurring('testWeeklyByWeekNoAndWeekDayLarge', + testRecurring( + 'testWeeklyByWeekNoAndWeekDayLarge', // Another nice test. The last days of week number 52/53 // may be in the next year. - new RRule({freq: RRule.WEEKLY, + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1998, 12, 27, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testWeeklyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1999, 1, 3, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testWeeklyByWeekNoAndWeekDay53', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 9, 0), datetime(2004, 12, 27, 9, 0), - datetime(2009, 12, 28, 9, 0) + datetime(2009, 12, 28, 9, 0), ] ) - testRecurring('testWeeklyByEaster', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByEaster', + new RRule({ + freq: RRule.WEEKLY, count: 3, byeaster: 0, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 12, 9, 0), datetime(1999, 4, 4, 9, 0), - datetime(2000, 4, 23, 9, 0) + datetime(2000, 4, 23, 9, 0), ] ) - testRecurring('testWeeklyByEasterPos', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByEasterPos', + new RRule({ + freq: RRule.WEEKLY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 9, 0), datetime(1999, 4, 5, 9, 0), - datetime(2000, 4, 24, 9, 0) + datetime(2000, 4, 24, 9, 0), ] ) - testRecurring('testWeeklyByEasterNeg', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByEasterNeg', + new RRule({ + freq: RRule.WEEKLY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 9, 0), datetime(1999, 4, 3, 9, 0), - datetime(2000, 4, 22, 9, 0) + datetime(2000, 4, 22, 9, 0), ] ) - testRecurring('testWeeklyByHour', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByHour', + new RRule({ + freq: RRule.WEEKLY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1997, 9, 9, 6, 0), - datetime(1997, 9, 9, 18, 0) + datetime(1997, 9, 9, 18, 0), ] ) - testRecurring('testWeeklyByMinute', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMinute', + new RRule({ + freq: RRule.WEEKLY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6), datetime(1997, 9, 2, 9, 18), - datetime(1997, 9, 9, 9, 6) + datetime(1997, 9, 9, 9, 6), ] ) - testRecurring('testWeeklyBySecond', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyBySecond', + new RRule({ + freq: RRule.WEEKLY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1997, 9, 9, 9, 0, 6) + datetime(1997, 9, 9, 9, 0, 6), ] ) - testRecurring('testWeeklyByHourAndMinute', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByHourAndMinute', + new RRule({ + freq: RRule.WEEKLY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6), datetime(1997, 9, 2, 18, 18), - datetime(1997, 9, 9, 6, 6) + datetime(1997, 9, 9, 6, 6), ] ) - testRecurring('testWeeklyByHourAndSecond', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByHourAndSecond', + new RRule({ + freq: RRule.WEEKLY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1997, 9, 9, 6, 0, 6) + datetime(1997, 9, 9, 6, 0, 6), ] ) - testRecurring('testWeeklyByMinuteAndSecond', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByMinuteAndSecond', + new RRule({ + freq: RRule.WEEKLY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testWeeklyByHourAndMinuteAndSecond', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.WEEKLY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testWeeklyBySetPos', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWeeklyBySetPos', + new RRule({ + freq: RRule.WEEKLY, count: 3, byweekday: [RRule.TU, RRule.TH], byhour: [6, 18], bysetpos: [3, -3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1997, 9, 4, 6, 0), - datetime(1997, 9, 9, 18, 0) + datetime(1997, 9, 9, 18, 0), ] ) - testRecurring('testDaily', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDaily', + new RRule({ + freq: RRule.DAILY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 9, 0), - datetime(1997, 9, 4, 9, 0) + datetime(1997, 9, 4, 9, 0), ] ) - testRecurring('testDailyInterval', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyInterval', + new RRule({ + freq: RRule.DAILY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 6, 9, 0) + datetime(1997, 9, 6, 9, 0), ] ) - testRecurring('testDailyIntervalLarge', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyIntervalLarge', + new RRule({ + freq: RRule.DAILY, count: 3, interval: 92, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 12, 3, 9, 0), - datetime(1998, 3, 5, 9, 0) + datetime(1998, 3, 5, 9, 0), ] ) - testRecurring('testDailyByMonth', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonth', + new RRule({ + freq: RRule.DAILY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 2, 9, 0), - datetime(1998, 1, 3, 9, 0) + datetime(1998, 1, 3, 9, 0), ] ) - testRecurring('testDailyByMonthDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthDay', + new RRule({ + freq: RRule.DAILY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 9, 0), datetime(1997, 10, 1, 9, 0), - datetime(1997, 10, 3, 9, 0) + datetime(1997, 10, 3, 9, 0), ] ) - testRecurring('testDailyByMonthAndMonthDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthAndMonthDay', + new RRule({ + freq: RRule.DAILY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 9, 0), datetime(1998, 1, 7, 9, 0), - datetime(1998, 3, 5, 9, 0) + datetime(1998, 3, 5, 9, 0), ] ) - testRecurring('testDailyByWeekDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByWeekDay', + new RRule({ + freq: RRule.DAILY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testDailyByNWeekDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByNWeekDay', + new RRule({ + freq: RRule.DAILY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testDailyByMonthAndWeekDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthAndWeekDay', + new RRule({ + freq: RRule.DAILY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 1, 8, 9, 0) + datetime(1998, 1, 8, 9, 0), ] ) - testRecurring('testDailyByMonthAndNWeekDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthAndNWeekDay', + new RRule({ + freq: RRule.DAILY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), - datetime(1998, 1, 8, 9, 0) + datetime(1998, 1, 8, 9, 0), ] ) - testRecurring('testDailyByMonthDayAndWeekDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.DAILY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 2, 3, 9, 0), - datetime(1998, 3, 3, 9, 0) + datetime(1998, 3, 3, 9, 0), ] ) - testRecurring('testDailyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.DAILY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 3, 3, 9, 0), - datetime(2001, 3, 1, 9, 0) + datetime(2001, 3, 1, 9, 0), ] ) - testRecurring('testDailyByYearDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByYearDay', + new RRule({ + freq: RRule.DAILY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testDailyByYearDayNeg', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByYearDayNeg', + new RRule({ + freq: RRule.DAILY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 9, 0), datetime(1998, 1, 1, 9, 0), datetime(1998, 4, 10, 9, 0), - datetime(1998, 7, 19, 9, 0) + datetime(1998, 7, 19, 9, 0), ] ) - testRecurring('testDailyByMonthAndYearDay', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthAndYearDay', + new RRule({ + freq: RRule.DAILY, count: 4, bymonth: [1, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 1, 1, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testDailyByMonthAndYearDayNeg', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.DAILY, count: 4, bymonth: [1, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 9, 0), datetime(1998, 7, 19, 9, 0), datetime(1999, 1, 1, 9, 0), - datetime(1999, 7, 19, 9, 0) + datetime(1999, 7, 19, 9, 0), ] ) - testRecurring('testDailyByWeekNo', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByWeekNo', + new RRule({ + freq: RRule.DAILY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 9, 0), datetime(1998, 5, 12, 9, 0), - datetime(1998, 5, 13, 9, 0) + datetime(1998, 5, 13, 9, 0), ] ) - testRecurring('testDailyByWeekNoAndWeekDay', + testRecurring( + 'testDailyByWeekNoAndWeekDay', // That's a nice one. The first days of week number one // may be in the last year. - new RRule({freq: RRule.DAILY, + new RRule({ + freq: RRule.DAILY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 9, 0), datetime(1999, 1, 4, 9, 0), - datetime(2000, 1, 3, 9, 0) + datetime(2000, 1, 3, 9, 0), ] ) - testRecurring('testDailyByWeekNoAndWeekDayLarge', + testRecurring( + 'testDailyByWeekNoAndWeekDayLarge', // Another nice test. The last days of week number 52/53 // may be in the next year. - new RRule({freq: RRule.DAILY, + new RRule({ + freq: RRule.DAILY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1998, 12, 27, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testDailyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.DAILY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 9, 0), datetime(1999, 1, 3, 9, 0), - datetime(2000, 1, 2, 9, 0) + datetime(2000, 1, 2, 9, 0), ] ) - testRecurring('testDailyByWeekNoAndWeekDay53', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.DAILY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 9, 0), datetime(2004, 12, 27, 9, 0), - datetime(2009, 12, 28, 9, 0) + datetime(2009, 12, 28, 9, 0), ] ) - testRecurring('testDailyByEaster', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByEaster', + new RRule({ + freq: RRule.DAILY, count: 3, byeaster: 0, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 12, 9, 0), datetime(1999, 4, 4, 9, 0), - datetime(2000, 4, 23, 9, 0) + datetime(2000, 4, 23, 9, 0), ] ) - testRecurring('testDailyByEasterPos', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByEasterPos', + new RRule({ + freq: RRule.DAILY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 9, 0), datetime(1999, 4, 5, 9, 0), - datetime(2000, 4, 24, 9, 0) + datetime(2000, 4, 24, 9, 0), ] ) - testRecurring('testDailyByEasterNeg', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByEasterNeg', + new RRule({ + freq: RRule.DAILY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 9, 0), datetime(1999, 4, 3, 9, 0), - datetime(2000, 4, 22, 9, 0) + datetime(2000, 4, 22, 9, 0), ] ) - testRecurring('testDailyByHour', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByHour', + new RRule({ + freq: RRule.DAILY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1997, 9, 3, 6, 0), - datetime(1997, 9, 3, 18, 0) + datetime(1997, 9, 3, 18, 0), ] ) - testRecurring('testDailyByMinute', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMinute', + new RRule({ + freq: RRule.DAILY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6), datetime(1997, 9, 2, 9, 18), - datetime(1997, 9, 3, 9, 6) + datetime(1997, 9, 3, 9, 6), ] ) - testRecurring('testDailyBySecond', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyBySecond', + new RRule({ + freq: RRule.DAILY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1997, 9, 3, 9, 0, 6) + datetime(1997, 9, 3, 9, 0, 6), ] ) - testRecurring('testDailyByHourAndMinute', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByHourAndMinute', + new RRule({ + freq: RRule.DAILY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6), datetime(1997, 9, 2, 18, 18), - datetime(1997, 9, 3, 6, 6) + datetime(1997, 9, 3, 6, 6), ] ) - testRecurring('testDailyByHourAndSecond', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByHourAndSecond', + new RRule({ + freq: RRule.DAILY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1997, 9, 3, 6, 0, 6) + datetime(1997, 9, 3, 6, 0, 6), ] ) - testRecurring('testDailyByMinuteAndSecond', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByMinuteAndSecond', + new RRule({ + freq: RRule.DAILY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testDailyByHourAndMinuteAndSecond', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.DAILY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testDailyBySetPos', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDailyBySetPos', + new RRule({ + freq: RRule.DAILY, count: 3, byhour: [6, 18], byminute: [15, 45], bysetpos: [3, -3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 15), datetime(1997, 9, 3, 6, 45), - datetime(1997, 9, 3, 18, 15) + datetime(1997, 9, 3, 18, 15), ] ) - testRecurring('testHourly', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourly', + new RRule({ + freq: RRule.HOURLY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 10, 0), - datetime(1997, 9, 2, 11, 0) + datetime(1997, 9, 2, 11, 0), ] ) - testRecurring('testHourlyInterval', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyInterval', + new RRule({ + freq: RRule.HOURLY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 11, 0), - datetime(1997, 9, 2, 13, 0) + datetime(1997, 9, 2, 13, 0), ] ) - testRecurring('testHourlyIntervalLarge', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyIntervalLarge', + new RRule({ + freq: RRule.HOURLY, count: 3, interval: 769, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 10, 4, 10, 0), - datetime(1997, 11, 5, 11, 0) + datetime(1997, 11, 5, 11, 0), ] ) - testRecurring('testHourlyByMonth', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonth', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 1, 0), - datetime(1998, 1, 1, 2, 0) + datetime(1998, 1, 1, 2, 0), ] ) - testRecurring('testHourlyByMonthDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthDay', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 0, 0), datetime(1997, 9, 3, 1, 0), - datetime(1997, 9, 3, 2, 0) + datetime(1997, 9, 3, 2, 0), ] ) - testRecurring('testHourlyByMonthAndMonthDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthAndMonthDay', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 0, 0), datetime(1998, 1, 5, 1, 0), - datetime(1998, 1, 5, 2, 0) + datetime(1998, 1, 5, 2, 0), ] ) - testRecurring('testHourlyByWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 10, 0), - datetime(1997, 9, 2, 11, 0) + datetime(1997, 9, 2, 11, 0), ] ) - testRecurring('testHourlyByNWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByNWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 10, 0), - datetime(1997, 9, 2, 11, 0) + datetime(1997, 9, 2, 11, 0), ] ) - testRecurring('testHourlyByMonthAndWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthAndWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 1, 0), - datetime(1998, 1, 1, 2, 0) + datetime(1998, 1, 1, 2, 0), ] ) - testRecurring('testHourlyByMonthAndNWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthAndNWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 1, 0), - datetime(1998, 1, 1, 2, 0) + datetime(1998, 1, 1, 2, 0), ] ) - testRecurring('testHourlyByMonthDayAndWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 1, 0), - datetime(1998, 1, 1, 2, 0) + datetime(1998, 1, 1, 2, 0), ] ) - testRecurring('testHourlyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 1, 0), - datetime(1998, 1, 1, 2, 0) + datetime(1998, 1, 1, 2, 0), ] ) - testRecurring('testHourlyByYearDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByYearDay', + new RRule({ + freq: RRule.HOURLY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 0, 0), datetime(1997, 12, 31, 1, 0), datetime(1997, 12, 31, 2, 0), - datetime(1997, 12, 31, 3, 0) + datetime(1997, 12, 31, 3, 0), ] ) - testRecurring('testHourlyByYearDayNeg', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByYearDayNeg', + new RRule({ + freq: RRule.HOURLY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 0, 0), datetime(1997, 12, 31, 1, 0), datetime(1997, 12, 31, 2, 0), - datetime(1997, 12, 31, 3, 0) + datetime(1997, 12, 31, 3, 0), ] ) - testRecurring('testHourlyByMonthAndYearDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthAndYearDay', + new RRule({ + freq: RRule.HOURLY, count: 4, bymonth: [4, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 0, 0), datetime(1998, 4, 10, 1, 0), datetime(1998, 4, 10, 2, 0), - datetime(1998, 4, 10, 3, 0) + datetime(1998, 4, 10, 3, 0), ] ) - testRecurring('testHourlyByMonthAndYearDayNeg', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.HOURLY, count: 4, bymonth: [4, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 0, 0), datetime(1998, 4, 10, 1, 0), datetime(1998, 4, 10, 2, 0), - datetime(1998, 4, 10, 3, 0) + datetime(1998, 4, 10, 3, 0), ] ) - testRecurring('testHourlyByWeekNo', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByWeekNo', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 0, 0), datetime(1998, 5, 11, 1, 0), - datetime(1998, 5, 11, 2, 0) + datetime(1998, 5, 11, 2, 0), ] ) - testRecurring('testHourlyByWeekNoAndWeekDay', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByWeekNoAndWeekDay', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 0, 0), datetime(1997, 12, 29, 1, 0), - datetime(1997, 12, 29, 2, 0) + datetime(1997, 12, 29, 2, 0), ] ) - testRecurring('testHourlyByWeekNoAndWeekDayLarge', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByWeekNoAndWeekDayLarge', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 0, 0), datetime(1997, 12, 28, 1, 0), - datetime(1997, 12, 28, 2, 0) + datetime(1997, 12, 28, 2, 0), ] ) - testRecurring('testHourlyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 0, 0), datetime(1997, 12, 28, 1, 0), - datetime(1997, 12, 28, 2, 0) + datetime(1997, 12, 28, 2, 0), ] ) - testRecurring('testHourlyByWeekNoAndWeekDay53', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.HOURLY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 0, 0), datetime(1998, 12, 28, 1, 0), - datetime(1998, 12, 28, 2, 0) + datetime(1998, 12, 28, 2, 0), ] ) - testRecurring.skip('testHourlyByEaster', - new RRule({freq: RRule.HOURLY, + testRecurring.skip( + 'testHourlyByEaster', + new RRule({ + freq: RRule.HOURLY, count: 3, byeaster: 0, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 12, 0, 0), datetime(1998, 4, 12, 1, 0), - datetime(1998, 4, 12, 2, 0) + datetime(1998, 4, 12, 2, 0), ] ) - testRecurring.skip('testHourlyByEasterPos', - new RRule({freq: RRule.HOURLY, + testRecurring.skip( + 'testHourlyByEasterPos', + new RRule({ + freq: RRule.HOURLY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 0, 0), datetime(1998, 4, 13, 1, 0), - datetime(1998, 4, 13, 2, 0) + datetime(1998, 4, 13, 2, 0), ] ) - testRecurring.skip('testHourlyByEasterNeg', - new RRule({freq: RRule.HOURLY, + testRecurring.skip( + 'testHourlyByEasterNeg', + new RRule({ + freq: RRule.HOURLY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 0, 0), datetime(1998, 4, 11, 1, 0), - datetime(1998, 4, 11, 2, 0) + datetime(1998, 4, 11, 2, 0), ] ) - testRecurring('testHourlyByHour', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByHour', + new RRule({ + freq: RRule.HOURLY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1997, 9, 3, 6, 0), - datetime(1997, 9, 3, 18, 0) + datetime(1997, 9, 3, 18, 0), ] ) - testRecurring('testHourlyByMinute', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMinute', + new RRule({ + freq: RRule.HOURLY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6), datetime(1997, 9, 2, 9, 18), - datetime(1997, 9, 2, 10, 6) + datetime(1997, 9, 2, 10, 6), ] ) - testRecurring('testHourlyBySecond', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyBySecond', + new RRule({ + freq: RRule.HOURLY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1997, 9, 2, 10, 0, 6) + datetime(1997, 9, 2, 10, 0, 6), ] ) - testRecurring('testHourlyByHourAndMinute', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByHourAndMinute', + new RRule({ + freq: RRule.HOURLY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6), datetime(1997, 9, 2, 18, 18), - datetime(1997, 9, 3, 6, 6) + datetime(1997, 9, 3, 6, 6), ] ) - testRecurring('testHourlyByHourAndSecond', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByHourAndSecond', + new RRule({ + freq: RRule.HOURLY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1997, 9, 3, 6, 0, 6) + datetime(1997, 9, 3, 6, 0, 6), ] ) - testRecurring('testHourlyByMinuteAndSecond', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByMinuteAndSecond', + new RRule({ + freq: RRule.HOURLY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testHourlyByHourAndMinuteAndSecond', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.HOURLY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testHourlyBySetPos', - new RRule({freq: RRule.HOURLY, + testRecurring( + 'testHourlyBySetPos', + new RRule({ + freq: RRule.HOURLY, count: 3, byminute: [15, 45], bysecond: [15, 45], bysetpos: [3, -3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 15, 45), datetime(1997, 9, 2, 9, 45, 15), - datetime(1997, 9, 2, 10, 15, 45) + datetime(1997, 9, 2, 10, 15, 45), ] ) - testRecurring('testMinutely', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutely', + new RRule({ + freq: RRule.MINUTELY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 9, 1), - datetime(1997, 9, 2, 9, 2) + datetime(1997, 9, 2, 9, 2), ] ) - testRecurring('testMinutelyInterval', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyInterval', + new RRule({ + freq: RRule.MINUTELY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 9, 2), - datetime(1997, 9, 2, 9, 4) + datetime(1997, 9, 2, 9, 4), ] ) - testRecurring('testMinutelyIntervalLarge', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyIntervalLarge', + new RRule({ + freq: RRule.MINUTELY, count: 3, interval: 1501, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 10, 1), - datetime(1997, 9, 4, 11, 2) + datetime(1997, 9, 4, 11, 2), ] ) - testRecurring('testMinutelyByMonth', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonth', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 0, 1), - datetime(1998, 1, 1, 0, 2) + datetime(1998, 1, 1, 0, 2), ] ) - testRecurring('testMinutelyByMonthDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 0, 0), datetime(1997, 9, 3, 0, 1), - datetime(1997, 9, 3, 0, 2) + datetime(1997, 9, 3, 0, 2), ] ) - testRecurring('testMinutelyByMonthAndMonthDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthAndMonthDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 0, 0), datetime(1998, 1, 5, 0, 1), - datetime(1998, 1, 5, 0, 2) + datetime(1998, 1, 5, 0, 2), ] ) - testRecurring('testMinutelyByWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 9, 1), - datetime(1997, 9, 2, 9, 2) + datetime(1997, 9, 2, 9, 2), ] ) - testRecurring('testMinutelyByNWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByNWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 2, 9, 1), - datetime(1997, 9, 2, 9, 2) + datetime(1997, 9, 2, 9, 2), ] ) - testRecurring('testMinutelyByMonthAndWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthAndWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 0, 1), - datetime(1998, 1, 1, 0, 2) + datetime(1998, 1, 1, 0, 2), ] ) - testRecurring('testMinutelyByMonthAndNWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthAndNWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 0, 1), - datetime(1998, 1, 1, 0, 2) + datetime(1998, 1, 1, 0, 2), ] ) - testRecurring('testMinutelyByMonthDayAndWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 0, 1), - datetime(1998, 1, 1, 0, 2) + datetime(1998, 1, 1, 0, 2), ] ) - testRecurring('testMinutelyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0), datetime(1998, 1, 1, 0, 1), - datetime(1998, 1, 1, 0, 2) + datetime(1998, 1, 1, 0, 2), ] ) - testRecurring('testMinutelyByYearDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByYearDay', + new RRule({ + freq: RRule.MINUTELY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 0, 0), datetime(1997, 12, 31, 0, 1), datetime(1997, 12, 31, 0, 2), - datetime(1997, 12, 31, 0, 3) + datetime(1997, 12, 31, 0, 3), ] ) - testRecurring('testMinutelyByYearDayNeg', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByYearDayNeg', + new RRule({ + freq: RRule.MINUTELY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 0, 0), datetime(1997, 12, 31, 0, 1), datetime(1997, 12, 31, 0, 2), - datetime(1997, 12, 31, 0, 3) + datetime(1997, 12, 31, 0, 3), ] ) - testRecurring('testMinutelyByMonthAndYearDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthAndYearDay', + new RRule({ + freq: RRule.MINUTELY, count: 4, bymonth: [4, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 0, 0), datetime(1998, 4, 10, 0, 1), datetime(1998, 4, 10, 0, 2), - datetime(1998, 4, 10, 0, 3) + datetime(1998, 4, 10, 0, 3), ] ) - testRecurring('testMinutelyByMonthAndYearDayNeg', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.MINUTELY, count: 4, bymonth: [4, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 0, 0), datetime(1998, 4, 10, 0, 1), datetime(1998, 4, 10, 0, 2), - datetime(1998, 4, 10, 0, 3) + datetime(1998, 4, 10, 0, 3), ] ) - testRecurring('testMinutelyByWeekNo', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByWeekNo', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 0, 0), datetime(1998, 5, 11, 0, 1), - datetime(1998, 5, 11, 0, 2) + datetime(1998, 5, 11, 0, 2), ] ) - testRecurring('testMinutelyByWeekNoAndWeekDay', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByWeekNoAndWeekDay', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 0, 0), datetime(1997, 12, 29, 0, 1), - datetime(1997, 12, 29, 0, 2) + datetime(1997, 12, 29, 0, 2), ] ) - testRecurring('testMinutelyByWeekNoAndWeekDayLarge', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByWeekNoAndWeekDayLarge', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 0, 0), datetime(1997, 12, 28, 0, 1), - datetime(1997, 12, 28, 0, 2) + datetime(1997, 12, 28, 0, 2), ] ) - testRecurring('testMinutelyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 0, 0), datetime(1997, 12, 28, 0, 1), - datetime(1997, 12, 28, 0, 2) + datetime(1997, 12, 28, 0, 2), ] ) - testRecurring('testMinutelyByWeekNoAndWeekDay53', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.MINUTELY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 0, 0), datetime(1998, 12, 28, 0, 1), - datetime(1998, 12, 28, 0, 2) + datetime(1998, 12, 28, 0, 2), ] ) - testRecurring.skip('testMinutelyByEaster', - new RRule({freq: RRule.MINUTELY, + testRecurring.skip( + 'testMinutelyByEaster', + new RRule({ + freq: RRule.MINUTELY, count: 3, byeaster: 0, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 12, 0, 0), datetime(1998, 4, 12, 0, 1), - datetime(1998, 4, 12, 0, 2) + datetime(1998, 4, 12, 0, 2), ] ) - testRecurring.skip('testMinutelyByEasterPos', - new RRule({freq: RRule.MINUTELY, + testRecurring.skip( + 'testMinutelyByEasterPos', + new RRule({ + freq: RRule.MINUTELY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 0, 0), datetime(1998, 4, 13, 0, 1), - datetime(1998, 4, 13, 0, 2) + datetime(1998, 4, 13, 0, 2), ] ) - testRecurring.skip('testMinutelyByEasterNeg', - new RRule({freq: RRule.MINUTELY, + testRecurring.skip( + 'testMinutelyByEasterNeg', + new RRule({ + freq: RRule.MINUTELY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 0, 0), datetime(1998, 4, 11, 0, 1), - datetime(1998, 4, 11, 0, 2) + datetime(1998, 4, 11, 0, 2), ] ) - testRecurring('testMinutelyByHour', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByHour', + new RRule({ + freq: RRule.MINUTELY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0), datetime(1997, 9, 2, 18, 1), - datetime(1997, 9, 2, 18, 2) + datetime(1997, 9, 2, 18, 2), ] ) - testRecurring('testMinutelyByMinute', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMinute', + new RRule({ + freq: RRule.MINUTELY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6), datetime(1997, 9, 2, 9, 18), - datetime(1997, 9, 2, 10, 6) + datetime(1997, 9, 2, 10, 6), ] ) - testRecurring('testMinutelyBySecond', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyBySecond', + new RRule({ + freq: RRule.MINUTELY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1997, 9, 2, 9, 1, 6) + datetime(1997, 9, 2, 9, 1, 6), ] ) - testRecurring('testMinutelyByHourAndMinute', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByHourAndMinute', + new RRule({ + freq: RRule.MINUTELY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6), datetime(1997, 9, 2, 18, 18), - datetime(1997, 9, 3, 6, 6) + datetime(1997, 9, 3, 6, 6), ] ) - testRecurring('testMinutelyByHourAndSecond', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByHourAndSecond', + new RRule({ + freq: RRule.MINUTELY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1997, 9, 2, 18, 1, 6) + datetime(1997, 9, 2, 18, 1, 6), ] ) - testRecurring('testMinutelyByMinuteAndSecond', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByMinuteAndSecond', + new RRule({ + freq: RRule.MINUTELY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testMinutelyByHourAndMinuteAndSecond', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.MINUTELY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testMinutelyBySetPos', - new RRule({freq: RRule.MINUTELY, + testRecurring( + 'testMinutelyBySetPos', + new RRule({ + freq: RRule.MINUTELY, count: 3, bysecond: [15, 30, 45], bysetpos: [3, -3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 15), datetime(1997, 9, 2, 9, 0, 45), - datetime(1997, 9, 2, 9, 1, 15) + datetime(1997, 9, 2, 9, 1, 15), ] ) - testRecurring('testSecondly', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondly', + new RRule({ + freq: RRule.SECONDLY, count: 3, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 0), datetime(1997, 9, 2, 9, 0, 1), - datetime(1997, 9, 2, 9, 0, 2) + datetime(1997, 9, 2, 9, 0, 2), ] ) - testRecurring('testSecondlyInterval', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyInterval', + new RRule({ + freq: RRule.SECONDLY, count: 3, interval: 2, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 0), datetime(1997, 9, 2, 9, 0, 2), - datetime(1997, 9, 2, 9, 0, 4) + datetime(1997, 9, 2, 9, 0, 4), ] ) - testRecurring('testSecondlyIntervalLarge', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyIntervalLarge', + new RRule({ + freq: RRule.SECONDLY, count: 3, interval: 90061, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 0), datetime(1997, 9, 3, 10, 1, 1), - datetime(1997, 9, 4, 11, 2, 2) + datetime(1997, 9, 4, 11, 2, 2), ] ) - testRecurring('testSecondlyByMonth', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonth', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonth: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0, 0), datetime(1998, 1, 1, 0, 0, 1), - datetime(1998, 1, 1, 0, 0, 2) + datetime(1998, 1, 1, 0, 0, 2), ] ) - testRecurring('testSecondlyByMonthDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonthday: [1, 3], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 3, 0, 0, 0), datetime(1997, 9, 3, 0, 0, 1), - datetime(1997, 9, 3, 0, 0, 2) + datetime(1997, 9, 3, 0, 0, 2), ] ) - testRecurring('testSecondlyByMonthAndMonthDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthAndMonthDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonth: [1, 3], bymonthday: [5, 7], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 5, 0, 0, 0), datetime(1998, 1, 5, 0, 0, 1), - datetime(1998, 1, 5, 0, 0, 2) + datetime(1998, 1, 5, 0, 0, 2), ] ) - testRecurring('testSecondlyByWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 0), datetime(1997, 9, 2, 9, 0, 1), - datetime(1997, 9, 2, 9, 0, 2) + datetime(1997, 9, 2, 9, 0, 2), ] ) - testRecurring('testSecondlyByNWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByNWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 0), datetime(1997, 9, 2, 9, 0, 1), - datetime(1997, 9, 2, 9, 0, 2) + datetime(1997, 9, 2, 9, 0, 2), ] ) - testRecurring('testSecondlyByMonthAndWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthAndWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0, 0), datetime(1998, 1, 1, 0, 0, 1), - datetime(1998, 1, 1, 0, 0, 2) + datetime(1998, 1, 1, 0, 0, 2), ] ) - testRecurring('testSecondlyByMonthAndNWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthAndNWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonth: [1, 3], byweekday: [RRule.TU.nth(1), RRule.TH.nth(-1)], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0, 0), datetime(1998, 1, 1, 0, 0, 1), - datetime(1998, 1, 1, 0, 0, 2) + datetime(1998, 1, 1, 0, 0, 2), ] ) - testRecurring('testSecondlyByMonthDayAndWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthDayAndWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0, 0), datetime(1998, 1, 1, 0, 0, 1), - datetime(1998, 1, 1, 0, 0, 2) + datetime(1998, 1, 1, 0, 0, 2), ] ) - testRecurring('testSecondlyByMonthAndMonthDayAndWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthAndMonthDayAndWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, bymonth: [1, 3], bymonthday: [1, 3], byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 1, 1, 0, 0, 0), datetime(1998, 1, 1, 0, 0, 1), - datetime(1998, 1, 1, 0, 0, 2) + datetime(1998, 1, 1, 0, 0, 2), ] ) - testRecurring('testSecondlyByYearDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByYearDay', + new RRule({ + freq: RRule.SECONDLY, count: 4, byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 0, 0, 0), datetime(1997, 12, 31, 0, 0, 1), datetime(1997, 12, 31, 0, 0, 2), - datetime(1997, 12, 31, 0, 0, 3) + datetime(1997, 12, 31, 0, 0, 3), ] ) - testRecurring('testSecondlyByYearDayNeg', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByYearDayNeg', + new RRule({ + freq: RRule.SECONDLY, count: 4, byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 31, 0, 0, 0), datetime(1997, 12, 31, 0, 0, 1), datetime(1997, 12, 31, 0, 0, 2), - datetime(1997, 12, 31, 0, 0, 3) + datetime(1997, 12, 31, 0, 0, 3), ] ) - testRecurring('testSecondlyByMonthAndYearDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthAndYearDay', + new RRule({ + freq: RRule.SECONDLY, count: 4, bymonth: [4, 7], byyearday: [1, 100, 200, 365], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 0, 0, 0), datetime(1998, 4, 10, 0, 0, 1), datetime(1998, 4, 10, 0, 0, 2), - datetime(1998, 4, 10, 0, 0, 3) + datetime(1998, 4, 10, 0, 0, 3), ] ) - testRecurring('testSecondlyByMonthAndYearDayNeg', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMonthAndYearDayNeg', + new RRule({ + freq: RRule.SECONDLY, count: 4, bymonth: [4, 7], byyearday: [-365, -266, -166, -1], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 10, 0, 0, 0), datetime(1998, 4, 10, 0, 0, 1), datetime(1998, 4, 10, 0, 0, 2), - datetime(1998, 4, 10, 0, 0, 3) + datetime(1998, 4, 10, 0, 0, 3), ] ) - testRecurring('testSecondlyByWeekNo', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByWeekNo', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekno: 20, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 5, 11, 0, 0, 0), datetime(1998, 5, 11, 0, 0, 1), - datetime(1998, 5, 11, 0, 0, 2) + datetime(1998, 5, 11, 0, 0, 2), ] ) - testRecurring('testSecondlyByWeekNoAndWeekDay', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByWeekNoAndWeekDay', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekno: 1, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 29, 0, 0, 0), datetime(1997, 12, 29, 0, 0, 1), - datetime(1997, 12, 29, 0, 0, 2) + datetime(1997, 12, 29, 0, 0, 2), ] ) - testRecurring('testSecondlyByWeekNoAndWeekDayLarge', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByWeekNoAndWeekDayLarge', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekno: 52, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 0, 0, 0), datetime(1997, 12, 28, 0, 0, 1), - datetime(1997, 12, 28, 0, 0, 2) + datetime(1997, 12, 28, 0, 0, 2), ] ) - testRecurring('testSecondlyByWeekNoAndWeekDayLast', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByWeekNoAndWeekDayLast', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekno: -1, byweekday: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 12, 28, 0, 0, 0), datetime(1997, 12, 28, 0, 0, 1), - datetime(1997, 12, 28, 0, 0, 2) + datetime(1997, 12, 28, 0, 0, 2), ] ) - testRecurring('testSecondlyByWeekNoAndWeekDay53', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByWeekNoAndWeekDay53', + new RRule({ + freq: RRule.SECONDLY, count: 3, byweekno: 53, byweekday: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 12, 28, 0, 0, 0), datetime(1998, 12, 28, 0, 0, 1), - datetime(1998, 12, 28, 0, 0, 2) + datetime(1998, 12, 28, 0, 0, 2), ] ) - testRecurring.skip('testSecondlyByEaster', - new RRule({freq: RRule.SECONDLY, + testRecurring.skip( + 'testSecondlyByEaster', + new RRule({ + freq: RRule.SECONDLY, count: 3, byeaster: 0, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 12, 0, 0, 0), datetime(1998, 4, 12, 0, 0, 1), - datetime(1998, 4, 12, 0, 0, 2) + datetime(1998, 4, 12, 0, 0, 2), ] ) - testRecurring.skip('testSecondlyByEasterPos', - new RRule({freq: RRule.SECONDLY, + testRecurring.skip( + 'testSecondlyByEasterPos', + new RRule({ + freq: RRule.SECONDLY, count: 3, byeaster: 1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 13, 0, 0, 0), datetime(1998, 4, 13, 0, 0, 1), - datetime(1998, 4, 13, 0, 0, 2) + datetime(1998, 4, 13, 0, 0, 2), ] ) - testRecurring.skip('testSecondlyByEasterNeg', - new RRule({freq: RRule.SECONDLY, + testRecurring.skip( + 'testSecondlyByEasterNeg', + new RRule({ + freq: RRule.SECONDLY, count: 3, byeaster: -1, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1998, 4, 11, 0, 0, 0), datetime(1998, 4, 11, 0, 0, 1), - datetime(1998, 4, 11, 0, 0, 2) + datetime(1998, 4, 11, 0, 0, 2), ] ) - testRecurring('testSecondlyByHour', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByHour', + new RRule({ + freq: RRule.SECONDLY, count: 3, byhour: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 0), datetime(1997, 9, 2, 18, 0, 1), - datetime(1997, 9, 2, 18, 0, 2) + datetime(1997, 9, 2, 18, 0, 2), ] ) - testRecurring('testSecondlyByMinute', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMinute', + new RRule({ + freq: RRule.SECONDLY, count: 3, byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 0), datetime(1997, 9, 2, 9, 6, 1), - datetime(1997, 9, 2, 9, 6, 2) + datetime(1997, 9, 2, 9, 6, 2), ] ) - testRecurring('testSecondlyBySecond', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyBySecond', + new RRule({ + freq: RRule.SECONDLY, count: 3, bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0, 6), datetime(1997, 9, 2, 9, 0, 18), - datetime(1997, 9, 2, 9, 1, 6) + datetime(1997, 9, 2, 9, 1, 6), ] ) - testRecurring('testSecondlyByHourAndMinute', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByHourAndMinute', + new RRule({ + freq: RRule.SECONDLY, count: 3, byhour: [6, 18], byminute: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 0), datetime(1997, 9, 2, 18, 6, 1), - datetime(1997, 9, 2, 18, 6, 2) + datetime(1997, 9, 2, 18, 6, 2), ] ) - testRecurring('testSecondlyByHourAndSecond', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByHourAndSecond', + new RRule({ + freq: RRule.SECONDLY, count: 3, byhour: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 0, 6), datetime(1997, 9, 2, 18, 0, 18), - datetime(1997, 9, 2, 18, 1, 6) + datetime(1997, 9, 2, 18, 1, 6), ] ) - testRecurring('testSecondlyByMinuteAndSecond', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByMinuteAndSecond', + new RRule({ + freq: RRule.SECONDLY, count: 3, byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 6, 6), datetime(1997, 9, 2, 9, 6, 18), - datetime(1997, 9, 2, 9, 18, 6) + datetime(1997, 9, 2, 9, 18, 6), ] ) - testRecurring('testSecondlyByHourAndMinuteAndSecond', - new RRule({freq: RRule.SECONDLY, + testRecurring( + 'testSecondlyByHourAndMinuteAndSecond', + new RRule({ + freq: RRule.SECONDLY, count: 3, byhour: [6, 18], byminute: [6, 18], bysecond: [6, 18], - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 18, 6, 6), datetime(1997, 9, 2, 18, 6, 18), - datetime(1997, 9, 2, 18, 18, 6) + datetime(1997, 9, 2, 18, 18, 6), ] ) - testRecurring('testUntilNotMatching', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testUntilNotMatching', + new RRule({ + freq: RRule.DAILY, count: 3, dtstart: parse('19970902T090000'), - until: parse('19970905T080000') + until: parse('19970905T080000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 9, 0), - datetime(1997, 9, 4, 9, 0) + datetime(1997, 9, 4, 9, 0), ] ) - testRecurring('testUntilMatching', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testUntilMatching', + new RRule({ + freq: RRule.DAILY, count: 3, dtstart: parse('19970902T090000'), - until: parse('19970904T090000') + until: parse('19970904T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 9, 0), - datetime(1997, 9, 4, 9, 0) + datetime(1997, 9, 4, 9, 0), ] ) - testRecurring('testUntilSingle', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testUntilSingle', + new RRule({ + freq: RRule.DAILY, count: 3, dtstart: parse('19970902T090000'), - until: parse('19970902T090000') + until: parse('19970902T090000'), }), - [ - datetime(1997, 9, 2, 9, 0) - ] + [datetime(1997, 9, 2, 9, 0)] ) - testRecurring('testUntilEmpty', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testUntilEmpty', + new RRule({ + freq: RRule.DAILY, count: 3, dtstart: parse('19970902T090000'), - until: parse('19970901T090000') + until: parse('19970901T090000'), }), [] ) - testRecurring('testUntilWithDate', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testUntilWithDate', + new RRule({ + freq: RRule.DAILY, count: 3, dtstart: parse('19970902T090000'), - until: datetime(1997, 9, 5) + until: datetime(1997, 9, 5), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 9, 0), - datetime(1997, 9, 4, 9, 0) + datetime(1997, 9, 4, 9, 0), ] ) - testRecurring('testWkStIntervalMO', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWkStIntervalMO', + new RRule({ + freq: RRule.WEEKLY, count: 3, interval: 2, byweekday: [RRule.TU, RRule.SU], wkst: RRule.MO, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 7, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testWkStIntervalSU', - new RRule({freq: RRule.WEEKLY, + testRecurring( + 'testWkStIntervalSU', + new RRule({ + freq: RRule.WEEKLY, count: 3, interval: 2, byweekday: [RRule.TU, RRule.SU], wkst: RRule.SU, - dtstart: parse('19970902T090000') + dtstart: parse('19970902T090000'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 14, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testDTStartIsDate', - new RRule({freq: RRule.DAILY, - count: 3, - dtstart: datetime(1997, 9, 2) - }), + testRecurring( + 'testDTStartIsDate', + new RRule({ freq: RRule.DAILY, count: 3, dtstart: datetime(1997, 9, 2) }), [ datetime(1997, 9, 2, 0, 0), datetime(1997, 9, 3, 0, 0), - datetime(1997, 9, 4, 0, 0) + datetime(1997, 9, 4, 0, 0), ] ) - testRecurring('testDTStartWithMicroseconds', - new RRule({freq: RRule.DAILY, + testRecurring( + 'testDTStartWithMicroseconds', + new RRule({ + freq: RRule.DAILY, count: 3, - dtstart: parse('19970902T090000.5') + dtstart: parse('19970902T090000.5'), }), [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 3, 9, 0), - datetime(1997, 9, 4, 9, 0) + datetime(1997, 9, 4, 9, 0), ] ) - testRecurring('testMaxYear', - new RRule({freq: RRule.YEARLY, + testRecurring( + 'testMaxYear', + new RRule({ + freq: RRule.YEARLY, count: 3, bymonth: 2, bymonthday: 31, - dtstart: parse('99970902T090000') + dtstart: parse('99970902T090000'), }), [] ) - testRecurring('testSubsecondStartYearly', + testRecurring( + 'testSubsecondStartYearly', new RRule({ freq: RRule.YEARLY, count: 1, - dtstart: new Date(1420063200001) + dtstart: new Date(1420063200001), }), - [ - new Date(1420063200001) - ] + [new Date(1420063200001)] ) - testRecurring('testSubsecondStartMonthlyByMonthDay', + testRecurring( + 'testSubsecondStartMonthlyByMonthDay', new RRule({ freq: RRule.MONTHLY, count: 1, bysetpos: [-1, 1], - dtstart: new Date(1356991200001) + dtstart: new Date(1356991200001), }), - [ - new Date(1356991200001) - ] + [new Date(1356991200001)] ) it('testAfterBefore', function () { - (['YEARLY','MONTHLY','DAILY','HOURLY','MINUTELY','SECONDLY'] as const).forEach(function (freqStr: keyof typeof Frequency) { + ;( + ['YEARLY', 'MONTHLY', 'DAILY', 'HOURLY', 'MINUTELY', 'SECONDLY'] as const + ).forEach(function (freqStr: keyof typeof Frequency) { const date = new Date(1356991200001) const rr = new RRule({ freq: RRule[freqStr], - dtstart: date + dtstart: date, }) - expect(date.getTime()).equals(rr.options.dtstart.getTime(), - 'the supplied dtstart differs from RRule.options.dtstart') + expect(date.getTime()).equals( + rr.options.dtstart.getTime(), + 'the supplied dtstart differs from RRule.options.dtstart' + ) let res: Date = rr.before(rr.after(rr.options.dtstart)) let resTimestamp: number if (res != null) resTimestamp = res.getTime() - expect(resTimestamp).equals(rr.options.dtstart.getTime(), - 'after dtstart , followed by before does not return dtstart') + expect(resTimestamp).equals( + rr.options.dtstart.getTime(), + 'after dtstart , followed by before does not return dtstart' + ) }) }) it('testConvertAndBack', function () { - [6, RRule.SU].forEach(function (wkst) { + ;[6, RRule.SU].forEach(function (wkst) { const rr = new RRule({ dtstart: new Date(Date.UTC(2017, 9, 17, 0, 30, 0, 0)), until: new Date(Date.UTC(2017, 11, 22, 1, 30, 0, 0)), freq: RRule.MONTHLY, interval: 1, bysetpos: 17, - byweekday: [RRule.SU, RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR, RRule.SA], + byweekday: [ + RRule.SU, + RRule.MO, + RRule.TU, + RRule.WE, + RRule.TH, + RRule.FR, + RRule.SA, + ], wkst: wkst, byhour: 11, byminute: 0, - bysecond: 0 + bysecond: 0, }) const rrstr = rr.toString() - expect(rrstr).equals('DTSTART:20171017T003000Z\nRRULE:UNTIL=20171222T013000Z;FREQ=MONTHLY;INTERVAL=1;BYSETPOS=17;BYDAY=SU,MO,TU,WE,TH,FR,SA;WKST=SU;BYHOUR=11;BYMINUTE=0;BYSECOND=0') + expect(rrstr).equals( + 'DTSTART:20171017T003000Z\nRRULE:UNTIL=20171222T013000Z;FREQ=MONTHLY;INTERVAL=1;BYSETPOS=17;BYDAY=SU,MO,TU,WE,TH,FR,SA;WKST=SU;BYHOUR=11;BYMINUTE=0;BYSECOND=0' + ) const newrr = RRule.fromString(rrstr) expect(rrstr).equals(newrr.toString()) }) }) it('testByHourValues', function () { - [ - ['DTSTART:20171101T010000Z\nRRULE:UNTIL=20171214T013000Z;FREQ=DAILY;INTERVAL=2;WKST=MO;BYHOUR=11,12;BYMINUTE=30;BYSECOND=0', 'every 2 days at 11 and 12 until December 13, 2017'], - ['DTSTART:20171101T010000Z\nRRULE:UNTIL=20171214T013000Z;FREQ=DAILY;INTERVAL=2;WKST=MO;BYHOUR=11;BYMINUTE=30;BYSECOND=0', 'every 2 days at 11 until December 13, 2017'] + ;[ + [ + 'DTSTART:20171101T010000Z\nRRULE:UNTIL=20171214T013000Z;FREQ=DAILY;INTERVAL=2;WKST=MO;BYHOUR=11,12;BYMINUTE=30;BYSECOND=0', + 'every 2 days at 11 and 12 until December 13, 2017', + ], + [ + 'DTSTART:20171101T010000Z\nRRULE:UNTIL=20171214T013000Z;FREQ=DAILY;INTERVAL=2;WKST=MO;BYHOUR=11;BYMINUTE=30;BYSECOND=0', + 'every 2 days at 11 until December 13, 2017', + ], ].forEach(function (pair) { const rule = pair[0] const rr = RRule.fromString(rule) @@ -3534,23 +4027,27 @@ describe('RRule', function () { }) it('calculates daily recurrences correctly across DST boundaries', () => { - const rrule = RRule.fromString('DTSTART=20181101T110000Z;UNTIL=20181106T110000Z;FREQ=DAILY') + const rrule = RRule.fromString( + 'DTSTART=20181101T110000Z;UNTIL=20181106T110000Z;FREQ=DAILY' + ) expect(rrule.all()).to.deep.equal([ new Date('2018-11-01T11:00:00.000Z'), new Date('2018-11-02T11:00:00.000Z'), new Date('2018-11-03T11:00:00.000Z'), new Date('2018-11-04T11:00:00.000Z'), new Date('2018-11-05T11:00:00.000Z'), - new Date('2018-11-06T11:00:00.000Z') + new Date('2018-11-06T11:00:00.000Z'), ]) }) it('calculates weekly recurrences correctly across DST boundaries', () => { - const rrule = RRule.fromString('DTSTART=20181031T180000Z\nRRULE:FREQ=WEEKLY;UNTIL=20181115T050000Z') + const rrule = RRule.fromString( + 'DTSTART=20181031T180000Z\nRRULE:FREQ=WEEKLY;UNTIL=20181115T050000Z' + ) expect(rrule.all()).to.deep.equal([ new Date('2018-10-31T18:00:00.000Z'), new Date('2018-11-07T18:00:00.000Z'), - new Date('2018-11-14T18:00:00.000Z') + new Date('2018-11-14T18:00:00.000Z'), ]) }) @@ -3560,13 +4057,13 @@ describe('RRule', function () { dtstart: new Date(Date.UTC(2018, 9, 0, 0, 0, 0)), interval: 1, byweekday: [RRule.SU, RRule.WE], - until: new Date(Date.UTC(2018, 9, 9, 0, 0, 0)) + until: new Date(Date.UTC(2018, 9, 9, 0, 0, 0)), }) expect(rule.all()).to.deep.equal([ new Date('2018-09-30T00:00:00.000Z'), new Date('2018-10-03T00:00:00.000Z'), - new Date('2018-10-07T00:00:00.000Z') + new Date('2018-10-07T00:00:00.000Z'), ]) }) @@ -3578,7 +4075,7 @@ describe('RRule', function () { freq: RRule.WEEKLY, interval: 1, dtstart: new Date(startEvent), - until: new Date(endSearch) + until: new Date(endSearch), }) expect(rrule.all()).to.deep.equal([ @@ -3598,7 +4095,7 @@ describe('RRule', function () { new Date('2018-11-09T10:00:00.000Z'), new Date('2018-11-16T10:00:00.000Z'), new Date('2018-11-23T10:00:00.000Z'), - new Date('2018-11-30T10:00:00.000Z') + new Date('2018-11-30T10:00:00.000Z'), ]) }) @@ -3610,41 +4107,40 @@ describe('RRule', function () { freq: RRule.MONTHLY, interval: 1, dtstart: start, - until: end + until: end, }) expect(rrule.all()).to.deep.equal([ new Date('2018-08-06T05:00:00.000Z'), new Date('2018-09-06T05:00:00.000Z'), - new Date('2018-10-06T05:00:00.000Z') + new Date('2018-10-06T05:00:00.000Z'), ]) }) it('generates around dst (#249)', () => { - const ruleString = 'DTSTART:20181101T120000Z\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR;COUNT=4;WKST=SU'; - const rrule = RRule.fromString(ruleString); + const ruleString = + 'DTSTART:20181101T120000Z\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR;COUNT=4;WKST=SU' + const rrule = RRule.fromString(ruleString) expect(rrule.all()).to.deep.equal([ new Date('2018-11-02T12:00:00.000Z'), new Date('2018-11-05T12:00:00.000Z'), new Date('2018-11-07T12:00:00.000Z'), - new Date('2018-11-09T12:00:00.000Z') + new Date('2018-11-09T12:00:00.000Z'), ]) }) it('handles 3-digit years properly (#202)', () => { const rrule = new RRule({ count: 1, - dtstart: new Date(Date.UTC(990, 0, 1, 0, 0, 0)) + dtstart: new Date(Date.UTC(990, 0, 1, 0, 0, 0)), }) const ruleString = rrule.toString() const rrule2 = RRule.fromString(ruleString) expect(ruleString).to.equal('DTSTART:09900101T000000Z\nRRULE:COUNT=1') expect(rrule2.count()).to.equal(1) - expect(rrule2.all()).to.deep.equal([ - new Date(Date.UTC(990, 0, 1, 0, 0, 0)) - ]) + expect(rrule2.all()).to.deep.equal([new Date(Date.UTC(990, 0, 1, 0, 0, 0))]) }) describe('time zones, when recurrence is in dst', () => { @@ -3659,15 +4155,12 @@ describe('RRule', function () { const rule = new RRule({ dtstart, count: 1, - tzid: targetZone + tzid: targetZone, }) const recurrence = rule.all()[0] const expected = expectedDate(startDate, currentLocalDate, targetZone) - expect(recurrence) - .to.deep.equal( - expected - ) + expect(recurrence).to.deep.equal(expected) resetMockDate() }) @@ -3679,15 +4172,12 @@ describe('RRule', function () { const rule = new RRule({ dtstart, count: 1, - tzid: targetZone + tzid: targetZone, }) const recurrence = rule.all()[0] const expected = expectedDate(startDate, currentLocalDate, targetZone) - expect(recurrence) - .to.deep.equal( - expected - ) + expect(recurrence).to.deep.equal(expected) resetMockDate() }) @@ -3699,15 +4189,12 @@ describe('RRule', function () { const rule = new RRule({ dtstart, count: 1, - tzid: targetZone + tzid: targetZone, }) const recurrence = rule.after(new Date(0)) const expected = expectedDate(startDate, currentLocalDate, targetZone) - expect(recurrence) - .to.deep.equal( - expected - ) + expect(recurrence).to.deep.equal(expected) resetMockDate() }) @@ -3716,18 +4203,30 @@ describe('RRule', function () { it('throws an error when dtstart is invalid', () => { const invalidDate = new Date(undefined) const validDate = new Date(Date.UTC(2017, 0, 1)) - expect(() => new RRule({ dtstart: invalidDate })).to.throw('Invalid options: dtstart') - expect(() => new RRule({ dtstart: validDate, until: invalidDate })).to.throw('Invalid options: until') + expect(() => new RRule({ dtstart: invalidDate })).to.throw( + 'Invalid options: dtstart' + ) + expect( + () => new RRule({ dtstart: validDate, until: invalidDate }) + ).to.throw('Invalid options: until') const rule = new RRule({ dtstart: new Date(Date.UTC(2017, 0, 1)), freq: Frequency.DAILY, - interval: 1 + interval: 1, }) - expect(() => rule.after(invalidDate)).to.throw('Invalid date passed in to RRule.after') - expect(() => rule.before(invalidDate)).to.throw('Invalid date passed in to RRule.before') - expect(() => rule.between(invalidDate, validDate)).to.throw('Invalid date passed in to RRule.between') - expect(() => rule.between(validDate, invalidDate)).to.throw('Invalid date passed in to RRule.between') + expect(() => rule.after(invalidDate)).to.throw( + 'Invalid date passed in to RRule.after' + ) + expect(() => rule.before(invalidDate)).to.throw( + 'Invalid date passed in to RRule.before' + ) + expect(() => rule.between(invalidDate, validDate)).to.throw( + 'Invalid date passed in to RRule.between' + ) + expect(() => rule.between(validDate, invalidDate)).to.throw( + 'Invalid date passed in to RRule.between' + ) }) }) diff --git a/test/rruleset.test.ts b/test/rruleset.test.ts index b4d6e4ad..619c726c 100644 --- a/test/rruleset.test.ts +++ b/test/rruleset.test.ts @@ -12,41 +12,49 @@ describe('RRuleSet', function () { // NOTE: can take a longer time. this.ctx.ALSO_TEST_BEFORE_AFTER_BETWEEN = true - testRecurring('testSet', + testRecurring( + 'testSet', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - byweekday: RRule.TU, - dtstart: parse('19970902T090000') - })) - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 1, - byweekday: RRule.TH, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + byweekday: RRule.TU, + dtstart: parse('19970902T090000'), + }) + ) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 1, + byweekday: RRule.TH, + dtstart: parse('19970902T090000'), + }) + ) return set }, [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testSetDate', + testRecurring( + 'testSetDate', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 1, - byweekday: RRule.TU, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 1, + byweekday: RRule.TU, + dtstart: parse('19970902T090000'), + }) + ) set.rdate(datetime(1997, 9, 4, 9)) set.rdate(datetime(1997, 9, 9, 9)) return set @@ -54,45 +62,53 @@ describe('RRuleSet', function () { [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testSetExRule', + testRecurring( + 'testSetExRule', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 6, - byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') - })) - set.exrule(new RRule({ - freq: RRule.YEARLY, - count: 3, - byweekday: RRule.TH, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 6, + byweekday: [RRule.TU, RRule.TH], + dtstart: parse('19970902T090000'), + }) + ) + set.exrule( + new RRule({ + freq: RRule.YEARLY, + count: 3, + byweekday: RRule.TH, + dtstart: parse('19970902T090000'), + }) + ) return set }, [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 9, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testSetExDate', + testRecurring( + 'testSetExDate', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 6, - byweekday: [RRule.TU, RRule.TH], - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 6, + byweekday: [RRule.TU, RRule.TH], + dtstart: parse('19970902T090000'), + }) + ) set.exdate(datetime(1997, 9, 4, 9)) set.exdate(datetime(1997, 9, 11, 9)) set.exdate(datetime(1997, 9, 18, 9)) @@ -101,20 +117,23 @@ describe('RRuleSet', function () { [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 9, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testSetExDateRevOrder', + testRecurring( + 'testSetExDateRevOrder', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.MONTHLY, - count: 5, - bymonthday: 10, - dtstart: parse('20040101T090000') - })) + set.rrule( + new RRule({ + freq: RRule.MONTHLY, + count: 5, + bymonthday: 10, + dtstart: parse('20040101T090000'), + }) + ) set.exdate(datetime(2004, 4, 10, 9, 0)) set.exdate(datetime(2004, 2, 10, 9, 0)) return set @@ -122,11 +141,12 @@ describe('RRuleSet', function () { [ datetime(2004, 1, 10, 9, 0), datetime(2004, 3, 10, 9, 0), - datetime(2004, 5, 10, 9, 0) + datetime(2004, 5, 10, 9, 0), ] ) - testRecurring('testSetDateAndExDate', + testRecurring( + 'testSetDateAndExDate', function () { const set = new RRuleSet() @@ -144,11 +164,12 @@ describe('RRuleSet', function () { [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 9, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testSetDateAndExRule', + testRecurring( + 'testSetDateAndExRule', function () { const set = new RRuleSet() @@ -158,85 +179,102 @@ describe('RRuleSet', function () { set.rdate(datetime(1997, 9, 11, 9)) set.rdate(datetime(1997, 9, 16, 9)) set.rdate(datetime(1997, 9, 18, 9)) - set.exrule(new RRule({ - freq: RRule.YEARLY, - count: 3, - byweekday: RRule.TH, - dtstart: parse('19970902T090000') - })) + set.exrule( + new RRule({ + freq: RRule.YEARLY, + count: 3, + byweekday: RRule.TH, + dtstart: parse('19970902T090000'), + }) + ) return set }, [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 9, 9, 0), - datetime(1997, 9, 16, 9, 0) + datetime(1997, 9, 16, 9, 0), ] ) - testRecurring('testSetCachePre', + testRecurring( + 'testSetCachePre', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - byweekday: RRule.TU, - dtstart: parse('19970902T090000') - })) - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 1, - byweekday: RRule.TH, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + byweekday: RRule.TU, + dtstart: parse('19970902T090000'), + }) + ) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 1, + byweekday: RRule.TH, + dtstart: parse('19970902T090000'), + }) + ) return set }, [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testSetCachePost', + testRecurring( + 'testSetCachePost', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - byweekday: RRule.TU, - dtstart: parse('19970902T090000') - })) - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 1, - byweekday: RRule.TH, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + byweekday: RRule.TU, + dtstart: parse('19970902T090000'), + }) + ) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 1, + byweekday: RRule.TH, + dtstart: parse('19970902T090000'), + }) + ) set.all() return set }, [ datetime(1997, 9, 2, 9, 0), datetime(1997, 9, 4, 9, 0), - datetime(1997, 9, 9, 9, 0) + datetime(1997, 9, 9, 9, 0), ] ) - testRecurring('testSetInfiniteAll', + testRecurring( + 'testSetInfiniteAll', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - dtstart: parse('19970902T090000') - })) - set.exrule(new RRule({ - freq: RRule.YEARLY, - count: 10, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + dtstart: parse('19970902T090000'), + }) + ) + set.exrule( + new RRule({ + freq: RRule.YEARLY, + count: 10, + dtstart: parse('19970902T090000'), + }) + ) return { rrule: set, @@ -244,201 +282,211 @@ describe('RRuleSet', function () { args: [ function (_: any, count: number) { return count < 3 - } - ] + }, + ], } }, [ datetime(2007, 9, 2, 9, 0), datetime(2008, 9, 2, 9, 0), - datetime(2009, 9, 2, 9, 0) + datetime(2009, 9, 2, 9, 0), ] ) - testRecurring('testSetInfiniteBetween', + testRecurring( + 'testSetInfiniteBetween', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - dtstart: parse('19970902T090000') - })) - set.exrule(new RRule({ - freq: RRule.YEARLY, - count: 10, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + dtstart: parse('19970902T090000'), + }) + ) + set.exrule( + new RRule({ + freq: RRule.YEARLY, + count: 10, + dtstart: parse('19970902T090000'), + }) + ) return { rrule: set, method: 'between', - args: [ - datetime(2000, 9, 2, 9, 0), - datetime(2010, 9, 2, 9, 0) - ] + args: [datetime(2000, 9, 2, 9, 0), datetime(2010, 9, 2, 9, 0)], } }, [ datetime(2007, 9, 2, 9, 0), datetime(2008, 9, 2, 9, 0), - datetime(2009, 9, 2, 9, 0) + datetime(2009, 9, 2, 9, 0), ] ) - testRecurring('testSetInfiniteBefore', + testRecurring( + 'testSetInfiniteBefore', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - dtstart: parse('19970902T090000') - })) - set.exrule(new RRule({ - freq: RRule.YEARLY, - count: 10, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + dtstart: parse('19970902T090000'), + }) + ) + set.exrule( + new RRule({ + freq: RRule.YEARLY, + count: 10, + dtstart: parse('19970902T090000'), + }) + ) return { rrule: set, method: 'before', - args: [ - datetime(2015, 9, 2, 9, 0), - false - ] + args: [datetime(2015, 9, 2, 9, 0), false], } }, - [ - datetime(2014, 9, 2, 9, 0) - ] + [datetime(2014, 9, 2, 9, 0)] ) - testRecurring('testSetInfiniteAfter', + testRecurring( + 'testSetInfiniteAfter', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - dtstart: parse('19970902T090000') - })) - set.exrule(new RRule({ - freq: RRule.YEARLY, - count: 10, - dtstart: parse('19970902T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + dtstart: parse('19970902T090000'), + }) + ) + set.exrule( + new RRule({ + freq: RRule.YEARLY, + count: 10, + dtstart: parse('19970902T090000'), + }) + ) return { rrule: set, method: 'after', - args: [ - datetime(2000, 9, 2, 9, 0), - false - ] + args: [datetime(2000, 9, 2, 9, 0), false], } }, - [ - datetime(2007, 9, 2, 9, 0) - ] + [datetime(2007, 9, 2, 9, 0)] ) - testRecurring('testBefore70', + testRecurring( + 'testBefore70', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - dtstart: parse('19600101T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + dtstart: parse('19600101T090000'), + }) + ) return { rrule: set, - method: 'all' + method: 'all', } }, - [ - datetime(1960, 1, 1, 9, 0), - datetime(1961, 1, 1, 9, 0) - ] + [datetime(1960, 1, 1, 9, 0), datetime(1961, 1, 1, 9, 0)] ) describe('valueOf', () => { it('generates rrule strings correctly', () => { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - dtstart: parse('19600101T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + dtstart: parse('19600101T090000'), + }) + ) expect(set.valueOf()).to.deep.equal([ - "DTSTART:19600101T090000Z", - "RRULE:FREQ=YEARLY;COUNT=2" + 'DTSTART:19600101T090000Z', + 'RRULE:FREQ=YEARLY;COUNT=2', ]) }) it('generates multiline rules', () => { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - dtstart: parse('19600101T090000') - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + dtstart: parse('19600101T090000'), + }) + ) - set.rrule(new RRule({ - freq: RRule.WEEKLY, - count: 3, - })) + set.rrule( + new RRule({ + freq: RRule.WEEKLY, + count: 3, + }) + ) expect(set.valueOf()).to.deep.equal([ - "DTSTART:19600101T090000Z", - "RRULE:FREQ=YEARLY;COUNT=2", - "RRULE:FREQ=WEEKLY;COUNT=3" + 'DTSTART:19600101T090000Z', + 'RRULE:FREQ=YEARLY;COUNT=2', + 'RRULE:FREQ=WEEKLY;COUNT=3', ]) }) it('generates rules with tzid', () => { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - dtstart: parse('19600101T090000'), - tzid: 'America/New_York' - })) + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + dtstart: parse('19600101T090000'), + tzid: 'America/New_York', + }) + ) - set.rrule(new RRule({ - freq: RRule.WEEKLY, - count: 3, - })) + set.rrule( + new RRule({ + freq: RRule.WEEKLY, + count: 3, + }) + ) expect(set.valueOf()).to.deep.equal([ - "DTSTART;TZID=America/New_York:19600101T090000", - "RRULE:FREQ=YEARLY;COUNT=2", - "RRULE:FREQ=WEEKLY;COUNT=3" + 'DTSTART;TZID=America/New_York:19600101T090000', + 'RRULE:FREQ=YEARLY;COUNT=2', + 'RRULE:FREQ=WEEKLY;COUNT=3', ]) }) it('generates a value with RDATE with tzid', () => { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - dtstart: parse('19600101T090000'), - tzid: 'America/New_York' - })) - - set.rdate( - parse('19610201T090000'), + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + dtstart: parse('19600101T090000'), + tzid: 'America/New_York', + }) ) - set.rdate( - parse('19610301T090000'), - ) + set.rdate(parse('19610201T090000')) + + set.rdate(parse('19610301T090000')) expect(set.valueOf()).to.deep.equal([ - "DTSTART;TZID=America/New_York:19600101T090000", - "RRULE:FREQ=YEARLY;COUNT=2", - "RDATE;TZID=America/New_York:19610201T090000,19610301T090000" + 'DTSTART;TZID=America/New_York:19600101T090000', + 'RRULE:FREQ=YEARLY;COUNT=2', + 'RDATE;TZID=America/New_York:19610201T090000,19610301T090000', ]) }) @@ -447,16 +495,12 @@ describe('RRuleSet', function () { set.tzid('America/New_York') - set.rdate( - parse('19610201T090000'), - ) + set.rdate(parse('19610201T090000')) - set.rdate( - parse('19610301T090000'), - ) + set.rdate(parse('19610301T090000')) expect(set.toString()).to.deep.equal( - "RDATE;TZID=America/New_York:19610201T090000,19610301T090000" + 'RDATE;TZID=America/New_York:19610201T090000,19610301T090000' ) }) @@ -465,21 +509,19 @@ describe('RRuleSet', function () { set.tzid('UTC') - set.rdate( - parse('19610201T090000'), - ) + set.rdate(parse('19610201T090000')) - set.rdate( - parse('19610301T090000'), - ) + set.rdate(parse('19610301T090000')) expect(set.toString()).to.deep.equal( - "RDATE:19610201T090000Z,19610301T090000Z" + 'RDATE:19610201T090000Z,19610301T090000Z' ) }) it('parses RDATE strings without an RRULE', () => { - const set = rrulestr("RDATE;TZID=America/New_York:19610201T090000,19610301T090000") as RRuleSet + const set = rrulestr( + 'RDATE;TZID=America/New_York:19610201T090000,19610301T090000' + ) as RRuleSet expect(set).to.be.instanceof(RRuleSet) expect(set.tzid()).to.equal('America/New_York') }) @@ -487,25 +529,23 @@ describe('RRuleSet', function () { it('generates EXDATE with tzid', () => { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 2, - dtstart: parse('19600101T090000'), - tzid: 'America/New_York' - })) - - set.exdate( - parse('19610201T090000'), + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 2, + dtstart: parse('19600101T090000'), + tzid: 'America/New_York', + }) ) - set.exdate( - parse('19610301T090000'), - ) + set.exdate(parse('19610201T090000')) + + set.exdate(parse('19610301T090000')) expect(set.valueOf()).to.deep.equal([ - "DTSTART;TZID=America/New_York:19600101T090000", - "RRULE:FREQ=YEARLY;COUNT=2", - "EXDATE;TZID=America/New_York:19610201T090000,19610301T090000" + 'DTSTART;TZID=America/New_York:19600101T090000', + 'RRULE:FREQ=YEARLY;COUNT=2', + 'EXDATE;TZID=America/New_York:19610201T090000,19610301T090000', ]) }) @@ -516,26 +556,40 @@ describe('RRuleSet', function () { const set = new RRuleSet() - set.rrule(new RRule({ - freq: RRule.YEARLY, - count: 4, - dtstart: new Date(Date.UTC(2000, 0, 1, 9, 0, 0)), - tzid: targetZone - })) - - set.exdate( - new Date(Date.UTC(2001, 0, 1, 9, 0, 0)), + set.rrule( + new RRule({ + freq: RRule.YEARLY, + count: 4, + dtstart: new Date(Date.UTC(2000, 0, 1, 9, 0, 0)), + tzid: targetZone, + }) ) - set.rdate( - new Date(Date.UTC(2002, 2, 1, 9, 0, 0)), - ) + set.exdate(new Date(Date.UTC(2001, 0, 1, 9, 0, 0))) + + set.rdate(new Date(Date.UTC(2002, 2, 1, 9, 0, 0))) expect(set.all()).to.deep.equal([ - expectedDate(new Date(Date.UTC(2000,0,1,9,0,0)), currentLocalDate, targetZone), - expectedDate(new Date(Date.UTC(2002,0,1,9,0,0)), currentLocalDate, targetZone), - expectedDate(new Date(Date.UTC(2002,2,1,9,0,0)), currentLocalDate, targetZone), - expectedDate(new Date(Date.UTC(2003,0,1,9,0,0)), currentLocalDate, targetZone), + expectedDate( + new Date(Date.UTC(2000, 0, 1, 9, 0, 0)), + currentLocalDate, + targetZone + ), + expectedDate( + new Date(Date.UTC(2002, 0, 1, 9, 0, 0)), + currentLocalDate, + targetZone + ), + expectedDate( + new Date(Date.UTC(2002, 2, 1, 9, 0, 0)), + currentLocalDate, + targetZone + ), + expectedDate( + new Date(Date.UTC(2003, 0, 1, 9, 0, 0)), + currentLocalDate, + targetZone + ), ]) resetMockDate() @@ -546,11 +600,17 @@ describe('RRuleSet', function () { set.tzid('America/Los_Angeles') set.rdate(new Date(Date.UTC(2010, 10, 10, 10, 0, 0))) - expect(set.valueOf()).to.deep.equal(['RDATE;TZID=America/Los_Angeles:20101110T100000']) - expect(set.toString()).to.equal('RDATE;TZID=America/Los_Angeles:20101110T100000') + expect(set.valueOf()).to.deep.equal([ + 'RDATE;TZID=America/Los_Angeles:20101110T100000', + ]) + expect(set.toString()).to.equal( + 'RDATE;TZID=America/Los_Angeles:20101110T100000' + ) const set2 = rrulestr(set.toString()) - expect(set2.toString()).to.equal('RDATE;TZID=America/Los_Angeles:20101110T100000') + expect(set2.toString()).to.equal( + 'RDATE;TZID=America/Los_Angeles:20101110T100000' + ) }) it('generates correcty zoned recurrences when a tzid is present but no rrule is present', () => { @@ -562,12 +622,14 @@ describe('RRuleSet', function () { set.tzid(targetZone) - set.rdate( - new Date(Date.parse('20020301T090000')), - ) + set.rdate(new Date(Date.parse('20020301T090000'))) expect(set.all()).to.deep.equal([ - expectedDate(new Date(Date.parse('20020301T090000')), currentLocalDate, targetZone) + expectedDate( + new Date(Date.parse('20020301T090000')), + currentLocalDate, + targetZone + ), ]) resetMockDate() @@ -602,13 +664,13 @@ describe('RRuleSet', function () { dtstart: new Date(Date.UTC(1999, 0, 4, 11, 0, 0)), freq: Frequency.WEEKLY, interval: 2, - count: 1 + count: 1, }) expectRecurrence([repeat, legacy]).toAmendExrule(exrule, [ 'DTSTART:19990104T110000Z', 'RRULE:FREQ=DAILY;INTERVAL=1', - 'EXRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=1' + 'EXRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=1', ]) }) @@ -616,10 +678,12 @@ describe('RRuleSet', function () { const legacy = ['RRULE:DTSTART=20171201T080000Z;FREQ=WEEKLY'] const original = ['DTSTART:20171201T080000Z', 'RRULE:FREQ=WEEKLY'] - expectRecurrence([original, legacy]).toBeUpdatedWithEndDate([ - 'DTSTART:20171201T080000Z', - 'RRULE:FREQ=WEEKLY;UNTIL=20171224T235959Z', - ].join('\n')) + expectRecurrence([original, legacy]).toBeUpdatedWithEndDate( + [ + 'DTSTART:20171201T080000Z', + 'RRULE:FREQ=WEEKLY;UNTIL=20171224T235959Z', + ].join('\n') + ) }) it('replaces an existing end date with a new one', () => { @@ -631,10 +695,12 @@ describe('RRuleSet', function () { 'RRULE:FREQ=WEEKLY;UNTIL=20180301T080000Z', ] - expectRecurrence([original, legacy]).toBeUpdatedWithEndDate([ - 'DTSTART:20171201T080000Z', - 'RRULE:FREQ=WEEKLY;UNTIL=20171224T235959Z', - ].join('\n')) + expectRecurrence([original, legacy]).toBeUpdatedWithEndDate( + [ + 'DTSTART:20171201T080000Z', + 'RRULE:FREQ=WEEKLY;UNTIL=20171224T235959Z', + ].join('\n') + ) }) it('handles rule in a timezone', () => { @@ -646,32 +712,38 @@ describe('RRuleSet', function () { 'RRULE:FREQ=WEEKLY', ] - expectRecurrence([original, legacy]).toBeUpdatedWithEndDate([ - 'DTSTART;TZID=America/New_York:20171201T080000', - 'RRULE:FREQ=WEEKLY;UNTIL=20171224T235959', - ].join('\n')) + expectRecurrence([original, legacy]).toBeUpdatedWithEndDate( + [ + 'DTSTART;TZID=America/New_York:20171201T080000', + 'RRULE:FREQ=WEEKLY;UNTIL=20171224T235959', + ].join('\n') + ) }) const updateWithEndDate = ( recurrence: string[], - updatedCursor: Date, + updatedCursor: Date ): string => { const oneDay = 24 * 60 * 60 * 1000 const oneDayEarlier = new Date(updatedCursor.getTime() - oneDay) - const newEndDate = new Date(Date.UTC( - oneDayEarlier.getUTCFullYear(), - oneDayEarlier.getUTCMonth(), - oneDayEarlier.getUTCDate(), - 23, 59, 59 - )) + const newEndDate = new Date( + Date.UTC( + oneDayEarlier.getUTCFullYear(), + oneDayEarlier.getUTCMonth(), + oneDayEarlier.getUTCDate(), + 23, + 59, + 59 + ) + ) const rrule = rrulestr(recurrence.join('\n')) const newRuleSet = new RRuleSet() const rule = new RRule({ - ...rrule.origOptions, - until: newEndDate, - }) + ...rrule.origOptions, + until: newEndDate, + }) newRuleSet.rrule(rule) @@ -680,18 +752,22 @@ describe('RRuleSet', function () { const amendRuleSetWithExceptionDate = ( recurrence: string[], - cursor: Date, + cursor: Date ): string => { - const ruleSet = rrulestr(recurrence.join('\n'), { forceset: true }) as RRuleSet + const ruleSet = rrulestr(recurrence.join('\n'), { + forceset: true, + }) as RRuleSet ruleSet.exdate(cursor) return ruleSet.toString() } const amendRuleSetWithExceptionRule = ( recurrence: string[], - exrule: RRule, + exrule: RRule ): string => { - const ruleSet = rrulestr(recurrence.join('\n'), { forceset: true }) as RRuleSet + const ruleSet = rrulestr(recurrence.join('\n'), { + forceset: true, + }) as RRuleSet ruleSet.exrule(exrule) return ruleSet.toString() } @@ -699,19 +775,19 @@ describe('RRuleSet', function () { function expectRecurrence(recurrences: string[][]) { return { toAmendExrule(excluded: RRule, expected: string[]) { - recurrences.forEach(recurrence => { + recurrences.forEach((recurrence) => { const actual = amendRuleSetWithExceptionRule(recurrence, excluded) expect(actual).to.equal(expected.join('\n')) }) }, toAmendExdate(excluded: Date, expected: string[]) { - recurrences.forEach(recurrence => { + recurrences.forEach((recurrence) => { const actual = amendRuleSetWithExceptionDate(recurrence, excluded) expect(actual).to.equal(expected.join('\n')) }) }, toBeUpdatedWithEndDate(expected: string) { - recurrences.forEach(recurrence => { + recurrences.forEach((recurrence) => { const actual = updateWithEndDate(recurrence, cursor) expect(actual).to.equal(expected) }) @@ -722,11 +798,13 @@ describe('RRuleSet', function () { it('throws a RangeError on an rruleset with invalid TZID and exdate', () => { const set = new RRuleSet() - set.rrule(new RRule({ - count: 1, - dtstart: parse('19970902T090000'), - tzid: 'America/Unknown' - })) + set.rrule( + new RRule({ + count: 1, + dtstart: parse('19970902T090000'), + tzid: 'America/Unknown', + }) + ) set.exdate(parse('19970902T090000')) expect(() => set.all().map(String)).to.throw(RangeError) @@ -748,45 +826,45 @@ describe('RRuleSet', function () { describe('getters', () => { it('rrules()', () => { - let set = new RRuleSet(); + let set = new RRuleSet() let rrule = new RRule({ freq: RRule.YEARLY, count: 2, dtstart: parse('19600101T090000'), - tzid: 'America/New_York' - }); - set.rrule(rrule); + tzid: 'America/New_York', + }) + set.rrule(rrule) + + expect(set.rrules().map((e) => e.toString())).eql([rrule.toString()]) + }) - expect(set.rrules().map(e => e.toString())).eql([rrule.toString()]); - }); - it('exrules()', () => { - let set = new RRuleSet(); + let set = new RRuleSet() let rrule = new RRule({ freq: RRule.YEARLY, count: 2, dtstart: parse('19600101T090000'), - tzid: 'America/New_York' - }); - set.exrule(rrule); + tzid: 'America/New_York', + }) + set.exrule(rrule) - expect(set.exrules().map(e => e.toString())).eql([rrule.toString()]); - }); + expect(set.exrules().map((e) => e.toString())).eql([rrule.toString()]) + }) it('rdates()', () => { - let set = new RRuleSet(); - let dt = parse('19610201T090000'); - set.rdate(dt); - - expect(set.rdates()).eql([dt]); - }); + let set = new RRuleSet() + let dt = parse('19610201T090000') + set.rdate(dt) + + expect(set.rdates()).eql([dt]) + }) it('exdates()', () => { - let set = new RRuleSet(); - let dt = parse('19610201T090000'); - set.exdate(dt); - - expect(set.exdates()).eql([dt]); - }); - }); -}); \ No newline at end of file + let set = new RRuleSet() + let dt = parse('19610201T090000') + set.exdate(dt) + + expect(set.exdates()).eql([dt]) + }) + }) +}) diff --git a/test/rrulestr.test.ts b/test/rrulestr.test.ts index 1ae2d511..e6d0cc4f 100644 --- a/test/rrulestr.test.ts +++ b/test/rrulestr.test.ts @@ -1,8 +1,8 @@ import { parse, datetime, datetimeUTC, testRecurring } from './lib/utils' import { RRule, RRuleSet, rrulestr, Frequency } from '../src' import { expect } from 'chai' -import { Days } from '../src/rrule'; -import { parseInput } from '../src/rrulestr'; +import { Days } from '../src/rrule' +import { parseInput } from '../src/rrulestr' describe('rrulestr', function () { // Enable additional toString() / fromString() tests @@ -20,267 +20,259 @@ describe('rrulestr', function () { this.ctx.ALSO_TEST_BEFORE_AFTER_BETWEEN = true it('parses an rrule', () => { - expect(rrulestr( - 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3\n' - )).to.be.instanceof(RRule) + expect( + rrulestr('DTSTART:19970902T090000Z\n' + 'RRULE:FREQ=YEARLY;COUNT=3\n') + ).to.be.instanceof(RRule) }) it('parses an rrule without frequency', () => { - const rRuleString = 'DTSTART:19970902T090000Z'; - const parsedRRuleSet = rrulestr( - rRuleString, { forceset: true } - ) as RRuleSet; - expect(parsedRRuleSet.toString()).to.be.equal(rRuleString); - - const parsedRRule = rrulestr(rRuleString) as RRule; - expect(parsedRRule.toString()).to.be.equal(rRuleString); + const rRuleString = 'DTSTART:19970902T090000Z' + const parsedRRuleSet = rrulestr(rRuleString, { forceset: true }) as RRuleSet + expect(parsedRRuleSet.toString()).to.be.equal(rRuleString) + + const parsedRRule = rrulestr(rRuleString) as RRule + expect(parsedRRule.toString()).to.be.equal(rRuleString) }) it('parses an rruleset when forceset=true', () => { - expect(rrulestr( - 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3\n', - { - forceset: true - } - )).to.be.instanceof(RRuleSet) + expect( + rrulestr('DTSTART:19970902T090000Z\n' + 'RRULE:FREQ=YEARLY;COUNT=3\n', { + forceset: true, + }) + ).to.be.instanceof(RRuleSet) }) it('parses an rruleset when there are multiple rrules', () => { - expect(rrulestr( - 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n' + - 'RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n' - )).to.be.instanceof(RRuleSet) + expect( + rrulestr( + 'DTSTART:19970902T090000Z\n' + + 'RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n' + + 'RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n' + ) + ).to.be.instanceof(RRuleSet) }) - testRecurring('testStr', - rrulestr( - 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3\n' - ), + testRecurring( + 'testStr', + rrulestr('DTSTART:19970902T090000Z\n' + 'RRULE:FREQ=YEARLY;COUNT=3\n'), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1998, 9, 2, 9, 0), - datetimeUTC(1999, 9, 2, 9, 0) + datetimeUTC(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrCase', - rrulestr( - 'dtstart:19970902T090000Z\n' + - 'rrule:freq=yearly;count=3\n' - ), + testRecurring( + 'testStrCase', + rrulestr('dtstart:19970902T090000Z\n' + 'rrule:freq=yearly;count=3\n'), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1998, 9, 2, 9, 0), - datetimeUTC(1999, 9, 2, 9, 0) + datetimeUTC(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrSpaces', - rrulestr( - ' DTSTART:19970902T090000Z ' + - ' RRULE:FREQ=YEARLY;COUNT=3 ' - ), + testRecurring( + 'testStrSpaces', + rrulestr(' DTSTART:19970902T090000Z ' + ' RRULE:FREQ=YEARLY;COUNT=3 '), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1998, 9, 2, 9, 0), - datetimeUTC(1999, 9, 2, 9, 0) + datetimeUTC(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrSpacesAndLines', + testRecurring( + 'testStrSpacesAndLines', rrulestr( - ' DTSTART:19970902T090000Z \n' + - ' \n RRULE:FREQ=YEARLY;COUNT=3 \n' + ' DTSTART:19970902T090000Z \n' + ' \n RRULE:FREQ=YEARLY;COUNT=3 \n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1998, 9, 2, 9, 0), - datetimeUTC(1999, 9, 2, 9, 0) + datetimeUTC(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrNoDTStart', - rrulestr( - 'RRULE:FREQ=YEARLY;COUNT=3\n', - { - dtstart: parse('19970902T090000') - } - ), + testRecurring( + 'testStrNoDTStart', + rrulestr('RRULE:FREQ=YEARLY;COUNT=3\n', { + dtstart: parse('19970902T090000'), + }), [ datetime(1997, 9, 2, 9, 0), datetime(1998, 9, 2, 9, 0), - datetime(1999, 9, 2, 9, 0) + datetime(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrValueOnly', - rrulestr( - 'FREQ=YEARLY;COUNT=3\n', - { - dtstart: parse('19970902T090000') - } - ), + testRecurring( + 'testStrValueOnly', + rrulestr('FREQ=YEARLY;COUNT=3\n', { + dtstart: parse('19970902T090000'), + }), [ datetime(1997, 9, 2, 9, 0), datetime(1998, 9, 2, 9, 0), - datetime(1999, 9, 2, 9, 0) + datetime(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrUnfold', - rrulestr( - 'FREQ=YEA\n RLY;COUNT=3\n', - { - unfold: true, - dtstart: parse('19970902T090000') - } - ), + testRecurring( + 'testStrUnfold', + rrulestr('FREQ=YEA\n RLY;COUNT=3\n', { + unfold: true, + dtstart: parse('19970902T090000'), + }), [ datetime(1997, 9, 2, 9, 0), datetime(1998, 9, 2, 9, 0), - datetime(1999, 9, 2, 9, 0) + datetime(1999, 9, 2, 9, 0), ] ) - testRecurring('testStrSet', + testRecurring( + 'testStrSet', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n' + - 'RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n' + 'RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n' + + 'RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1997, 9, 4, 9, 0), - datetimeUTC(1997, 9, 9, 9, 0) + datetimeUTC(1997, 9, 9, 9, 0), ] ) - testRecurring('testStrSetDate', + testRecurring( + 'testStrSetDate', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TU\n' + - 'RDATE:19970904T090000Z\n' + - 'RDATE:19970909T090000Z\n' + 'RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TU\n' + + 'RDATE:19970904T090000Z\n' + + 'RDATE:19970909T090000Z\n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1997, 9, 4, 9, 0), - datetimeUTC(1997, 9, 9, 9, 0) + datetimeUTC(1997, 9, 9, 9, 0), ] ) - testRecurring('testStrSetExRule', + testRecurring( + 'testStrSetExRule', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=6;BYDAY=TU,TH\n' + - 'EXRULE:FREQ=YEARLY;COUNT=3;BYDAY=TH\n' + 'RRULE:FREQ=YEARLY;COUNT=6;BYDAY=TU,TH\n' + + 'EXRULE:FREQ=YEARLY;COUNT=3;BYDAY=TH\n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1997, 9, 9, 9, 0), - datetimeUTC(1997, 9, 16, 9, 0) + datetimeUTC(1997, 9, 16, 9, 0), ] ) - testRecurring('testStrSetExDate', + testRecurring( + 'testStrSetExDate', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=6;BYDAY=TU,TH\n' + - 'EXDATE:19970904T090000Z\n' + - 'EXDATE:19970911T090000Z\n' + - 'EXDATE:19970918T090000Z\n' + 'RRULE:FREQ=YEARLY;COUNT=6;BYDAY=TU,TH\n' + + 'EXDATE:19970904T090000Z\n' + + 'EXDATE:19970911T090000Z\n' + + 'EXDATE:19970918T090000Z\n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1997, 9, 9, 9, 0), - datetimeUTC(1997, 9, 16, 9, 0) + datetimeUTC(1997, 9, 16, 9, 0), ] ) - testRecurring('testStrSetDateAndExDate', + testRecurring( + 'testStrSetDateAndExDate', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RDATE:19970902T090000Z\n' + - 'RDATE:19970904T090000Z\n' + - 'RDATE:19970909T090000Z\n' + - 'RDATE:19970911T090000Z\n' + - 'RDATE:19970916T090000Z\n' + - 'RDATE:19970918T090000Z\n' + - 'EXDATE:19970904T090000Z\n' + - 'EXDATE:19970911T090000Z\n' + - 'EXDATE:19970918T090000Z\n' + 'RDATE:19970902T090000Z\n' + + 'RDATE:19970904T090000Z\n' + + 'RDATE:19970909T090000Z\n' + + 'RDATE:19970911T090000Z\n' + + 'RDATE:19970916T090000Z\n' + + 'RDATE:19970918T090000Z\n' + + 'EXDATE:19970904T090000Z\n' + + 'EXDATE:19970911T090000Z\n' + + 'EXDATE:19970918T090000Z\n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1997, 9, 9, 9, 0), - datetimeUTC(1997, 9, 16, 9, 0) + datetimeUTC(1997, 9, 16, 9, 0), ] ) - testRecurring('testStrSetDateAndExRule', + testRecurring( + 'testStrSetDateAndExRule', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RDATE:19970902T090000Z\n' + - 'RDATE:19970904T090000Z\n' + - 'RDATE:19970909T090000Z\n' + - 'RDATE:19970911T090000Z\n' + - 'RDATE:19970916T090000Z\n' + - 'RDATE:19970918T090000Z\n' + - 'EXRULE:FREQ=YEARLY;COUNT=3;BYDAY=TH\n' + 'RDATE:19970902T090000Z\n' + + 'RDATE:19970904T090000Z\n' + + 'RDATE:19970909T090000Z\n' + + 'RDATE:19970911T090000Z\n' + + 'RDATE:19970916T090000Z\n' + + 'RDATE:19970918T090000Z\n' + + 'EXRULE:FREQ=YEARLY;COUNT=3;BYDAY=TH\n' ), [ datetimeUTC(1997, 9, 2, 9, 0), datetimeUTC(1997, 9, 9, 9, 0), - datetimeUTC(1997, 9, 16, 9, 0) + datetimeUTC(1997, 9, 16, 9, 0), ] ) - testRecurring('testStrKeywords', + testRecurring( + 'testStrKeywords', rrulestr( 'DTSTART:19970902T030000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3;INTERVAL=3;' + - 'BYMONTH=3;byweekday=TH;BYMONTHDAY=3;' + - 'BYHOUR=3;BYMINUTE=3;BYSECOND=3\n' + 'RRULE:FREQ=YEARLY;COUNT=3;INTERVAL=3;' + + 'BYMONTH=3;byweekday=TH;BYMONTHDAY=3;' + + 'BYHOUR=3;BYMINUTE=3;BYSECOND=3\n' ), [ datetimeUTC(2033, 3, 3, 3, 3, 3), datetimeUTC(2039, 3, 3, 3, 3, 3), - datetimeUTC(2072, 3, 3, 3, 3, 3) + datetimeUTC(2072, 3, 3, 3, 3, 3), ] ) - testRecurring('testStrNWeekDay', + testRecurring( + 'testStrNWeekDay', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3;BYDAY=1TU,-1TH\n' + 'RRULE:FREQ=YEARLY;COUNT=3;BYDAY=1TU,-1TH\n' ), [ datetimeUTC(1997, 12, 25, 9, 0), datetimeUTC(1998, 1, 6, 9, 0), - datetimeUTC(1998, 12, 31, 9, 0) + datetimeUTC(1998, 12, 31, 9, 0), ] ) - testRecurring('testStrNWeekDayLarge', + testRecurring( + 'testStrNWeekDayLarge', rrulestr( 'DTSTART:19970902T090000Z\n' + - 'RRULE:FREQ=YEARLY;COUNT=3;BYDAY=13TU,-13TH\n' + 'RRULE:FREQ=YEARLY;COUNT=3;BYDAY=13TU,-13TH\n' ), [ datetimeUTC(1997, 10, 2, 9, 0), datetimeUTC(1998, 3, 31, 9, 0), - datetimeUTC(1998, 10, 8, 9, 0) + datetimeUTC(1998, 10, 8, 9, 0), ] ) it('parses without TZID', () => { - const rrule = rrulestr( - 'DTSTART:19970902T090000\nRRULE:FREQ=WEEKLY' - ) + const rrule = rrulestr('DTSTART:19970902T090000\nRRULE:FREQ=WEEKLY') expect(rrule.origOptions).to.deep.include({ freq: Frequency.WEEKLY, @@ -291,14 +283,14 @@ describe('rrulestr', function () { it('parses TZID', () => { const rrule = rrulestr( 'DTSTART;TZID=America/New_York:19970902T090000\n' + - 'RRULE:FREQ=DAILY;UNTIL=19980902T090000' + 'RRULE:FREQ=DAILY;UNTIL=19980902T090000' ) expect(rrule.origOptions).to.deep.include({ tzid: 'America/New_York', freq: Frequency.DAILY, dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), - until: new Date(Date.UTC(1998, 8, 2, 9, 0, 0)) + until: new Date(Date.UTC(1998, 8, 2, 9, 0, 0)), }) }) @@ -311,7 +303,7 @@ describe('rrulestr', function () { until: new Date(Date.UTC(1999, 3, 4, 11, 0, 0)), dtstart: new Date(Date.UTC(1999, 0, 4, 11, 0, 0)), freq: Frequency.WEEKLY, - byweekday: [Days.TU.weekday, Days.WE.weekday] + byweekday: [Days.TU.weekday, Days.WE.weekday], }) }) @@ -325,53 +317,53 @@ describe('rrulestr', function () { dtstart: new Date(Date.UTC(1999, 0, 4, 11, 0, 0)), freq: Frequency.WEEKLY, tzid: 'America/New_York', - byweekday: [Days.TU.weekday, Days.WE.weekday] + byweekday: [Days.TU.weekday, Days.WE.weekday], }) }) it('parses a DTSTART if it is the first param', () => { const rrule = rrulestr( - "RRULE:DTSTART;TZID=America/Los_Angeles:20180719T111500;FREQ=DAILY;INTERVAL=1" + 'RRULE:DTSTART;TZID=America/Los_Angeles:20180719T111500;FREQ=DAILY;INTERVAL=1' ) expect(rrule.options).to.deep.include({ dtstart: new Date(Date.UTC(2018, 6, 19, 11, 15, 0)), freq: Frequency.DAILY, interval: 1, - tzid: 'America/Los_Angeles' + tzid: 'America/Los_Angeles', }) }) it('parses an RDATE with no TZID param', () => { const rruleset = rrulestr( - "DTSTART:20180719T111500Z\n"+ - "RRULE:FREQ=DAILY;INTERVAL=1\n" + - "RDATE:20180720T111500Z\n"+ - "EXDATE:20180721T111500Z" + 'DTSTART:20180719T111500Z\n' + + 'RRULE:FREQ=DAILY;INTERVAL=1\n' + + 'RDATE:20180720T111500Z\n' + + 'EXDATE:20180721T111500Z' ) as RRuleSet expect(rruleset.valueOf()).to.deep.equal([ - "DTSTART:20180719T111500Z", - "RRULE:FREQ=DAILY;INTERVAL=1", - "RDATE:20180720T111500Z", - "EXDATE:20180721T111500Z" - ]) + 'DTSTART:20180719T111500Z', + 'RRULE:FREQ=DAILY;INTERVAL=1', + 'RDATE:20180720T111500Z', + 'EXDATE:20180721T111500Z', + ]) }) it('parses an RDATE with a TZID param', () => { const rruleset = rrulestr( - "DTSTART;TZID=America/Los_Angeles:20180719T111500\n"+ - "RRULE:FREQ=DAILY;INTERVAL=1\n" + - "RDATE;TZID=America/Los_Angeles:20180720T111500\n"+ - "EXDATE;TZID=America/Los_Angeles:20180721T111500" + 'DTSTART;TZID=America/Los_Angeles:20180719T111500\n' + + 'RRULE:FREQ=DAILY;INTERVAL=1\n' + + 'RDATE;TZID=America/Los_Angeles:20180720T111500\n' + + 'EXDATE;TZID=America/Los_Angeles:20180721T111500' ) as RRuleSet expect(rruleset.valueOf()).to.deep.equal([ - "DTSTART;TZID=America/Los_Angeles:20180719T111500", - "RRULE:FREQ=DAILY;INTERVAL=1", - "RDATE;TZID=America/Los_Angeles:20180720T111500", - "EXDATE;TZID=America/Los_Angeles:20180721T111500" - ]) + 'DTSTART;TZID=America/Los_Angeles:20180719T111500', + 'RRULE:FREQ=DAILY;INTERVAL=1', + 'RDATE;TZID=America/Los_Angeles:20180720T111500', + 'EXDATE;TZID=America/Los_Angeles:20180721T111500', + ]) }) }) @@ -379,31 +371,34 @@ describe('parseInput', () => { it('parses an input into a structure', () => { const output = parseInput( 'DTSTART;TZID=America/New_York:19970902T090000\n' + - 'RRULE:FREQ=DAILY;UNTIL=19980902T090000;INTERVAL=1\n' + - 'RDATE:19970902T090000Z\n' + - 'RDATE:19970904T090000Z\n' + - 'EXDATE:19970904T090000Z\n' + - 'EXRULE:FREQ=WEEKLY;INTERVAL=2\n' - , {}) + 'RRULE:FREQ=DAILY;UNTIL=19980902T090000;INTERVAL=1\n' + + 'RDATE:19970902T090000Z\n' + + 'RDATE:19970904T090000Z\n' + + 'EXDATE:19970904T090000Z\n' + + 'EXRULE:FREQ=WEEKLY;INTERVAL=2\n', + {} + ) expect(output).to.deep.include({ dtstart: new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), tzid: 'America/New_York', - rrulevals: [{ - interval: 1, - freq: Frequency.DAILY, - until: new Date(Date.UTC(1998, 8, 2, 9, 0, 0)) - }], - exdatevals: [ - new Date(Date.UTC(1997, 8, 4, 9, 0, 0)), + rrulevals: [ + { + interval: 1, + freq: Frequency.DAILY, + until: new Date(Date.UTC(1998, 8, 2, 9, 0, 0)), + }, ], + exdatevals: [new Date(Date.UTC(1997, 8, 4, 9, 0, 0))], rdatevals: [ new Date(Date.UTC(1997, 8, 2, 9, 0, 0)), new Date(Date.UTC(1997, 8, 4, 9, 0, 0)), ], - exrulevals: [{ - interval: 2, - freq: Frequency.WEEKLY - }] + exrulevals: [ + { + interval: 2, + freq: Frequency.WEEKLY, + }, + ], }) }) }) diff --git a/tsconfig.test.json b/tsconfig.test.json index c22eb496..21fb3ee5 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -10,16 +10,8 @@ "target": "es6", "jsx": "react", "baseUrl": ".", - "rootDirs": [ - "./src/", - "./test/", - ] + "rootDirs": ["./src/", "./test/"] }, - "include": [ - "./src/**/*", - "./test/**/*" - ], - "exclude": [ - "node_modules", - ] -} \ No newline at end of file + "include": ["./src/**/*", "./test/**/*"], + "exclude": ["node_modules"] +} diff --git a/webpack.config.js b/webpack.config.js index 2803dbba..c6c80e07 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,21 +12,21 @@ const commonConfig = { path: paths.es5, library: 'rrule', libraryTarget: 'umd', - globalObject: "typeof self !== 'undefined' ? self : this" + globalObject: "typeof self !== 'undefined' ? self : this", }, devtool: 'source-map', mode: 'production', resolve: { - extensions: ['.js', '.ts'] + extensions: ['.js', '.ts'], }, module: { rules: [ { exclude: /node_modules/, - loader: "ts-loader", - test: /\.ts$/ - } - ] + loader: 'ts-loader', + test: /\.ts$/, + }, + ], }, optimization: { minimize: true, @@ -36,11 +36,14 @@ const commonConfig = { } }; -const rruleConfig = Object.assign({ - entry: { - rrule: path.join(paths.source, "index.ts"), - 'rrule.min': path.join(paths.source, "index.ts") +const rruleConfig = Object.assign( + { + entry: { + rrule: path.join(paths.source, 'index.ts'), + 'rrule.min': path.join(paths.source, 'index.ts'), + }, }, -}, commonConfig); + commonConfig +) -module.exports = [rruleConfig]; +module.exports = [rruleConfig] From aee5098ab5f5838556abace869710ce8e9679ac8 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 19:51:28 +0200 Subject: [PATCH 5/8] extend the recommended plugins --- .eslintrc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index a0b4f7e9..f7a2225b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,7 +3,11 @@ module.exports = { browser: true, node: true, }, - extends: ['prettier'], + extends: [ + 'prettier', + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + ], parser: '@typescript-eslint/parser', parserOptions: { project: 'tsconfig.json', From 7039b71542564fbb8a7b0c0ead61fc3c77f878e5 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 20:02:36 +0200 Subject: [PATCH 6/8] use format-check for ci build --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a37fd8c0..4cdbcf1a 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,10 @@ "url": "git://github.com/jakubroztocil/rrule.git" }, "scripts": { - "build": "yarn lint && yarn format && tsc && webpack && tsc dist/esm/**/*.d.ts", + "build": "yarn lint && yarn format-check && tsc && webpack && tsc dist/esm/**/*.d.ts", "lint": "yarn eslint --ext .ts,.js --fix --config .eslintrc.js", "format": "yarn prettier --write .", + "format-check": "yarn prettier --check .", "run-ts": "TS_NODE_PROJECT=tsconfig.test.json node --loader ts-node/esm", "test": "yarn run-ts ./node_modules/.bin/mocha **/*.test.ts", "test-ci": "yarn run-ts ./node_modules/.bin/nyc yarn run-ts ./node_modules/.bin/mocha **/*.test.ts" From 26930980f3029a0d801b89b8875324f38f4eeee3 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 20:58:19 +0200 Subject: [PATCH 7/8] remove unused deps --- package.json | 2 - yarn.lock | 346 +-------------------------------------------------- 2 files changed, 4 insertions(+), 344 deletions(-) diff --git a/package.json b/package.json index 4cdbcf1a..b2e3e50f 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsdoc": "^39.3.2", "eslint-plugin-prettier": "^4.0.0", - "html-webpack-plugin": "^3.2.0", "husky": "^8.0.1", "mocha": "^10.0.0", "mockdate": "^3.0.5", @@ -67,7 +66,6 @@ "terser-webpack-plugin": "^5.3.3", "ts-loader": "^9.3.0", "ts-node": "^10.8.1", - "tslint-eslint-rules": "^5.4.0", "typescript": "^4.7.3", "webpack": "^5.73.0", "webpack-cli": "^4.9.2" diff --git a/yarn.lock b/yarn.lock index 0f75cc4c..32b2717b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -705,11 +705,6 @@ ansi-colors@4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - ansi-regex@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" @@ -806,21 +801,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -909,13 +894,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@3.0.x: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -985,13 +963,6 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== -clean-css@4.2.x: - version "4.2.4" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.4.tgz#733bf46eba4e607c6891ea57c24a989356831178" - integrity sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A== - dependencies: - source-map "~0.6.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -1062,11 +1033,6 @@ colorette@^2.0.14: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.17.tgz#5dd4c0d15e2984b7433cb4a9f2ead45063b80c47" integrity sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g== -commander@2.17.x: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== - commander@^2.20.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -1077,11 +1043,6 @@ commander@^7.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@~2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - comment-parser@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" @@ -1154,22 +1115,6 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-select@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - debug@4.3.4, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1227,13 +1172,6 @@ default-require-extensions@^3.0.0: dependencies: strip-bom "^4.0.0" -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -1259,14 +1197,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctrine@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" - integrity sha512-qiB/Rir6Un6Ad/TIgTRzsremsTGWzs8j7woXvp14jgq00676uBiBT5eUOi+FgRywZFVy5Us/c04ISRpZhRbS6w== - dependencies: - esutils "^1.1.6" - isarray "0.0.1" - doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -1281,43 +1211,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-converter@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@^2.5.2, domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - electron-to-chromium@^1.4.147: version "1.4.148" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.148.tgz#437430e03c58ccd1d05701f66980afe54d2253ec" @@ -1333,11 +1226,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng== - enhanced-resolve@^5.0.0, enhanced-resolve@^5.9.3: version "5.9.3" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" @@ -1346,11 +1234,6 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" @@ -1391,16 +1274,6 @@ es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19 string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" -es-abstract@^1.5.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" @@ -1413,14 +1286,6 @@ es-shim-unscopables@^1.0.0: dependencies: has "^1.0.3" -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -1622,11 +1487,6 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -esutils@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" - integrity sha512-RG1ZkUT7iFJG9LSHr7KDuuMSlujfeTtMNIcInURxKAxhMtwQhI3NrQhz26gZQYlsYZQKzsnwtpKrFKj9K9Qu1A== - esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -1765,10 +1625,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - foreground-child@^1.5.6: version "1.5.6" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" @@ -1995,7 +1851,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has@^1.0.1, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -2010,7 +1866,7 @@ hasha@^5.0.0: is-stream "^2.0.0" type-fest "^0.8.0" -he@1.2.0, he@1.2.x: +he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -2024,42 +1880,6 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-minifier@^3.2.3: - version "3.5.21" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" - integrity sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA== - dependencies: - camel-case "3.0.x" - clean-css "4.2.x" - commander "2.17.x" - he "1.2.x" - param-case "2.1.x" - relateurl "0.2.x" - uglify-js "3.4.x" - -html-webpack-plugin@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" - integrity sha512-Br4ifmjQojUP4EmHnRBoUIYcZ9J7M4bTMcm7u6xoIAIuq2Nte4TzXX0533owvkQKQD1WeMTTTyD4Ni4QKxS0Bg== - dependencies: - html-minifier "^3.2.3" - loader-utils "^0.2.16" - lodash "^4.17.3" - pretty-error "^2.0.2" - tapable "^1.0.0" - toposort "^1.0.0" - util.promisify "1.0.0" - -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -2167,10 +1987,6 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" @@ -2238,7 +2054,7 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-regex@^1.0.4, is-regex@^1.1.4: +is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -2265,10 +2081,6 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" @@ -2298,10 +2110,6 @@ is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2450,10 +2258,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -2494,16 +2298,6 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^0.2.16: - version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - integrity sha512-tiv66G0SmiOx+pLWMtGEkfSEejxvb6N6uRrQjfWJIT79W9GMpgKeCAmm9aVBKtd4WEgntciI8CsGqjpDoCWJug== - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -2544,15 +2338,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lodash@^4.17.3: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - log-symbols@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -2568,11 +2353,6 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" -lower-case@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== - lru-cache@^4.0.1: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" @@ -2738,13 +2518,6 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -no-case@^2.2.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== - dependencies: - lower-case "^1.1.1" - node-preload@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" @@ -2788,13 +2561,6 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - nyc@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" @@ -2828,19 +2594,11 @@ nyc@^15.1.0: test-exclude "^6.0.0" yargs "^15.0.2" -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - object-inspect@^1.12.0, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-keys@^1.0.8: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -2856,13 +2614,6 @@ object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - object.values@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" @@ -2981,12 +2732,6 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" -param-case@2.1.x: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - dependencies: - no-case "^2.2.0" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -3092,13 +2837,6 @@ prettier@^2.6.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== -pretty-error@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" - dependencies: - renderkid "^2.0.1" - utila "~0.4" - process-on-spawn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" @@ -3172,10 +2910,6 @@ regexpp@^3.2.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== -relateurl@0.2.x: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" @@ -3183,17 +2917,6 @@ release-zalgo@^1.0.0: dependencies: es6-error "^4.0.1" -renderkid@^2.0.1: - version "2.0.7" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" - integrity sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ== - dependencies: - css-select "^4.1.3" - dom-converter "^0.2.0" - htmlparser2 "^6.1.0" - lodash "^4.17.21" - strip-ansi "^3.0.1" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -3384,7 +3107,7 @@ source-map-support@^0.5.16, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -3477,13 +3200,6 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" -strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -3551,11 +3267,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -3617,11 +3328,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toposort@^1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" - integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= - ts-loader@^9.3.0: version "9.3.0" resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.0.tgz#980f4dbfb60e517179e15e10ed98e454b132159f" @@ -3661,10 +3367,6 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" - tslib@^1.8.1: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -3674,20 +3376,6 @@ tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslint-eslint-rules@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz#e488cc9181bf193fe5cd7bfca213a7695f1737b5" - dependencies: - doctrine "0.7.2" - tslib "1.9.0" - tsutils "^3.0.0" - -tsutils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.0.0.tgz#0c5070a17a0503e056da038c48b5a1870a50a9ad" - dependencies: - tslib "^1.8.1" - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -3729,14 +3417,6 @@ typescript@^4.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== -uglify-js@3.4.x: - version "3.4.10" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" - integrity sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw== - dependencies: - commander "~2.19.0" - source-map "~0.6.1" - uglify-js@^3.1.4: version "3.7.2" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.2.tgz#cb1a601e67536e9ed094a92dd1e333459643d3f9" @@ -3755,11 +3435,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -upper-case@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -3767,19 +3442,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -util.promisify@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= - uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" From ecddb8c6229e1464e1fdf955f3a85a59b8d2dc33 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 20:59:07 +0200 Subject: [PATCH 8/8] update precommit hook to format --- .husky/pre-commit | 1 + webpack.config.js | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 6cdaab7b..5d073c9d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" yarn lint +yarn format \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index c6c80e07..12731b72 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,10 +1,10 @@ -const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); +const path = require('path') +const TerserPlugin = require('terser-webpack-plugin') const paths = { source: path.resolve(__dirname, 'src'), - es5: path.resolve(__dirname, "dist", "es5"), -}; + es5: path.resolve(__dirname, 'dist', 'es5'), +} const commonConfig = { output: { @@ -30,11 +30,9 @@ const commonConfig = { }, optimization: { minimize: true, - minimizer: [ - new TerserPlugin(), - ] - } -}; + minimizer: [new TerserPlugin()], + }, +} const rruleConfig = Object.assign( {