From e6009846d07ed8fd36433bb761dd3c7a478573a7 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Sun, 30 Jan 2022 17:02:37 +0800 Subject: [PATCH] test: replace ava with vitest --- package.json | 12 +- pnpm-lock.yaml | 1019 +++++++------------------ test/__snapshots__/index.test.ts.snap | 311 ++++++++ test/index.test.ts | 426 ++++++----- test/snapshots/index.test.ts.md | 493 ------------ test/snapshots/index.test.ts.snap | Bin 2583 -> 0 bytes tsconfig.json | 6 +- vitest.config.ts | 9 + 8 files changed, 806 insertions(+), 1470 deletions(-) create mode 100644 test/__snapshots__/index.test.ts.snap delete mode 100644 test/snapshots/index.test.ts.md delete mode 100644 test/snapshots/index.test.ts.snap create mode 100644 vitest.config.ts diff --git a/package.json b/package.json index 2e4610a..ae93a86 100644 --- a/package.json +++ b/package.json @@ -21,17 +21,9 @@ "build": "tsup src/cli-*.ts src/index.ts src/rollup.ts --clean --splitting", "prepublishOnly": "npm run build", "test": "npm run build && npm run test-only", - "test-only": "ava test/*.test.ts --fail-fast --timeout 60s", + "test-only": "vitest run", "build-fast": "npm run build -- --no-dts" }, - "ava": { - "extensions": [ - "ts" - ], - "require": [ - "sucrase/register" - ] - }, "dependencies": { "bundle-require": "^3.0.2", "cac": "^6.7.12", @@ -56,7 +48,6 @@ "@types/fs-extra": "9.0.13", "@types/node": "14.18.4", "@types/resolve": "1.20.1", - "ava": "4.0.0", "colorette": "2.0.16", "consola": "2.15.3", "flat": "5.0.2", @@ -74,6 +65,7 @@ "tsconfig-paths": "3.12.0", "tsup": "5.11.10", "typescript": "4.5.4", + "vitest": "^0.2.5", "wait-for-expect": "3.0.2" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d1125f..4550996 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,6 @@ specifiers: '@types/fs-extra': 9.0.13 '@types/node': 14.18.4 '@types/resolve': 1.20.1 - ava: 4.0.0 bundle-require: ^3.0.2 cac: ^6.7.12 chokidar: ^3.5.1 @@ -40,6 +39,7 @@ specifiers: tsconfig-paths: 3.12.0 tsup: 5.11.10 typescript: 4.5.4 + vitest: ^0.2.5 wait-for-expect: 3.0.2 dependencies: @@ -66,7 +66,6 @@ devDependencies: '@types/fs-extra': 9.0.13 '@types/node': 14.18.4 '@types/resolve': 1.20.1 - ava: 4.0.0 colorette: 2.0.16 consola: 2.15.3 flat: 5.0.2 @@ -84,6 +83,7 @@ devDependencies: tsconfig-paths: 3.12.0 tsup: 5.11.10_typescript@4.5.4 typescript: 4.5.4 + vitest: 0.2.5 wait-for-expect: 3.0.2 packages: @@ -300,6 +300,16 @@ packages: '@swc/core-win32-x64-msvc': 1.2.126 dev: true + /@types/chai-subset/1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.0 + dev: true + + /@types/chai/4.3.0: + resolution: {integrity: sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==} + dev: true + /@types/debug/4.1.7: resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} dependencies: @@ -336,43 +346,6 @@ packages: resolution: {integrity: sha512-Ku5+GPFa12S3W26Uwtw+xyrtIpaZsGYHH6zxNbZlstmlvMYSZRzOwzwsXbxlVUbHyUucctSyuFtu6bNxwYomIw==} dev: true - /acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true - - /acorn/8.7.0: - resolution: {integrity: sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /aggregate-error/3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} - dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 - dev: true - - /aggregate-error/4.0.0: - resolution: {integrity: sha512-8DGp7zUt1E9k0NE2q4jlXHk+V3ORErmwolEdRz9iV+LKJ40WhMHh92cxAvhqV2I+zEn/gotIoqoMs0NjF3xofg==} - engines: {node: '>=12'} - dependencies: - clean-stack: 4.1.0 - indent-string: 5.0.0 - dev: true - - /ansi-regex/5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true - - /ansi-regex/6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: true - /ansi-styles/3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -381,18 +354,6 @@ packages: dev: true optional: true - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - - /ansi-styles/6.1.0: - resolution: {integrity: sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==} - engines: {node: '>=12'} - dev: true - /any-promise/1.3.0: resolution: {integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8=} @@ -403,98 +364,12 @@ packages: normalize-path: 3.0.0 picomatch: 2.3.0 - /argparse/1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /array-find-index/1.0.2: - resolution: {integrity: sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=} - engines: {node: '>=0.10.0'} - dev: true - /array-union/2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - /array-union/3.0.1: - resolution: {integrity: sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==} - engines: {node: '>=12'} - dev: true - - /arrgv/1.0.2: - resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==} - engines: {node: '>=8.0.0'} - dev: true - - /arrify/2.0.1: - resolution: {integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==} - engines: {node: '>=8'} - dev: true - - /arrify/3.0.0: - resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} - engines: {node: '>=12'} - dev: true - - /ava/4.0.0: - resolution: {integrity: sha512-XEVx8EE/ZseJ3nz3nfVG+UoT4aGyUmD5s6SZFs5Aqi04Yr77DZAx7ItyW5hThtYywkOLdsM68as/u6P5fmb52Q==} - engines: {node: '>=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=17'} - hasBin: true - peerDependencies: - '@ava/typescript': '*' - peerDependenciesMeta: - '@ava/typescript': - optional: true - dependencies: - acorn: 8.7.0 - acorn-walk: 8.2.0 - ansi-styles: 6.1.0 - arrgv: 1.0.2 - arrify: 3.0.0 - callsites: 4.0.0 - cbor: 8.1.0 - chalk: 5.0.0 - chokidar: 3.5.2 - chunkd: 2.0.1 - ci-info: 3.3.0 - ci-parallel-vars: 1.0.1 - clean-yaml-object: 0.1.0 - cli-truncate: 3.1.0 - code-excerpt: 3.0.0 - common-path-prefix: 3.0.0 - concordance: 5.0.4 - currently-unhandled: 0.4.1 - debug: 4.3.3 - del: 6.0.0 - emittery: 0.10.0 - figures: 4.0.0 - globby: 12.0.2 - ignore-by-default: 2.0.0 - indent-string: 5.0.0 - is-error: 2.2.2 - is-plain-object: 5.0.0 - is-promise: 4.0.0 - matcher: 5.0.0 - mem: 9.0.1 - ms: 2.1.3 - p-event: 5.0.1 - p-map: 5.3.0 - picomatch: 2.3.0 - pkg-conf: 4.0.0 - plur: 5.1.0 - pretty-ms: 7.0.1 - resolve-cwd: 3.0.0 - slash: 3.0.0 - stack-utils: 2.0.5 - strip-ansi: 7.0.1 - supertap: 2.0.0 - temp-dir: 2.0.0 - write-file-atomic: 3.0.3 - yargs: 17.3.1 - transitivePeerDependencies: - - supports-color + /assertion-error/1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true /balanced-match/1.0.2: @@ -504,10 +379,6 @@ packages: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - /blueimp-md5/2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - dev: true - /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -542,16 +413,17 @@ packages: resolution: {integrity: sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==} engines: {node: '>=8'} - /callsites/4.0.0: - resolution: {integrity: sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==} - engines: {node: '>=12.20'} - dev: true - - /cbor/8.1.0: - resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} - engines: {node: '>=12.19'} + /chai/4.3.6: + resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} + engines: {node: '>=4'} dependencies: - nofilter: 3.1.0 + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 3.0.1 + get-func-name: 2.0.0 + loupe: 2.3.1 + pathval: 1.1.1 + type-detect: 4.0.8 dev: true /chalk/2.4.2: @@ -564,9 +436,8 @@ packages: dev: true optional: true - /chalk/5.0.0: - resolution: {integrity: sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + /check-error/1.0.2: + resolution: {integrity: sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=} dev: true /chokidar/3.5.2: @@ -583,58 +454,6 @@ packages: optionalDependencies: fsevents: 2.3.2 - /chunkd/2.0.1: - resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} - dev: true - - /ci-info/3.3.0: - resolution: {integrity: sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==} - dev: true - - /ci-parallel-vars/1.0.1: - resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} - dev: true - - /clean-stack/2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - dev: true - - /clean-stack/4.1.0: - resolution: {integrity: sha512-dxXQYI7mfQVcaF12s6sjNFoZ6ZPDQuBBLp3QJ5156k9EvUFClUoZ11fo8HnLQO241DDVntHEug8MOuFO5PSfRg==} - engines: {node: '>=12'} - dependencies: - escape-string-regexp: 5.0.0 - dev: true - - /clean-yaml-object/0.1.0: - resolution: {integrity: sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=} - engines: {node: '>=0.10.0'} - dev: true - - /cli-truncate/3.1.0: - resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - slice-ansi: 5.0.0 - string-width: 5.0.1 - dev: true - - /cliui/7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /code-excerpt/3.0.0: - resolution: {integrity: sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==} - engines: {node: '>=10'} - dependencies: - convert-to-spaces: 1.0.2 - dev: true - /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -642,22 +461,11 @@ packages: dev: true optional: true - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - /color-name/1.1.3: resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} dev: true optional: true - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - /colorette/2.0.16: resolution: {integrity: sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==} dev: true @@ -666,36 +474,13 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} - /common-path-prefix/3.0.0: - resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - dev: true - /concat-map/0.0.1: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - /concordance/5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.2.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.3.5 - well-known-symbols: 2.0.0 - dev: true - /consola/2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} dev: true - /convert-to-spaces/1.0.2: - resolution: {integrity: sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=} - engines: {node: '>= 4'} - dev: true - /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -704,20 +489,6 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /currently-unhandled/0.4.1: - resolution: {integrity: sha1-mI3zP+qxke95mmE2nddsF635V+o=} - engines: {node: '>=0.10.0'} - dependencies: - array-find-index: 1.0.2 - dev: true - - /date-time/3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - dependencies: - time-zone: 1.0.0 - dev: true - /debug/4.3.2: resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} engines: {node: '>=6.0'} @@ -729,30 +500,11 @@ packages: dependencies: ms: 2.1.2 - /debug/4.3.3: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + /deep-eql/3.0.1: + resolution: {integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==} + engines: {node: '>=0.12'} dependencies: - ms: 2.1.2 - dev: true - - /del/6.0.0: - resolution: {integrity: sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==} - engines: {node: '>=10'} - dependencies: - globby: 11.0.4 - graceful-fs: 4.2.8 - is-glob: 4.0.3 - is-path-cwd: 2.2.0 - is-path-inside: 3.0.3 - p-map: 4.0.0 - rimraf: 3.0.2 - slash: 3.0.0 + type-detect: 4.0.8 dev: true /dir-glob/3.0.1: @@ -761,18 +513,13 @@ packages: dependencies: path-type: 4.0.0 - /emittery/0.10.0: - resolution: {integrity: sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==} - engines: {node: '>=12'} - dev: true - - /emoji-regex/8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - - /emoji-regex/9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + /esbuild-android-arm64/0.13.15: + resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==} + cpu: [arm64] + os: [android] + requiresBuild: true dev: true + optional: true /esbuild-android-arm64/0.14.2: resolution: {integrity: sha512-hEixaKMN3XXCkoe+0WcexO4CcBVU5DCSUT+7P8JZiWZCbAjSkc9b6Yz2X5DSfQmRCtI/cQRU6TfMYrMQ5NBfdw==} @@ -781,6 +528,14 @@ packages: requiresBuild: true optional: true + /esbuild-darwin-64/0.13.15: + resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-64/0.14.2: resolution: {integrity: sha512-Uq8t0cbJQkxkQdbUfOl2wZqZ/AtLZjvJulR1HHnc96UgyzG9YlCLSDMiqjM+NANEy7/zzvwKJsy3iNC9wwqLJA==} cpu: [x64] @@ -788,6 +543,14 @@ packages: requiresBuild: true optional: true + /esbuild-darwin-arm64/0.13.15: + resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-arm64/0.14.2: resolution: {integrity: sha512-619MSa17sr7YCIrUj88KzQu2ESA4jKYtIYfLU/smX6qNgxQt3Y/gzM4s6sgJ4fPQzirvmXgcHv1ZNQAs/Xh48A==} cpu: [arm64] @@ -795,6 +558,14 @@ packages: requiresBuild: true optional: true + /esbuild-freebsd-64/0.13.15: + resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-64/0.14.2: resolution: {integrity: sha512-aP6FE/ZsChZpUV6F3HE3x1Pz0paoYXycJ7oLt06g0G9dhJKknPawXCqQg/WMyD+ldCEZfo7F1kavenPdIT/SGQ==} cpu: [x64] @@ -802,6 +573,14 @@ packages: requiresBuild: true optional: true + /esbuild-freebsd-arm64/0.13.15: + resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-arm64/0.14.2: resolution: {integrity: sha512-LSm98WTb1QIhyS83+Po0KTpZNdd2XpVpI9ua5rLWqKWbKeNRFwOsjeiuwBaRNc+O32s9oC2ZMefETxHBV6VNkQ==} cpu: [arm64] @@ -809,6 +588,14 @@ packages: requiresBuild: true optional: true + /esbuild-linux-32/0.13.15: + resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-32/0.14.2: resolution: {integrity: sha512-8VxnNEyeUbiGflTKcuVc5JEPTqXfsx2O6ABwUbfS1Hp26lYPRPC7pKQK5Dxa0MBejGc50jy7YZae3EGQUQ8EkQ==} cpu: [ia32] @@ -816,6 +603,14 @@ packages: requiresBuild: true optional: true + /esbuild-linux-64/0.13.15: + resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-64/0.14.2: resolution: {integrity: sha512-4bzMS2dNxOJoFIiHId4w+tqQzdnsch71JJV1qZnbnErSFWcR9lRgpSqWnTTFtv6XM+MvltRzSXC5wQ7AEBY6Hg==} cpu: [x64] @@ -823,6 +618,14 @@ packages: requiresBuild: true optional: true + /esbuild-linux-arm/0.13.15: + resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm/0.14.2: resolution: {integrity: sha512-PaylahvMHhH8YMfJPMKEqi64qA0Su+d4FNfHKvlKes/2dUe4QxgbwXT9oLVgy8iJdcFMrO7By4R8fS8S0p8aVQ==} cpu: [arm] @@ -830,6 +633,14 @@ packages: requiresBuild: true optional: true + /esbuild-linux-arm64/0.13.15: + resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm64/0.14.2: resolution: {integrity: sha512-RlIVp0RwJrdtasDF1vTFueLYZ8WuFzxoQ1OoRFZOTyJHCGCNgh7xJIC34gd7B7+RT0CzLBB4LcM5n0LS+hIoww==} cpu: [arm64] @@ -837,6 +648,14 @@ packages: requiresBuild: true optional: true + /esbuild-linux-mips64le/0.13.15: + resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-mips64le/0.14.2: resolution: {integrity: sha512-Fdwrq2roFnO5oetIiUQQueZ3+5soCxBSJswg3MvYaXDomj47BN6oAWMZgLrFh1oVrtWrxSDLCJBenYdbm2s+qQ==} cpu: [mips64el] @@ -844,6 +663,14 @@ packages: requiresBuild: true optional: true + /esbuild-linux-ppc64le/0.13.15: + resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-ppc64le/0.14.2: resolution: {integrity: sha512-vxptskw8JfCDD9QqpRO0XnsM1osuWeRjPaXX1TwdveLogYsbdFtcuiuK/4FxGiNMUr1ojtnCS2rMPbY8puc5NA==} cpu: [ppc64] @@ -851,6 +678,14 @@ packages: requiresBuild: true optional: true + /esbuild-netbsd-64/0.13.15: + resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-netbsd-64/0.14.2: resolution: {integrity: sha512-I8+LzYK5iSNpspS9eCV9sW67Rj8FgMHimGri4mKiGAmN0pNfx+hFX146rYtzGtewuxKtTsPywWteHx+hPRLDsw==} cpu: [x64] @@ -858,6 +693,14 @@ packages: requiresBuild: true optional: true + /esbuild-openbsd-64/0.13.15: + resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-openbsd-64/0.14.2: resolution: {integrity: sha512-120HgMe9elidWUvM2E6mMf0csrGwx8sYDqUIJugyMy1oHm+/nT08bTAVXuwYG/rkMIqsEO9AlMxuYnwR6En/3Q==} cpu: [x64] @@ -865,6 +708,14 @@ packages: requiresBuild: true optional: true + /esbuild-sunos-64/0.13.15: + resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /esbuild-sunos-64/0.14.2: resolution: {integrity: sha512-Q3xcf9Uyfra9UuCFxoLixVvdigo0daZaKJ97TL2KNA4bxRUPK18wwGUk3AxvgDQZpRmg82w9PnkaNYo7a+24ow==} cpu: [x64] @@ -872,6 +723,14 @@ packages: requiresBuild: true optional: true + /esbuild-windows-32/0.13.15: + resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-32/0.14.2: resolution: {integrity: sha512-TW7O49tPsrq+N1sW8mb3m24j/iDGa4xzAZH4wHWwoIzgtZAYPKC0hpIhufRRG/LA30bdMChO9pjJZ5mtcybtBQ==} cpu: [ia32] @@ -879,6 +738,14 @@ packages: requiresBuild: true optional: true + /esbuild-windows-64/0.13.15: + resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-64/0.14.2: resolution: {integrity: sha512-Rym6ViMNmi1E2QuQMWy0AFAfdY0wGwZD73BnzlsQBX5hZBuy/L+Speh7ucUZ16gwsrMM9v86icZUDrSN/lNBKg==} cpu: [x64] @@ -886,6 +753,14 @@ packages: requiresBuild: true optional: true + /esbuild-windows-arm64/0.13.15: + resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-arm64/0.14.2: resolution: {integrity: sha512-ZrLbhr0vX5Em/P1faMnHucjVVWPS+m3tktAtz93WkMZLmbRJevhiW1y4CbulBd2z0MEdXZ6emDa1zFHq5O5bSA==} cpu: [arm64] @@ -893,6 +768,30 @@ packages: requiresBuild: true optional: true + /esbuild/0.13.15: + resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==} + hasBin: true + requiresBuild: true + optionalDependencies: + esbuild-android-arm64: 0.13.15 + esbuild-darwin-64: 0.13.15 + esbuild-darwin-arm64: 0.13.15 + esbuild-freebsd-64: 0.13.15 + esbuild-freebsd-arm64: 0.13.15 + esbuild-linux-32: 0.13.15 + esbuild-linux-64: 0.13.15 + esbuild-linux-arm: 0.13.15 + esbuild-linux-arm64: 0.13.15 + esbuild-linux-mips64le: 0.13.15 + esbuild-linux-ppc64le: 0.13.15 + esbuild-netbsd-64: 0.13.15 + esbuild-openbsd-64: 0.13.15 + esbuild-sunos-64: 0.13.15 + esbuild-windows-32: 0.13.15 + esbuild-windows-64: 0.13.15 + esbuild-windows-arm64: 0.13.15 + dev: true + /esbuild/0.14.2: resolution: {integrity: sha512-l076A6o/PIgcyM24s0dWmDI/b8RQf41uWoJu9I0M71CtW/YSw5T5NUeXxs5lo2tFQD+O4CW4nBHJXx3OY5NpXg==} hasBin: true @@ -916,42 +815,16 @@ packages: esbuild-windows-64: 0.14.2 esbuild-windows-arm64: 0.14.2 - /escalade/3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - /escape-string-regexp/1.0.5: resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} engines: {node: '>=0.8.0'} dev: true optional: true - /escape-string-regexp/2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - - /escape-string-regexp/5.0.0: - resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} - engines: {node: '>=12'} - dev: true - - /esprima/4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true - /estree-walker/1.0.1: resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} dev: true - /esutils/2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true - /execa/5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -966,10 +839,6 @@ packages: signal-exit: 3.0.6 strip-final-newline: 2.0.0 - /fast-diff/1.2.0: - resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} - dev: true - /fast-glob/3.2.7: resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} engines: {node: '>=8'} @@ -985,28 +854,12 @@ packages: dependencies: reusify: 1.0.4 - /figures/4.0.0: - resolution: {integrity: sha512-VnYcWq6H6F0qDN0QnorznBr0abEovifzUokmnezpKZBUbDmbLAt7LMryOp1TKFVxLxyNYkxEkCEADZR58U9oSw==} - engines: {node: '>=12'} - dependencies: - escape-string-regexp: 5.0.0 - is-unicode-supported: 1.1.0 - dev: true - /fill-range/7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 - /find-up/6.2.0: - resolution: {integrity: sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - locate-path: 7.0.0 - path-exists: 5.0.0 - dev: true - /flat/5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -1035,9 +888,8 @@ packages: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true - /get-caller-file/2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} + /get-func-name/2.0.0: + resolution: {integrity: sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=} dev: true /get-stream/6.0.1: @@ -1060,17 +912,6 @@ packages: once: 1.4.0 path-is-absolute: 1.0.1 - /glob/7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.0.4 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - /globby/11.0.4: resolution: {integrity: sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==} engines: {node: '>=10'} @@ -1082,18 +923,6 @@ packages: merge2: 1.4.1 slash: 3.0.0 - /globby/12.0.2: - resolution: {integrity: sha512-lAsmb/5Lww4r7MM9nCCliDZVIKbZTavrsunAsHLr9oHthrZP1qi7/gAnHOsUs9bLvEt2vKVJhHmxuL7QbDuPdQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - array-union: 3.0.1 - dir-glob: 3.0.1 - fast-glob: 3.2.7 - ignore: 5.1.9 - merge2: 1.4.1 - slash: 4.0.0 - dev: true - /graceful-fs/4.2.8: resolution: {integrity: sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==} dev: true @@ -1115,11 +944,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - /ignore-by-default/2.0.0: - resolution: {integrity: sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==} - engines: {node: '>=10 <11 || >=12 <13 || >=14'} - dev: true - /ignore/5.1.9: resolution: {integrity: sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==} engines: {node: '>= 4'} @@ -1136,21 +960,6 @@ packages: dependencies: resolve-from: 5.0.0 - /imurmurhash/0.1.4: - resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} - engines: {node: '>=0.8.19'} - dev: true - - /indent-string/4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - dev: true - - /indent-string/5.0.0: - resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} - engines: {node: '>=12'} - dev: true - /inflight/1.0.6: resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} dependencies: @@ -1160,11 +969,6 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /irregular-plurals/3.3.0: - resolution: {integrity: sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g==} - engines: {node: '>=8'} - dev: true - /is-binary-path/2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1177,24 +981,10 @@ packages: has: 1.0.3 dev: true - /is-error/2.2.2: - resolution: {integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==} - dev: true - /is-extglob/2.1.1: resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} engines: {node: '>=0.10.0'} - /is-fullwidth-code-point/3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - - /is-fullwidth-code-point/4.0.0: - resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} - engines: {node: '>=12'} - dev: true - /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -1205,38 +995,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - /is-path-cwd/2.2.0: - resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} - engines: {node: '>=6'} - dev: true - - /is-path-inside/3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true - - /is-plain-object/5.0.0: - resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} - engines: {node: '>=0.10.0'} - dev: true - - /is-promise/4.0.0: - resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} - dev: true - /is-stream/2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - /is-typedarray/1.0.0: - resolution: {integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=} - dev: true - - /is-unicode-supported/1.1.0: - resolution: {integrity: sha512-lDcxivp8TJpLG75/DpatAqNzOpDPSpED8XNtrpBHTdQ2InQ1PbW78jhwSxyxhhu+xbVSast2X38bwj8atwoUQA==} - engines: {node: '>=12'} - dev: true - /isexe/2.0.0: resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} @@ -1244,24 +1006,11 @@ packages: resolution: {integrity: sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==} engines: {node: '>=10'} - /js-string-escape/1.0.1: - resolution: {integrity: sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=} - engines: {node: '>= 0.8'} - dev: true - /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true optional: true - /js-yaml/3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - /json5/1.0.1: resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} hasBin: true @@ -1284,32 +1033,20 @@ packages: /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - /load-json-file/7.0.1: - resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /load-tsconfig/0.2.2: resolution: {integrity: sha512-9B4XOMjNhphRmXg3YHFnpgEH5fmYKofXJ7M6sLkRcfJ5DcuPiStlQ1Or+1Rv/aML716kQ9Q+C9zJGUcfMYiq4Q==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false - /locate-path/7.0.0: - resolution: {integrity: sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-locate: 6.0.0 + /local-pkg/0.4.1: + resolution: {integrity: sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw==} + engines: {node: '>=14'} dev: true - /lodash/4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true - - /lru-cache/6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} + /loupe/2.3.1: + resolution: {integrity: sha512-EN1D3jyVmaX4tnajVlfbREU4axL647hLec1h/PXAb8CPDMJiYitcWF2UeLVNttRqaIqQs4x+mRvXf+d+TlDrCA==} dependencies: - yallist: 4.0.0 + get-func-name: 2.0.0 dev: true /magic-string/0.22.5: @@ -1324,35 +1061,6 @@ packages: sourcemap-codec: 1.4.8 dev: true - /map-age-cleaner/0.1.3: - resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} - engines: {node: '>=6'} - dependencies: - p-defer: 1.0.0 - dev: true - - /matcher/5.0.0: - resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - escape-string-regexp: 5.0.0 - dev: true - - /md5-hex/3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - dependencies: - blueimp-md5: 2.19.0 - dev: true - - /mem/9.0.1: - resolution: {integrity: sha512-f4uEX3Ley9FZqcFIRSBr2q43x1bJQeDvsxgkSN/BPnA7jY9Aue4sBU2dsjmpDwiaY/QY1maNCeosbUHQWzzdQw==} - engines: {node: '>=12.20'} - dependencies: - map-age-cleaner: 0.1.3 - mimic-fn: 4.0.0 - dev: true - /merge-stream/2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -1371,11 +1079,6 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} - /mimic-fn/4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - dev: true - /minimatch/3.0.4: resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} dependencies: @@ -1388,10 +1091,6 @@ packages: /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - /ms/2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - /mz/2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} dependencies: @@ -1409,11 +1108,6 @@ packages: resolution: {integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=} engines: {node: '>=0.10.0'} - /nofilter/3.1.0: - resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} - engines: {node: '>=12.19'} - dev: true - /normalize-path/3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -1439,61 +1133,6 @@ packages: dependencies: mimic-fn: 2.1.0 - /p-defer/1.0.0: - resolution: {integrity: sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=} - engines: {node: '>=4'} - dev: true - - /p-event/5.0.1: - resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-timeout: 5.0.2 - dev: true - - /p-limit/4.0.0: - resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - yocto-queue: 1.0.0 - dev: true - - /p-locate/6.0.0: - resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-limit: 4.0.0 - dev: true - - /p-map/4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} - dependencies: - aggregate-error: 3.1.0 - dev: true - - /p-map/5.3.0: - resolution: {integrity: sha512-SRbIQFoLYNezHkqZslqeg963HYUtqOrfMCxjNrFOpJ19WTYuq26rQoOXeX8QQiMLUlLqdYV/7PuDsdYJ7hLE1w==} - engines: {node: '>=12'} - dependencies: - aggregate-error: 4.0.0 - dev: true - - /p-timeout/5.0.2: - resolution: {integrity: sha512-sEmji9Yaq+Tw+STwsGAE56hf7gMy9p0tQfJojIAamB7WHJYJKf1qlsg9jqBWG8q9VCxKPhZaP/AcXwEoBcYQhQ==} - engines: {node: '>=12'} - dev: true - - /parse-ms/2.1.0: - resolution: {integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==} - engines: {node: '>=6'} - dev: true - - /path-exists/5.0.0: - resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /path-is-absolute/1.0.1: resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} engines: {node: '>=0.10.0'} @@ -1510,6 +1149,10 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /pathval/1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true @@ -1524,21 +1167,6 @@ packages: dependencies: node-modules-regexp: 1.0.0 - /pkg-conf/4.0.0: - resolution: {integrity: sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - find-up: 6.2.0 - load-json-file: 7.0.1 - dev: true - - /plur/5.1.0: - resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - irregular-plurals: 3.3.0 - dev: true - /postcss-load-config/3.1.0: resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==} engines: {node: '>= 10'} @@ -1576,13 +1204,6 @@ packages: hasBin: true dev: true - /pretty-ms/7.0.1: - resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} - engines: {node: '>=10'} - dependencies: - parse-ms: 2.1.0 - dev: true - /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -1592,18 +1213,6 @@ packages: dependencies: picomatch: 2.3.0 - /require-directory/2.1.1: - resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} - engines: {node: '>=0.10.0'} - dev: true - - /resolve-cwd/3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - dependencies: - resolve-from: 5.0.0 - dev: true - /resolve-from/5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} @@ -1619,13 +1228,6 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - /rimraf/3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.0 - dev: true - /rollup-plugin-dts/4.1.0_rollup@2.60.1+typescript@4.5.4: resolution: {integrity: sha512-rriXIm3jdUiYeiAAd1Fv+x2AxK6Kq6IybB2Z/IdoAW95fb4uRUurYsEYKa8L1seedezDeJhy8cfo8FEL9aZzqg==} engines: {node: '>=v12.22.7'} @@ -1659,21 +1261,6 @@ packages: dependencies: queue-microtask: 1.2.3 - /semver/7.3.5: - resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - - /serialize-error/7.0.1: - resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} - engines: {node: '>=10'} - dependencies: - type-fest: 0.13.1 - dev: true - /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -1691,19 +1278,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - /slash/4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: true - - /slice-ansi/5.0.0: - resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} - engines: {node: '>=12'} - dependencies: - ansi-styles: 6.1.0 - is-fullwidth-code-point: 4.0.0 - dev: true - /source-map-js/1.0.1: resolution: {integrity: sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==} engines: {node: '>=0.10.0'} @@ -1717,54 +1291,11 @@ packages: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} dev: true - /sprintf-js/1.0.3: - resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=} - dev: true - - /stack-utils/2.0.5: - resolution: {integrity: sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 - dev: true - /string-argv/0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} dev: true - /string-width/4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - - /string-width/5.0.1: - resolution: {integrity: sha512-5ohWO/M4//8lErlUUtrFy3b11GtNOuMOU0ysKCDXFcfXuuvUXu95akgj/i8ofmaGdN0hCqyl6uu9i8dS/mQp5g==} - engines: {node: '>=12'} - dependencies: - emoji-regex: 9.2.2 - is-fullwidth-code-point: 4.0.0 - strip-ansi: 7.0.1 - dev: true - - /strip-ansi/6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-ansi/7.0.1: - resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - dev: true - /strip-bom/3.0.0: resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} engines: {node: '>=4'} @@ -1791,17 +1322,6 @@ packages: pirates: 4.0.1 ts-interface-checker: 0.1.13 - /supertap/2.0.0: - resolution: {integrity: sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA==} - engines: {node: '>=10'} - dependencies: - arrify: 2.0.1 - indent-string: 4.0.0 - js-yaml: 3.14.1 - serialize-error: 7.0.1 - strip-ansi: 6.0.1 - dev: true - /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -1815,11 +1335,6 @@ packages: engines: {node: '>= 8'} dev: true - /temp-dir/2.0.0: - resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} - engines: {node: '>=8'} - dev: true - /thenify-all/1.6.0: resolution: {integrity: sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=} engines: {node: '>=0.8'} @@ -1831,9 +1346,14 @@ packages: dependencies: any-promise: 1.3.0 - /time-zone/1.0.0: - resolution: {integrity: sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=} - engines: {node: '>=4'} + /tinypool/0.1.1: + resolution: {integrity: sha512-sW2fQZ2BRb/GX5v55NkHiTrbMLx0eX0xNpP+VGhOe2f7Oo04+LeClDyM19zCE/WCy7jJ8kzIJ0Ojrxj3UhN9Sg==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy/0.2.10: + resolution: {integrity: sha512-Qij6rGWCDjWIejxCXXVi6bNgvrYBp3PbqC4cBP/0fD6WHDOHCw09Zd13CsxrDqSR5PFq01WeqDws8t5lz5sH0A==} + engines: {node: '>=14.0.0'} dev: true /to-regex-range/5.0.1: @@ -1895,15 +1415,9 @@ packages: - ts-node dev: true - /type-fest/0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: true - - /typedarray-to-buffer/3.1.5: - resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - dependencies: - is-typedarray: 1.0.0 + /type-detect/4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} dev: true /typescript/4.5.4: @@ -1917,6 +1431,62 @@ packages: engines: {node: '>= 10.0.0'} dev: true + /vite/2.7.13: + resolution: {integrity: sha512-Mq8et7f3aK0SgSxjDNfOAimZGW9XryfHRa/uV0jseQSilg+KhYDSoNb9h1rknOy6SuMkvNDLKCYAYYUMCE+IgQ==} + engines: {node: '>=12.2.0'} + hasBin: true + peerDependencies: + less: '*' + sass: '*' + stylus: '*' + peerDependenciesMeta: + less: + optional: true + sass: + optional: true + stylus: + optional: true + dependencies: + esbuild: 0.13.15 + postcss: 8.4.5 + resolve: 1.20.0 + rollup: 2.60.1 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /vitest/0.2.5: + resolution: {integrity: sha512-QruEhsNxy8ycLxYG9rrGUfHZzJ8A6YvA9ULZ4w/ecvm0Zejm1nxUar/XkRWkL2xzrqA5AjmfqDSQZ8q2bFbA0Q==} + engines: {node: '>=14.14.0'} + hasBin: true + peerDependencies: + '@vitest/ui': '*' + c8: '*' + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@vitest/ui': + optional: true + c8: + optional: true + happy-dom: + optional: true + jsdom: + optional: true + dependencies: + '@types/chai': 4.3.0 + '@types/chai-subset': 1.3.3 + chai: 4.3.6 + local-pkg: 0.4.1 + tinypool: 0.1.1 + tinyspy: 0.2.10 + vite: 2.7.13 + transitivePeerDependencies: + - less + - sass + - stylus + dev: true + /vlq/0.2.3: resolution: {integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==} dev: true @@ -1925,11 +1495,6 @@ packages: resolution: {integrity: sha512-cfS1+DZxuav1aBYbaO/kE06EOS8yRw7qOFoD3XtjTkYvCvh3zUvNST8DXK/nPaeqIzIv3P3kL3lRJn8iwOiSag==} dev: true - /well-known-symbols/2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} - dev: true - /which/2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1937,59 +1502,9 @@ packages: dependencies: isexe: 2.0.0 - /wrap-ansi/7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - /wrappy/1.0.2: resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} - /write-file-atomic/3.0.3: - resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} - dependencies: - imurmurhash: 0.1.4 - is-typedarray: 1.0.0 - signal-exit: 3.0.6 - typedarray-to-buffer: 3.1.5 - dev: true - - /y18n/5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yallist/4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true - /yaml/1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - - /yargs-parser/21.0.0: - resolution: {integrity: sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==} - engines: {node: '>=12'} - dev: true - - /yargs/17.3.1: - resolution: {integrity: sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==} - engines: {node: '>=12'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.0.0 - dev: true - - /yocto-queue/1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} - engines: {node: '>=12.20'} - dev: true diff --git a/test/__snapshots__/index.test.ts.snap b/test/__snapshots__/index.test.ts.snap new file mode 100644 index 0000000..4913d1a --- /dev/null +++ b/test/__snapshots__/index.test.ts.snap @@ -0,0 +1,311 @@ +// Vitest Snapshot v1 + +exports[`--env flag 1`] = ` +"var __defProp = Object.defineProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// input.ts +__export(exports, { + env: () => env +}); +var env = \\"test\\"; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + env +}); +" +`; + +exports[`bundle svelte 1`] = ` +"var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === \\"object\\" || typeof module2 === \\"function\\") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== \\"default\\") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, \\"default\\", module2 && module2.__esModule && \\"default\\" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; + +// input.ts +__export(exports, { + App: () => App_default +}); + +// App.svelte +var import_internal = __toModule(require(\\"svelte/internal\\")); +function create_fragment(ctx) { + let span; + return { + c() { + span = (0, import_internal.element)(\\"span\\"); + span.textContent = \`\${msg}\`; + (0, import_internal.attr)(span, \\"class\\", \\"svelte-1jo4k3z\\"); + }, + m(target, anchor) { + (0, import_internal.insert)(target, span, anchor); + }, + p: import_internal.noop, + i: import_internal.noop, + o: import_internal.noop, + d(detaching) { + if (detaching) + (0, import_internal.detach)(span); + } + }; +} +var msg = \\"hello svelte\\"; +var App = class extends import_internal.SvelteComponent { + constructor(options) { + super(); + (0, import_internal.init)(this, options, null, create_fragment, import_internal.safe_not_equal, {}); + } +}; +var App_default = App; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + App +}); +" +`; + +exports[`bundle svelte 2`] = ` +"/* svelte-css:App.svelte.css */ +span.svelte-1jo4k3z { + color: red; +} +" +`; + +exports[`code splitting in cjs format 1`] = ` +"\\"use strict\\";Object.defineProperty(exports, \\"__esModule\\", {value: true}); + + +var _chunk56VUBPK5js = require('./chunk-56VUBPK5.js'); + +// input.ts +var foo = () => Promise.resolve().then(() => _chunk56VUBPK5js.__toModule.call(void 0, _chunk56VUBPK5js.__require.call(void 0, \\"./foo-UAUJLGDY.js\\"))); + + +exports.foo = foo; +" +`; + +exports[`code splitting in cjs format 2`] = ` +"\\"use strict\\";Object.defineProperty(exports, \\"__esModule\\", {value: true}); + + +var _chunk56VUBPK5js = require('./chunk-56VUBPK5.js'); + +// another-input.ts +var foo = () => Promise.resolve().then(() => _chunk56VUBPK5js.__toModule.call(void 0, _chunk56VUBPK5js.__require.call(void 0, \\"./foo-UAUJLGDY.js\\"))); + + +exports.foo = foo; +" +`; + +exports[`declaration files with multiple entrypoints #316 1`] = ` +"declare const foo = 1; + +export { foo }; +" +`; + +exports[`declaration files with multiple entrypoints #316 2`] = ` +"declare const bar = \\"bar\\"; + +export { bar }; +" +`; + +exports[`disable code splitting to get proper module.exports = 1`] = ` +"// input.ts +module.exports = 123; +" +`; + +exports[`enable --dts-resolve for specific module 1`] = ` +"export * from 'vue'; + +type MarkRequired = Exclude & Required> + +export { MarkRequired }; +" +`; + +exports[`external 1`] = ` +"var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === \\"object\\" || typeof module2 === \\"function\\") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== \\"default\\") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, \\"default\\", module2 && module2.__esModule && \\"default\\" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; + +// input.ts +__export(exports, { + bar: () => import_bar.bar, + baz: () => baz, + foo: () => import_foo.foo +}); +var import_foo = __toModule(require(\\"foo\\")); +var import_bar = __toModule(require(\\"bar\\")); + +// node_modules/baz/index.ts +var baz = \\"baz\\"; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + bar, + baz, + foo +}); +" +`; + +exports[`import css 1`] = `""`; + +exports[`import css in --dts 1`] = `""`; + +exports[`multiple targets 1`] = ` +"var __defProp = Object.defineProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// input.ts +__export(exports, { + answer: () => answer +}); +var answer = 42; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + answer +}); +" +`; + +exports[`node protocol 1`] = ` +"var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === \\"object\\" || typeof module2 === \\"function\\") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== \\"default\\") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, \\"default\\", module2 && module2.__esModule && \\"default\\" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; + +// input.ts +var import_node_fs = __toModule(require(\\"fs\\")); +console.log(import_node_fs.default); +" +`; + +exports[`simple 1`] = ` +"var __defProp = Object.defineProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// input.ts +__export(exports, { + default: () => input_default +}); + +// foo.ts +var foo_default = \\"foo\\"; + +// input.ts +var input_default = foo_default; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = {}); +" +`; + +exports[`support baseUrl and paths in tsconfig.json 1`] = ` +"var __defProp = Object.defineProperty; +var __markAsModule = (target) => __defProp(target, \\"__esModule\\", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// input.ts +__export(exports, { + foo: () => foo +}); + +// foo.ts +var foo = \\"foo\\"; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + foo +}); +" +`; + +exports[`support baseUrl and paths in tsconfig.json in --dts build 1`] = ` +"declare const foo = \\"foo\\"; + +export { foo }; +" +`; + +exports[`support baseUrl and paths in tsconfig.json in --dts-resolve build 1`] = ` +"declare const foo = \\"foo\\"; + +export { foo }; +" +`; diff --git a/test/index.test.ts b/test/index.test.ts index 51b0791..3aa9ec5 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,15 +1,28 @@ -import test from 'ava' -import { join, resolve } from 'path' +import { test, expect, beforeAll } from 'vitest' +import path from 'path' import execa from 'execa' import fs from 'fs-extra' import glob from 'globby' -// import waitForExpect from 'wait-for-expect' -// import { debouncePromise } from '../src/utils' +import waitForExpect from 'wait-for-expect' +import { fileURLToPath } from 'url' +import { debouncePromise } from '../src/utils' -const cacheDir = resolve(__dirname, '.cache') -const bin = resolve(__dirname, '../dist/cli-default.js') +const __dirname = path.dirname(fileURLToPath(import.meta.url)) -test.before(async () => { +const cacheDir = path.resolve(__dirname, '.cache') +const bin = path.resolve(__dirname, '../dist/cli-default.js') + +const getTestName = () => { + const name = expect.getState().currentTestName + + if (!name) { + throw new Error('No test name') + } + + return name +} + +beforeAll(async () => { await fs.remove(cacheDir) console.log(`Installing dependencies in ./test folder`) await execa('pnpm', ['i'], { cwd: __dirname }) @@ -29,12 +42,12 @@ async function run( env?: Record } = {} ) { - const testDir = resolve(cacheDir, filenamify(title)) + const testDir = path.resolve(cacheDir, filenamify(title)) // Write entry files on disk await Promise.all( Object.keys(files).map((name) => { - return fs.outputFile(resolve(testDir, name), files[name], 'utf8') + return fs.outputFile(path.resolve(testDir, name), files[name], 'utf8') }) ) @@ -56,34 +69,34 @@ async function run( // Get output const outFiles = await glob('**/*', { - cwd: resolve(testDir, 'dist'), + cwd: path.resolve(testDir, 'dist'), }).then((res) => res.sort()) return { get output() { - return fs.readFileSync(resolve(testDir, 'dist/input.js'), 'utf8') + return fs.readFileSync(path.resolve(testDir, 'dist/input.js'), 'utf8') }, outFiles, logs, - outDir: resolve(testDir, 'dist'), + outDir: path.resolve(testDir, 'dist'), getFileContent(filename: string) { - return fs.readFile(resolve(testDir, filename), 'utf8') + return fs.readFile(path.resolve(testDir, filename), 'utf8') }, } } -test('simple', async (t) => { - const { output, outFiles } = await run(t.title, { +test('simple', async () => { + const { output, outFiles } = await run(getTestName(), { 'input.ts': `import foo from './foo';export default foo`, 'foo.ts': `export default 'foo'`, }) - t.snapshot(output) - t.deepEqual(outFiles, ['input.js']) + expect(output).toMatchSnapshot() + expect(outFiles).toEqual(['input.js']) }) -test('bundle graphql-tools with --dts flag', async (t) => { +test('bundle graphql-tools with --dts flag', async () => { await run( - t.title, + getTestName(), { 'input.ts': `export { makeExecutableSchema } from 'graphql-tools'`, }, @@ -91,12 +104,11 @@ test('bundle graphql-tools with --dts flag', async (t) => { flags: ['--dts'], } ) - t.pass() }) -test('bundle graphql-tools with --dts-resolve flag', async (t) => { +test('bundle graphql-tools with --dts-resolve flag', async () => { await run( - t.title, + getTestName(), { 'input.ts': `export { makeExecutableSchema } from 'graphql-tools'`, }, @@ -104,12 +116,11 @@ test('bundle graphql-tools with --dts-resolve flag', async (t) => { flags: ['--dts-resolve'], } ) - t.pass() }) -test('bundle vue and ts-essentials with --dts --dts-resolve flag', async (t) => { +test('bundle vue and ts-essentials with --dts --dts-resolve flag', async () => { await run( - t.title, + getTestName(), { 'input.ts': `export * from 'vue' export type { MarkRequired } from 'ts-essentials' @@ -119,12 +130,11 @@ test('bundle vue and ts-essentials with --dts --dts-resolve flag', async (t) => flags: ['--dts', '--dts-resolve'], } ) - t.pass() }) -test('bundle @egoist/path-parser with --dts --dts-resolve flag', async (t) => { +test('bundle @egoist/path-parser with --dts --dts-resolve flag', async () => { const { getFileContent } = await run( - t.title, + getTestName(), { 'input.ts': `import { PathParser } from '@egoist/path-parser' export type Opts = { @@ -137,11 +147,10 @@ test('bundle @egoist/path-parser with --dts --dts-resolve flag', async (t) => { flags: ['--dts', '--dts-resolve'], } ) - t.pass() }) -test('enable --dts-resolve for specific module', async (t) => { - const { getFileContent } = await run(t.title, { +test('enable --dts-resolve for specific module', async () => { + const { getFileContent } = await run(getTestName(), { 'input.ts': `export * from 'vue' export type {MarkRequired} from 'foo' `, @@ -158,12 +167,12 @@ test('enable --dts-resolve for specific module', async (t) => { `, }) const content = await getFileContent('dist/input.d.ts') - t.snapshot(content) + expect(content).toMatchSnapshot() }) -test('bundle graphql-tools with --sourcemap flag', async (t) => { +test('bundle graphql-tools with --sourcemap flag', async () => { const { outFiles } = await run( - t.title, + getTestName(), { 'input.ts': `export { makeExecutableSchema } from 'graphql-tools'`, }, @@ -171,12 +180,12 @@ test('bundle graphql-tools with --sourcemap flag', async (t) => { flags: ['--sourcemap'], } ) - t.deepEqual(outFiles, ['input.js', 'input.js.map']) + expect(outFiles).toEqual(['input.js', 'input.js.map']) }) -test('bundle graphql-tools with --sourcemap inline flag', async (t) => { +test('bundle graphql-tools with --sourcemap inline flag', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': `export { makeExecutableSchema } from 'graphql-tools'`, }, @@ -185,13 +194,13 @@ test('bundle graphql-tools with --sourcemap inline flag', async (t) => { } ) - t.assert(output.includes('//# sourceMappingURL=data:application/json;base64')) - t.deepEqual(outFiles, ['input.js']) + expect(output).toContain('//# sourceMappingURL=data:application/json;base64') + expect(outFiles).toEqual(['input.js']) }) -test('multiple formats', async (t) => { +test('multiple formats', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` export const a = 1 @@ -202,13 +211,12 @@ test('multiple formats', async (t) => { } ) - t.snapshot(output) - t.deepEqual(outFiles, ['input.global.js', 'input.js', 'input.mjs']) + expect(outFiles).toEqual(['input.global.js', 'input.js', 'input.mjs']) }) -test('multiple formats and pkg.type is module', async (t) => { +test('multiple formats and pkg.type is module', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` export const a = 1 @@ -220,31 +228,12 @@ test('multiple formats and pkg.type is module', async (t) => { } ) - t.snapshot(output) - t.deepEqual(outFiles, ['input.cjs', 'input.global.js', 'input.js']) + expect(outFiles).toEqual(['input.cjs', 'input.global.js', 'input.js']) }) -test('multiple formats with legacy output', async (t) => { +test('minify', async () => { const { output, outFiles } = await run( - t.title, - { - 'input.ts': ` - export const a = 1 - `, - 'package.json': JSON.stringify({ type: 'module' }), - }, - { - flags: ['--format', 'esm,cjs,iife', '--legacy-output'], - } - ) - - t.snapshot(output) - t.deepEqual(outFiles, ['esm/input.js', 'iife/input.js', 'input.js']) -}) - -test('minify', async (t) => { - const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` export function foo() { @@ -257,13 +246,13 @@ test('minify', async (t) => { } ) - t.snapshot(output) - t.deepEqual(outFiles, ['input.js']) + expect(output).toContain(`return"foo"`) + expect(outFiles).toEqual(['input.js']) }) -test('--env flag', async (t) => { +test('--env flag', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` export const env = process.env.NODE_ENV @@ -274,12 +263,12 @@ test('--env flag', async (t) => { } ) - t.snapshot(output) - t.deepEqual(outFiles, ['input.js']) + expect(output).toMatchSnapshot() + expect(outFiles).toEqual(['input.js']) }) -test('import css', async (t) => { - const { output, outFiles } = await run(t.title, { +test('import css', async () => { + const { output, outFiles } = await run(getTestName(), { 'input.ts': ` import './foo.css' `, @@ -297,13 +286,13 @@ test('import css', async (t) => { `, }) - t.snapshot(output, `""`) - t.deepEqual(outFiles, ['input.css', 'input.js']) + expect(output, `""`).toMatchSnapshot() + expect(outFiles).toEqual(['input.css', 'input.js']) }) -test('import css in --dts', async (t) => { +test('import css in --dts', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` import './foo.css' @@ -317,19 +306,19 @@ test('import css in --dts', async (t) => { { flags: ['--dts'] } ) - t.snapshot(output) - t.deepEqual(outFiles, ['input.css', 'input.d.ts', 'input.js']) + expect(output).toMatchSnapshot() + expect(outFiles).toEqual(['input.css', 'input.d.ts', 'input.js']) }) -test('node protocol', async (t) => { - const { output } = await run(t.title, { +test('node protocol', async () => { + const { output } = await run(getTestName(), { 'input.ts': `import fs from 'node:fs'; console.log(fs)`, }) - t.snapshot(output) + expect(output).toMatchSnapshot() }) -test('external', async (t) => { - const { output } = await run(t.title, { +test('external', async () => { + const { output } = await run(getTestName(), { 'input.ts': `export {foo} from 'foo' export {bar} from 'bar' export {baz} from 'baz' @@ -346,12 +335,12 @@ test('external', async (t) => { } `, }) - t.snapshot(output) + expect(output).toMatchSnapshot() }) -test('disable code splitting to get proper module.exports =', async (t) => { +test('disable code splitting to get proper module.exports =', async () => { const { output } = await run( - t.title, + getTestName(), { 'input.ts': `export = 123`, }, @@ -359,12 +348,12 @@ test('disable code splitting to get proper module.exports =', async (t) => { flags: ['--no-splitting'], } ) - t.snapshot(output) + expect(output).toMatchSnapshot() }) -test('bundle svelte', async (t) => { +test('bundle svelte', async () => { const { output, getFileContent } = await run( - t.title, + getTestName(), { 'input.ts': `import App from './App.svelte' export { App } @@ -386,13 +375,13 @@ test('bundle svelte', async (t) => { flags: ['--external', 'svelte/internal'], } ) - t.snapshot(output, 'output') + expect(output, 'output').toMatchSnapshot() - t.snapshot(await getFileContent('dist/input.css'), 'css') + expect(await getFileContent('dist/input.css'), 'css').toMatchSnapshot() }) -test('bundle svelte without styles', async (t) => { - const { outFiles } = await run(t.title, { +test('bundle svelte without styles', async () => { + const { outFiles } = await run(getTestName(), { 'input.ts': `import App from './App.svelte' export { App } `, @@ -405,11 +394,11 @@ test('bundle svelte without styles', async (t) => { `, }) - t.deepEqual(outFiles, ['input.js']) + expect(outFiles).toEqual(['input.js']) }) -test('svelte: typescript support', async (t) => { - const { outFiles, output } = await run(t.title, { +test('svelte: typescript support', async () => { + const { outFiles, output } = await run(getTestName(), { 'input.ts': `import App from './App.svelte' export { App } `, @@ -431,14 +420,14 @@ test('svelte: typescript support', async (t) => { `, }) - t.deepEqual(outFiles, ['input.js']) - t.assert(output.includes('// Component.svelte')) + expect(outFiles).toEqual(['input.js']) + expect(output).toContain('// Component.svelte') }) -test('onSuccess', async (t) => { +test('onSuccess', async () => { const randomNumber = Math.random() + '' const { logs } = await run( - t.title, + getTestName(), { 'input.ts': "console.log('test');", }, @@ -447,11 +436,11 @@ test('onSuccess', async (t) => { } ) - t.deepEqual(logs.includes(randomNumber), true) + expect(logs.includes(randomNumber)).toEqual(true) }) -test('support baseUrl and paths in tsconfig.json', async (t) => { - const { getFileContent } = await run(t.title, { +test('support baseUrl and paths in tsconfig.json', async () => { + const { getFileContent } = await run(getTestName(), { 'input.ts': `export * from '@/foo'`, 'foo.ts': `export const foo = 'foo'`, 'tsconfig.json': `{ @@ -461,12 +450,12 @@ test('support baseUrl and paths in tsconfig.json', async (t) => { } }`, }) - t.snapshot(await getFileContent('dist/input.js')) + expect(await getFileContent('dist/input.js')).toMatchSnapshot() }) -test('support baseUrl and paths in tsconfig.json in --dts build', async (t) => { +test('support baseUrl and paths in tsconfig.json in --dts build', async () => { const { getFileContent } = await run( - t.title, + getTestName(), { 'input.ts': `export * from '@/foo'`, 'src/foo.ts': `export const foo = 'foo'`, @@ -479,12 +468,12 @@ test('support baseUrl and paths in tsconfig.json in --dts build', async (t) => { }, { flags: ['--dts'] } ) - t.snapshot(await getFileContent('dist/input.d.ts')) + expect(await getFileContent('dist/input.d.ts')).toMatchSnapshot() }) -test('support baseUrl and paths in tsconfig.json in --dts-resolve build', async (t) => { +test('support baseUrl and paths in tsconfig.json in --dts-resolve build', async () => { const { getFileContent } = await run( - t.title, + getTestName(), { 'input.ts': `export * from '@/foo'`, 'src/foo.ts': `export const foo = 'foo'`, @@ -497,19 +486,23 @@ test('support baseUrl and paths in tsconfig.json in --dts-resolve build', async }, { flags: ['--dts-resolve'] } ) - t.snapshot(await getFileContent('dist/input.d.ts')) + expect(await getFileContent('dist/input.d.ts')).toMatchSnapshot() }) -test(`transform import.meta.url in cjs format`, async (t) => { - const { getFileContent } = await run(t.title, { - 'input.ts': `export default import.meta.url`, - }) - t.snapshot(await getFileContent('dist/input.js')) -}) - -test(`transform __dirname, __filename in esm format`, async (t) => { +test(`transform import.meta.url in cjs format`, async () => { const { getFileContent } = await run( - t.title, + getTestName(), + { + 'input.ts': `export default import.meta.url`, + }, + {} + ) + expect(await getFileContent('dist/input.js')).toContain('getImportMetaUrl') +}) + +test(`transform __dirname and __filename in esm format`, async () => { + const { getFileContent } = await run( + getTestName(), { 'input.ts': `export const a = __dirname export const b = __filename @@ -519,71 +512,74 @@ test(`transform __dirname, __filename in esm format`, async (t) => { flags: ['--format', 'esm'], } ) - t.snapshot(await getFileContent('dist/input.mjs')) + const code = await getFileContent('dist/input.mjs') + + expect(code).toContain('getFilename') + expect(code).toContain('getDirname') }) -// test('debounce promise', async (t) => { -// try { -// const equal = (a: T, b: T) => { -// const result = a === b -// if (!result) throw new Error(`${a} !== ${b}`) -// } +test('debounce promise', async () => { + try { + const equal = (a: T, b: T) => { + const result = a === b + if (!result) throw new Error(`${a} !== ${b}`) + } -// const sleep = (n: number = ~~(Math.random() * 50) + 20) => -// new Promise((resolve) => setTimeout(resolve, n)) + const sleep = (n: number = ~~(Math.random() * 50) + 20) => + new Promise((resolve) => setTimeout(resolve, n)) -// let n = 0 + let n = 0 -// const debounceFunction = debouncePromise( -// async () => { -// await sleep() -// ++n -// }, -// 100, -// (err: any) => { -// t.fail(err) -// } -// ) + const debounceFunction = debouncePromise( + async () => { + await sleep() + ++n + }, + 100, + (err: any) => { + expect.fail(err.message) + } + ) -// t.deepEqual(n, 0) + expect(n).toEqual(0) -// debounceFunction() -// debounceFunction() -// debounceFunction() -// debounceFunction() + debounceFunction() + debounceFunction() + debounceFunction() + debounceFunction() -// await waitForExpect(() => { -// equal(n, 1) -// }) -// await sleep(100) + await waitForExpect(() => { + equal(n, 1) + }) + await sleep(100) -// t.deepEqual(n, 1) + expect(n).toEqual(1) -// debounceFunction() + debounceFunction() -// await waitForExpect(() => { -// equal(n, 2) -// }) -// } catch (err: any) { -// return t.fail(err) -// } -// }) + await waitForExpect(() => { + equal(n, 2) + }) + } catch (err: any) { + return expect.fail(err.message) + } +}) -test('exclude dependencies', async (t) => { - const { getFileContent } = await run(t.title, { +test('exclude dependencies', async () => { + const { getFileContent } = await run(getTestName(), { 'input.ts': `export {foo} from 'foo';export {nested} from 'foo/nested'`, 'package.json': `{"dependencies":{"foo":"0.0.0"}}`, 'node_modules/foo/index.js': `export const foo = 'foo'`, 'node_modules/foo/package.json': `{"name":"foo"}`, }) const contents = await getFileContent('dist/input.js') - t.assert(contents.includes('require("foo")')) - t.assert(contents.includes('require("foo/nested")')) + expect(contents).toContain('require("foo")') + expect(contents).toContain('require("foo/nested")') }) -test('code splitting in cjs format', async (t) => { +test('code splitting in cjs format', async () => { const { getFileContent } = await run( - t.title, + getTestName(), { 'input.ts': `const foo = () => import('./foo');export {foo}`, 'another-input.ts': `const foo = () => import('./foo');export {foo}`, @@ -591,37 +587,43 @@ test('code splitting in cjs format', async (t) => { }, { flags: ['another-input.ts', '--splitting'] } ) - t.snapshot(await getFileContent('dist/input.js')) - t.snapshot(await getFileContent('dist/another-input.js')) + expect(await getFileContent('dist/input.js')).toMatchSnapshot() + expect(await getFileContent('dist/another-input.js')).toMatchSnapshot() }) -test('declaration files with multiple entrypoints #316', async (t) => { +test('declaration files with multiple entrypoints #316', async () => { const { getFileContent } = await run( - t.title, + getTestName(), { 'src/index.ts': `export const foo = 1`, 'src/bar/index.ts': `export const bar = 'bar'`, }, { flags: ['--dts'], entry: ['src/index.ts', 'src/bar/index.ts'] } ) - t.snapshot(await getFileContent('dist/index.d.ts'), 'dist/index.d.ts') - t.snapshot(await getFileContent('dist/bar/index.d.ts'), 'dist/bar/index.d.ts') + expect( + await getFileContent('dist/index.d.ts'), + 'dist/index.d.ts' + ).toMatchSnapshot() + expect( + await getFileContent('dist/bar/index.d.ts'), + 'dist/bar/index.d.ts' + ).toMatchSnapshot() }) -test('esbuild metafile', async (t) => { +test('esbuild metafile', async () => { const { outFiles } = await run( - t.title, + getTestName(), { 'input.ts': `export const foo = 1` }, { flags: ['--metafile'], } ) - t.deepEqual(outFiles, ['input.js', 'metafile-cjs.json']) + expect(outFiles).toEqual(['input.js', 'metafile-cjs.json']) }) -test('multiple entry with the same base name', async (t) => { +test('multiple entry with the same base name', async () => { const { outFiles } = await run( - t.title, + getTestName(), { 'src/input.ts': `export const foo = 1`, 'src/bar/input.ts': `export const bar = 2`, @@ -630,23 +632,23 @@ test('multiple entry with the same base name', async (t) => { entry: ['src/input.ts', 'src/bar/input.ts'], } ) - t.deepEqual(outFiles, ['bar/input.js', 'input.js']) + expect(outFiles).toEqual(['bar/input.js', 'input.js']) }) -test('windows: backslash in entry', async (t) => { +test('windows: backslash in entry', async () => { const { outFiles } = await run( - t.title, + getTestName(), { 'src/input.ts': `export const foo = 1` }, { entry: ['src\\input.ts'], } ) - t.deepEqual(outFiles, ['input.js']) + expect(outFiles).toEqual(['input.js']) }) -test('emit declaration files only', async (t) => { +test('emit declaration files only', async () => { const { outFiles } = await run( - t.title, + getTestName(), { 'input.ts': `export const foo = 1`, }, @@ -654,11 +656,11 @@ test('emit declaration files only', async (t) => { flags: ['--dts-only'], } ) - t.deepEqual(outFiles, ['input.d.ts']) + expect(outFiles).toEqual(['input.d.ts']) }) -test('decorator metadata', async (t) => { - const { getFileContent } = await run(t.title, { +test('decorator metadata', async () => { + const { getFileContent } = await run(getTestName(), { 'input.ts': ` function Injectable() {} @@ -675,12 +677,12 @@ test('decorator metadata', async (t) => { }`, }) const contents = await getFileContent('dist/input.js') - t.assert(contents.includes(`Reflect.metadata("design:type"`)) + expect(contents).toContain(`Reflect.metadata("design:type"`) }) -test('inject style', async (t) => { +test('inject style', async () => { const { outFiles, output } = await run( - t.title, + getTestName(), { 'input.ts': `import './style.css'`, 'style.css': `.hello { color: red }`, @@ -689,13 +691,13 @@ test('inject style', async (t) => { flags: ['--inject-style', '--minify'], } ) - t.deepEqual(outFiles, ['input.js']) - t.assert(output.includes('.hello{color:red}')) + expect(outFiles).toEqual(['input.js']) + expect(output).toContain('.hello{color:red}') }) -test('inject style in multi formats', async (t) => { +test('inject style in multi formats', async () => { const { outFiles, getFileContent } = await run( - t.title, + getTestName(), { 'input.ts': `export * from './App.svelte'`, 'App.svelte': ` @@ -709,15 +711,15 @@ test('inject style in multi formats', async (t) => { flags: ['--inject-style', '--minify', '--format', 'esm,cjs,iife'], } ) - t.deepEqual(outFiles, ['input.global.js', 'input.js', 'input.mjs']) + expect(outFiles).toEqual(['input.global.js', 'input.js', 'input.mjs']) for (const file of outFiles) { - t.assert((await getFileContent(`dist/${file}`)).includes('{color:red}')) + expect(await getFileContent(`dist/${file}`)).toContain('{color:red}') } }) -test('shebang', async (t) => { +test('shebang', async () => { const { outDir } = await run( - t.title, + getTestName(), { 'a.ts': `#!/usr/bin/env node\bconsole.log('a')`, 'b.ts': `console.log('b')`, @@ -728,20 +730,20 @@ test('shebang', async (t) => { ) if (process.platform === 'win32') { - return t.pass() + return } - t.notThrows(() => { - fs.accessSync(join(outDir, 'a.js'), fs.constants.X_OK) - }) - t.throws(() => { - fs.accessSync(join(outDir, 'b.js'), fs.constants.X_OK) - }) + expect(() => { + fs.accessSync(path.join(outDir, 'a.js'), fs.constants.X_OK) + }).not.toThrow() + expect(() => { + fs.accessSync(path.join(outDir, 'b.js'), fs.constants.X_OK) + }).toThrow() }) -test('es5 target', async (t) => { +test('es5 target', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` export class Foo { @@ -757,13 +759,13 @@ test('es5 target', async (t) => { flags: ['--target', 'es5'], } ) - t.regex(output, /createClass/) - t.deepEqual(outFiles, ['input.js']) + expect(output).toMatch(/createClass/) + expect(outFiles).toEqual(['input.js']) }) -test('multiple targets', async (t) => { +test('multiple targets', async () => { const { output, outFiles } = await run( - t.title, + getTestName(), { 'input.ts': ` export const answer = 42 @@ -774,6 +776,6 @@ test('multiple targets', async (t) => { flags: ['--target', 'es2020,chrome58,firefox57,safari11,edge16'], } ) - t.snapshot(output) - t.deepEqual(outFiles, ['input.js']) + expect(output).toMatchSnapshot() + expect(outFiles).toEqual(['input.js']) }) diff --git a/test/snapshots/index.test.ts.md b/test/snapshots/index.test.ts.md deleted file mode 100644 index d65e0d6..0000000 --- a/test/snapshots/index.test.ts.md +++ /dev/null @@ -1,493 +0,0 @@ -# Snapshot report for `test/index.test.ts` - -The actual snapshot is saved in `index.test.ts.snap`. - -Generated by [AVA](https://avajs.dev). - -## simple - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - default: () => input_default␊ - });␊ - ␊ - // foo.ts␊ - var foo_default = "foo";␊ - ␊ - // input.ts␊ - var input_default = foo_default;␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {});␊ - ` - -## enable --dts-resolve for specific module - -> Snapshot 1 - - `export * from 'vue';␊ - ␊ - type MarkRequired = Exclude & Required>␊ - ␊ - export { MarkRequired };␊ - ` - -## multiple formats - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - a: () => a␊ - });␊ - var a = 1;␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - a␊ - });␊ - ` - -## multiple formats and pkg.type is module - -> Snapshot 1 - - `// input.ts␊ - var a = 1;␊ - export {␊ - a␊ - };␊ - ` - -## multiple formats with legacy output - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - a: () => a␊ - });␊ - var a = 1;␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - a␊ - });␊ - ` - -## minify - -> Snapshot 1 - - `var r=Object.defineProperty;var t=o=>r(o,"__esModule",{value:!0});var e=(o,f)=>{t(o);for(var n in f)r(o,n,{get:f[n],enumerable:!0})};e(exports,{foo:()=>u});function u(){return"foo"}0&&(module.exports={foo});␊ - ` - -## --env flag - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - env: () => env␊ - });␊ - var env = "production";␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - env␊ - });␊ - ` - -## import css - -> "" - - '' - -## import css in --dts - -> Snapshot 1 - - '' - -## node protocol - -> Snapshot 1 - - `var __create = Object.create;␊ - var __defProp = Object.defineProperty;␊ - var __getOwnPropDesc = Object.getOwnPropertyDescriptor;␊ - var __getOwnPropNames = Object.getOwnPropertyNames;␊ - var __getProtoOf = Object.getPrototypeOf;␊ - var __hasOwnProp = Object.prototype.hasOwnProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __reExport = (target, module2, desc) => {␊ - if (module2 && typeof module2 === "object" || typeof module2 === "function") {␊ - for (let key of __getOwnPropNames(module2))␊ - if (!__hasOwnProp.call(target, key) && key !== "default")␊ - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });␊ - }␊ - return target;␊ - };␊ - var __toModule = (module2) => {␊ - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);␊ - };␊ - ␊ - // input.ts␊ - var import_node_fs = __toModule(require("fs"));␊ - console.log(import_node_fs.default);␊ - ` - -## external - -> Snapshot 1 - - `var __create = Object.create;␊ - var __defProp = Object.defineProperty;␊ - var __getOwnPropDesc = Object.getOwnPropertyDescriptor;␊ - var __getOwnPropNames = Object.getOwnPropertyNames;␊ - var __getProtoOf = Object.getPrototypeOf;␊ - var __hasOwnProp = Object.prototype.hasOwnProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - var __reExport = (target, module2, desc) => {␊ - if (module2 && typeof module2 === "object" || typeof module2 === "function") {␊ - for (let key of __getOwnPropNames(module2))␊ - if (!__hasOwnProp.call(target, key) && key !== "default")␊ - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });␊ - }␊ - return target;␊ - };␊ - var __toModule = (module2) => {␊ - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - bar: () => import_bar.bar,␊ - baz: () => baz,␊ - foo: () => import_foo.foo␊ - });␊ - var import_foo = __toModule(require("foo"));␊ - var import_bar = __toModule(require("bar"));␊ - ␊ - // node_modules/baz/index.ts␊ - var baz = "baz";␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - bar,␊ - baz,␊ - foo␊ - });␊ - ` - -## disable code splitting to get proper module.exports = - -> Snapshot 1 - - `// input.ts␊ - module.exports = 123;␊ - ` - -## bundle svelte - -> output - - `var __create = Object.create;␊ - var __defProp = Object.defineProperty;␊ - var __getOwnPropDesc = Object.getOwnPropertyDescriptor;␊ - var __getOwnPropNames = Object.getOwnPropertyNames;␊ - var __getProtoOf = Object.getPrototypeOf;␊ - var __hasOwnProp = Object.prototype.hasOwnProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - var __reExport = (target, module2, desc) => {␊ - if (module2 && typeof module2 === "object" || typeof module2 === "function") {␊ - for (let key of __getOwnPropNames(module2))␊ - if (!__hasOwnProp.call(target, key) && key !== "default")␊ - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });␊ - }␊ - return target;␊ - };␊ - var __toModule = (module2) => {␊ - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - App: () => App_default␊ - });␊ - ␊ - // App.svelte␊ - var import_internal = __toModule(require("svelte/internal"));␊ - function create_fragment(ctx) {␊ - let span;␊ - return {␊ - c() {␊ - span = (0, import_internal.element)("span");␊ - span.textContent = \`${msg}\`;␊ - (0, import_internal.attr)(span, "class", "svelte-1jo4k3z");␊ - },␊ - m(target, anchor) {␊ - (0, import_internal.insert)(target, span, anchor);␊ - },␊ - p: import_internal.noop,␊ - i: import_internal.noop,␊ - o: import_internal.noop,␊ - d(detaching) {␊ - if (detaching)␊ - (0, import_internal.detach)(span);␊ - }␊ - };␊ - }␊ - var msg = "hello svelte";␊ - var App = class extends import_internal.SvelteComponent {␊ - constructor(options) {␊ - super();␊ - (0, import_internal.init)(this, options, null, create_fragment, import_internal.safe_not_equal, {});␊ - }␊ - };␊ - var App_default = App;␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - App␊ - });␊ - ` - -> css - - `/* svelte-css:App.svelte.css */␊ - span.svelte-1jo4k3z {␊ - color: red;␊ - }␊ - ` - -## support baseUrl and paths in tsconfig.json - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - foo: () => foo␊ - });␊ - ␊ - // foo.ts␊ - var foo = "foo";␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - foo␊ - });␊ - ` - -## support baseUrl and paths in tsconfig.json in --dts build - -> Snapshot 1 - - `declare const foo = "foo";␊ - ␊ - export { foo };␊ - ` - -## support baseUrl and paths in tsconfig.json in --dts-resolve build - -> Snapshot 1 - - `declare const foo = "foo";␊ - ␊ - export { foo };␊ - ` - -## transform import.meta.url in cjs format - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - default: () => input_default␊ - });␊ - ␊ - // ../../../assets/cjs_shims.js␊ - var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;␊ - var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();␊ - ␊ - // input.ts␊ - var input_default = importMetaUrl;␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {});␊ - ` - -## transform __dirname, __filename in esm format - -> Snapshot 1 - - `// ../../../assets/esm_shims.js␊ - import { fileURLToPath } from "url";␊ - import path from "path";␊ - var getFilename = () => fileURLToPath(import.meta.url);␊ - var getDirname = () => path.dirname(getFilename());␊ - var __dirname = /* @__PURE__ */ getDirname();␊ - var __filename = /* @__PURE__ */ getFilename();␊ - ␊ - // input.ts␊ - var a = __dirname;␊ - var b = __filename;␊ - export {␊ - a,␊ - b␊ - };␊ - ` - -## code splitting in cjs format - -> Snapshot 1 - - `"use strict";Object.defineProperty(exports, "__esModule", {value: true});␊ - ␊ - ␊ - var _chunk56VUBPK5js = require('./chunk-56VUBPK5.js');␊ - ␊ - // input.ts␊ - var foo = () => Promise.resolve().then(() => _chunk56VUBPK5js.__toModule.call(void 0, _chunk56VUBPK5js.__require.call(void 0, "./foo-UAUJLGDY.js")));␊ - ␊ - ␊ - exports.foo = foo;␊ - ` - -> Snapshot 2 - - `"use strict";Object.defineProperty(exports, "__esModule", {value: true});␊ - ␊ - ␊ - var _chunk56VUBPK5js = require('./chunk-56VUBPK5.js');␊ - ␊ - // another-input.ts␊ - var foo = () => Promise.resolve().then(() => _chunk56VUBPK5js.__toModule.call(void 0, _chunk56VUBPK5js.__require.call(void 0, "./foo-UAUJLGDY.js")));␊ - ␊ - ␊ - exports.foo = foo;␊ - ` - -## declaration files with multiple entrypoints #316 - -> dist/index.d.ts - - `declare const foo = 1;␊ - ␊ - export { foo };␊ - ` - -> dist/bar/index.d.ts - - `declare const bar = "bar";␊ - ␊ - export { bar };␊ - ` - -## es5 target - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = function (target) { return __defProp(target, "__esModule", { value: true }); };␊ - var __export = function (target, all) {␊ - __markAsModule(target);␊ - for (var name in all)␊ - { __defProp(target, name, { get: all[name], enumerable: true }); }␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - Foo: function () { return Foo; }␊ - });␊ - var Foo = /*@__PURE__*/(function () {␊ - function Foo () {}␊ - ␊ - Foo.prototype.hi = function hi () {␊ - var a = function () { return "foo"; };␊ - console.log(a());␊ - };␊ - ␊ - return Foo;␊ - }());␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - Foo: Foo␊ - });␊ - ` - -## multiple targets - -> Snapshot 1 - - `var __defProp = Object.defineProperty;␊ - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });␊ - var __export = (target, all) => {␊ - __markAsModule(target);␊ - for (var name in all)␊ - __defProp(target, name, { get: all[name], enumerable: true });␊ - };␊ - ␊ - // input.ts␊ - __export(exports, {␊ - answer: () => answer␊ - });␊ - var answer = 42;␊ - // Annotate the CommonJS export names for ESM import in node:␊ - 0 && (module.exports = {␊ - answer␊ - });␊ - ` diff --git a/test/snapshots/index.test.ts.snap b/test/snapshots/index.test.ts.snap deleted file mode 100644 index e4d2e82ff870bdb9a9cd1646d56327c38d5e01be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2583 zcmV+y3h4DgRzVZ|JNp8h&IOn7i2e*c=vSSB{de9IvifuHL=UXjJmipPrj(EhwJfT4A zNIyHG(k1=vQif^lkoI6e4Q;za#^lsba=J-mmQylutw?${;+ZUkb%>uNO5(UhriQfR zZ9z}OGvc5K=BJdzOtC>bY0v~oPy=|`M7kH)@M(uomZvoH50k1|ldV>(*8_>8TzXQp ztcs5Q5gnx%4B_Vqh;x*#ih5ugTPOx)M4Y1p)Dj+TH_WvSukEREkg6sI=qg-WNW8-s zm%gM#4k@|E)0DG^Plz!gPD&`dJb3bmfd8=(48wRxH(P6Dd6_t=vZH6F0wau3R|A?e zhcYw<>2^aYx)~KbIi*UX7||e(;(%xYGq`&8+ZwE1Ef}3vNtE%Fteoa_1?DTyN0dAQ zkM7gY^Ejj72Twa>|6`beq%0KVgr4(=JlzJx9-IY99#T!PO_oW)vKI#@rg^*7G6Rik zV#%bK)F=hx#SjZPkJOi9HYOJTQd9oVi}RScQcUiw~1nzb@$FkgY0ySEhYU zd=`??$&sgk7mEwwyHQ2J;>vVfnrT?9>4D2}-<=uvWh{pzp+|mjPIxXs)EstiD(s>( zW^r^r3#$Lr{QHju)GX^adlma+pZB*jhj(i38f#}Qt-+8;Mf*Szx&7_2bhx_(+H2dR z;*pE&tTRUQMlaZ>or+yi!eomU#v8-xvgv@J93)3M3uMe0$sKo`QJH5e_G z^pUYL|Ko0#vQrWz{!s(S|5-D_U*{md8py%I7Uu9+038hv<-{lheU<;(*NA#Mu=TrP z4McTKeXacdsOt3vn)rt_Ic&ELrzkmbU{!9+K&LLkaHgmvf$2&f@MIQlw|-ND+gG== z(}RqnH43!pcMFM2f)Tv=_$9;E`&0xab=i*8*q6m4$+KC$UnCD6oXLM7IZ1gK|hZU=OA#A+p$s>bsIh|@xIkmI6qC~paeG(~vZ z@;6025EntOBh`%h0(z#Rf5{0ohNfZV6h=cGTr>evdL^?mIw2GI(|MX`1ym-{&XBzH zt)00wzu_r8=1k?ha$?r#OMSxfBq1Lbk>penS{j#Z!hWJtTC0En+R{9FC7iIepv6RB zsXuHqqi0B)@+gjMky%)F!#N)4G;?Z8xK8ep0kL_#^pTGPq&?!swDqU{2Iz!~h2 zsF&~~r_N_pEtBOCw>TN|8*xNN>CS;H>ItrNp=7Z5{_BF34hT(0LQdZ14) zW+6SZ3k5V_0!=77+##xL{?5!Ug=H1^SA$4TiJg1_IzcVuWa*`ZN9R-i7VUA zXk-E)No42ynQWT6g`JzkhP)3p>c9qkhsdZ?Ry=vr_G*0b(W~pSlH)9?EdmMsZH7Vv(`TPlQ*H~MDbQPWYbTZPPX>{fC>}jnc z+U>0xvv&g_Hp@`<@C0+U*HV#DN3=0>!lB;HXo#-V0|mfi3%FGdU|LNtyQJkWa z!#qyH*$RKNhUZR5A!TG#r-AzP$`9(;T=~eka|LyZI|SFK){4x0Ch)tfv9*^%HuZ8) z5VQ!6h505s8$UPSsm0HYoAda&zN;{v*VF&QN=2pUfnx?@7^eaNqoxlEeWd*N2;7J8 z>Kl2cvJZKXr>f|{Ive(#$}3?Tiau%kKqw zmcj26wJ*eIZ0_+y7GPCf2v7Z(fwJJgfIp+R2Ut0NHW=(3>^~R`V5OLu zrsH1X8ccX1J@TLu+CD9$u$N~@wYD$)x>Yw_2$(E5C_0Rg~YBETpK(G4Sjxu5bq z$ShE=tLsB;h-SzEh6rane|&K>aeJKHRZ=sM?)9n#8=jF4{MIw zT5RV6*ku;OK6|S%A(qKtD$7-poXP^)7{M@SCmVNvb@21Ok2j7Hd3Lw6;`LN#*Y*N1 zR+?<07Y6Ms&?1cm^~^%!xE@3Vb9CqQU|zY$();*R9)|=<+y+9URh_Qw^?w9TyrW2v6$<|8BLcN%w0ez4v`FsSg=sNVD$$qiHR=*L20;tNk!Wgt>WD z+{c0}ot=+3>^}r~_s;s=nKQ~~cWWhx(^P`2H6^qO8$}&+4SP zDi@mzxkAZ>rmAdn>w=06bCT0=yZ28uto`9z-R><88j9LxT%HR3j};D?%oI7(;!U-4 z)lz5tEsGt!2fakOvy0n>Qu&Hipht-@d4E@dr?*<<`_-OP)V|2ey;Xf)BW6k t)lmJn`9}AO7bTf^NsG^K`mMY&sa|1D@87=8i<9M`{{>f9{~fb1001rt{PX|- diff --git a/tsconfig.json b/tsconfig.json index 8759128..a99461b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, + "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ @@ -39,7 +39,7 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..4ca2f9a --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,9 @@ +import { UserConfig } from 'vitest' + +const config: { test: UserConfig } = { + test: { + testTimeout: 50000, + }, +} + +export default config