From 444e55f09ac88aa03b702ae0744a2846a9c1b675 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 13 Jan 2023 13:31:50 +0900 Subject: [PATCH 01/31] refactor: export inline --- src/interfaces.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/interfaces.ts b/src/interfaces.ts index 4e341c6f..cf104a64 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -10,20 +10,15 @@ type Except = { [Key in keyof ObjectType as (Key extends Properties ? never : Key)]: ObjectType[Key]; }; -type LoaderOptions = Except & { +export type LoaderOptions = Except & { /** Pass a custom esbuild implementation */ implementation?: Implementation; }; -type MinifyPluginOptions = Except & { +export type MinifyPluginOptions = Except & { include?: Filter | Filter[]; exclude?: Filter | Filter[]; css?: boolean; /** Pass a custom esbuild implementation */ implementation?: Implementation; }; - -export { - LoaderOptions, - MinifyPluginOptions, -}; From 9e5e8f38e9d2bcb4c33f9bab7054da7d38b02949 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 13 Jan 2023 13:59:54 +0900 Subject: [PATCH 02/31] ci: drop support for next branch --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 1 - .releaserc | 9 --------- 3 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 .releaserc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97a89188..54d2c2c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: push: - branches: [master, next] + branches: [master] jobs: release: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9091f8b..e65a7473 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,6 @@ on: push: branches: [develop] pull_request: - branches: [master, develop, next] jobs: test: name: Test diff --git a/.releaserc b/.releaserc deleted file mode 100644 index 24a31533..00000000 --- a/.releaserc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "branches": [ - "master", - { - "name": "next", - "prerelease": "alpha" - } - ] -} \ No newline at end of file From ecb181ed98b0b61769c038c01745e7884a733c1b Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 13 Jan 2023 14:21:06 +0900 Subject: [PATCH 03/31] chore add clean-pkg-json & build on prepack --- package.json | 4 +++- pnpm-lock.yaml | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 28f04a90..8c554a02 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "build": "tsc", "test": "tsx tests", "dev": "tsx watch --conditions=development tests", - "lint": "eslint --cache ." + "lint": "eslint --cache .", + "prepack": "pnpm build && clean-pkg-json" }, "peerDependencies": { "webpack": "^4.40.0 || ^5.0.0" @@ -52,6 +53,7 @@ "@types/node": "^18.11.18", "@types/webpack": "^4.41.33", "@types/webpack-sources": "^0.1.9", + "clean-pkg-json": "^1.2.0", "css-loader": "^5.2.7", "eslint": "^8.31.0", "manten": "^0.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c6916aa..4f57b793 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ specifiers: '@types/node': ^18.11.18 '@types/webpack': ^4.41.33 '@types/webpack-sources': ^0.1.9 + clean-pkg-json: ^1.2.0 css-loader: ^5.2.7 esbuild: ^0.16.17 eslint: ^8.31.0 @@ -39,6 +40,7 @@ devDependencies: '@types/node': 18.11.18 '@types/webpack': 4.41.33 '@types/webpack-sources': 0.1.9 + clean-pkg-json: 1.2.0 css-loader: 5.2.7_webpack@4.46.0 eslint: 8.31.0 manten: 0.6.0 @@ -1525,6 +1527,11 @@ packages: static-extend: 0.1.2 dev: true + /clean-pkg-json/1.2.0: + resolution: {integrity: sha512-QHBWWOtpSCv5nfMFKwyxn4WMvkYE0msxj5xiqejYGqYepWVrK7O/om1Vn6nSl/WPtYn8ge9YmSCbTi1Hp8k+Hg==} + hasBin: true + dev: true + /clean-regexp/1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} From f907edd5d3682d3e80aba469651cbfada43ca688 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 13 Jan 2023 14:46:12 +0900 Subject: [PATCH 04/31] build: add exports map and bundle with pkgroll (#265) BREAKING CHANGE: exports map and bundled files --- package.json | 17 +++- pnpm-lock.yaml | 174 ++++++++++++++++++++++++++++++++ src/index.d.ts | 9 ++ src/index.ts | 1 - src/loader.ts | 2 +- src/minify-plugin.ts | 2 +- src/{interfaces.ts => types.ts} | 0 tests/tsconfig.json | 4 - tsconfig.json | 2 - 9 files changed, 198 insertions(+), 13 deletions(-) create mode 100644 src/index.d.ts rename src/{interfaces.ts => types.ts} (100%) delete mode 100644 tests/tsconfig.json diff --git a/package.json b/package.json index 8c554a02..2042df04 100644 --- a/package.json +++ b/package.json @@ -19,20 +19,28 @@ "files": [ "dist" ], - "main": "./dist/index.js", + "main": "./dist/index.cjs", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.cjs" + }, + "./package.json": "./package.json" + }, "imports": { "#esbuild-loader": { - "types": "./src/index.ts", + "types": "./src/index.d.ts", "development": "./src/index.ts", - "default": "./dist/index.js" + "default": "./dist/index.cjs" } }, "scripts": { - "build": "tsc", + "build": "pkgroll --target=node12.20.0", "test": "tsx tests", "dev": "tsx watch --conditions=development tests", "lint": "eslint --cache .", + "type-check": "tsc --noEmit", "prepack": "pnpm build && clean-pkg-json" }, "peerDependencies": { @@ -59,6 +67,7 @@ "manten": "^0.6.0", "memfs": "^3.4.13", "mini-css-extract-plugin": "^1.6.2", + "pkgroll": "^1.8.0", "tsx": "^3.12.2", "typescript": "^4.9.4", "webpack": "^4.44.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f57b793..a2818667 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,7 @@ specifiers: manten: ^0.6.0 memfs: ^3.4.13 mini-css-extract-plugin: ^1.6.2 + pkgroll: ^1.8.0 tapable: ^2.2.0 tsx: ^3.12.2 typescript: ^4.9.4 @@ -46,6 +47,7 @@ devDependencies: manten: 0.6.0 memfs: 3.4.13 mini-css-extract-plugin: 1.6.2_webpack@4.46.0 + pkgroll: 1.8.0_typescript@4.9.4 tsx: 3.12.2 typescript: 4.9.4 webpack: 4.46.0 @@ -472,6 +474,97 @@ packages: - typescript dev: true + /@rollup/plugin-alias/3.1.9_rollup@2.79.1: + resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} + engines: {node: '>=8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + rollup: 2.79.1 + slash: 3.0.0 + dev: true + + /@rollup/plugin-commonjs/22.0.2_rollup@2.79.1: + resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} + engines: {node: '>= 12.0.0'} + peerDependencies: + rollup: ^2.68.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 7.2.3 + is-reference: 1.2.1 + magic-string: 0.25.9 + resolve: 1.22.1 + rollup: 2.79.1 + dev: true + + /@rollup/plugin-inject/4.0.4_rollup@2.79.1: + resolution: {integrity: sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + estree-walker: 2.0.2 + magic-string: 0.25.9 + rollup: 2.79.1 + dev: true + + /@rollup/plugin-json/4.1.0_rollup@2.79.1: + resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + rollup: 2.79.1 + dev: true + + /@rollup/plugin-node-resolve/13.3.0_rollup@2.79.1: + resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.42.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + '@types/resolve': 1.17.1 + deepmerge: 4.2.2 + is-builtin-module: 3.2.0 + is-module: 1.0.0 + resolve: 1.22.1 + rollup: 2.79.1 + dev: true + + /@rollup/plugin-replace/4.0.0_rollup@2.79.1: + resolution: {integrity: sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + magic-string: 0.25.9 + rollup: 2.79.1 + dev: true + + /@rollup/pluginutils/3.1.0_rollup@2.79.1: + resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@types/estree': 0.0.39 + estree-walker: 1.0.1 + picomatch: 2.3.1 + rollup: 2.79.1 + dev: true + + /@rollup/pluginutils/4.2.1: + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} + engines: {node: '>= 8.0.0'} + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + /@sinclair/typebox/0.24.51: resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} dev: true @@ -490,6 +583,10 @@ packages: '@types/json-schema': 7.0.11 dev: true + /@types/estree/0.0.39: + resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} + dev: true + /@types/estree/0.0.51: resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==} dev: true @@ -548,6 +645,12 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/resolve/1.17.1: + resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} + dependencies: + '@types/node': 18.11.18 + dev: true + /@types/semver/7.3.13: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true @@ -1760,6 +1863,11 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /deepmerge/4.2.2: + resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} + engines: {node: '>=0.10.0'} + dev: true + /define-lazy-prop/2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -2633,6 +2741,14 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker/1.0.1: + resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} + dev: true + + /estree-walker/2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils/2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -3407,6 +3523,10 @@ packages: js-types: 1.0.0 dev: true + /is-module/1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + /is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -3457,6 +3577,12 @@ packages: proto-props: 2.0.0 dev: true + /is-reference/1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + dependencies: + '@types/estree': 0.0.51 + dev: true + /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -3797,6 +3923,19 @@ packages: yallist: 4.0.0 dev: true + /magic-string/0.25.9: + resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + + /magic-string/0.26.7: + resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} + engines: {node: '>=12'} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -4417,6 +4556,28 @@ packages: find-up: 3.0.0 dev: true + /pkgroll/1.8.0_typescript@4.9.4: + resolution: {integrity: sha512-udmzTqrlFcUxHG+KU+bYZqb1Z/2LFFRGwLg4EuOCe6t52dIFJYrWE7iAqY3/sU9EmwDQqIVoLbxX5NKj1d1h6Q==} + hasBin: true + peerDependencies: + typescript: ^4.1 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@rollup/plugin-alias': 3.1.9_rollup@2.79.1 + '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1 + '@rollup/plugin-inject': 4.0.4_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@rollup/plugin-replace': 4.0.0_rollup@2.79.1 + '@rollup/pluginutils': 4.2.1 + esbuild: 0.15.18 + magic-string: 0.26.7 + rollup: 2.79.1 + typescript: 4.9.4 + dev: true + /pluralize/8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -4803,6 +4964,14 @@ packages: inherits: 2.0.4 dev: true + /rollup/2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -5030,6 +5199,11 @@ packages: engines: {node: '>= 8'} dev: true + /sourcemap-codec/1.4.8: + resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + deprecated: Please use @jridgewell/sourcemap-codec instead + dev: true + /spdx-correct/3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 00000000..08dfc5d1 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,9 @@ +import { MinifyPluginOptions } from './types'; + +export class ESBuildMinifyPlugin { + constructor(options?: MinifyPluginOptions); + + apply(compiler: any): void; +} + +export * from './types'; diff --git a/src/index.ts b/src/index.ts index d9ec947b..a20f5e14 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,4 +4,3 @@ import ESBuildMinifyPlugin from './minify-plugin'; export default esbuildLoader; export { ESBuildPlugin, ESBuildMinifyPlugin }; -export * from './interfaces'; diff --git a/src/loader.ts b/src/loader.ts index f8c01380..760a4a12 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -5,7 +5,7 @@ import { getOptions } from 'loader-utils'; import webpack from 'webpack'; import JoyCon, { LoadResult } from 'joycon'; import JSON5 from 'json5'; -import { LoaderOptions } from './interfaces'; +import type { LoaderOptions } from './types'; const joycon = new JoyCon(); diff --git a/src/minify-plugin.ts b/src/minify-plugin.ts index 5ce5cdf7..8bb150b8 100644 --- a/src/minify-plugin.ts +++ b/src/minify-plugin.ts @@ -9,7 +9,7 @@ import type { } from 'tapable'; import type { Source } from 'webpack-sources'; import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; -import { MinifyPluginOptions } from './interfaces'; +import type { MinifyPluginOptions } from './types'; type StatsPrinter = { hooks: { diff --git a/src/interfaces.ts b/src/types.ts similarity index 100% rename from src/interfaces.ts rename to src/types.ts diff --git a/tests/tsconfig.json b/tests/tsconfig.json deleted file mode 100644 index d8e40f5b..00000000 --- a/tests/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "..", - "include": ["."] -} diff --git a/tsconfig.json b/tsconfig.json index 5edfdd0c..51a3b94d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "outDir": "dist", "module": "Node16", // Node 10 @@ -12,5 +11,4 @@ "esModuleInterop": true, "skipLibCheck": true }, - "include": ["src"] } From 43f11548880b819fe071b2fa8910d4fb777b61c4 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Fri, 13 Jan 2023 00:51:29 -0500 Subject: [PATCH 05/31] ci: update testing to Node 16 (#302) BREAKING CHANGE: Increase supported Node.js to v16 --- .github/workflows/test.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e65a7473..0da1631f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,8 +32,8 @@ jobs: NODE_OPTIONS: --openssl-legacy-provider run: pnpm test - - name: Test Node.js v12 - run: pnpm --use-node-version=12.22.12 test + - name: Test Node.js v16 + run: pnpm --use-node-version=16.19.0 test - name: Lint run: pnpm lint diff --git a/package.json b/package.json index 2042df04..4a2549cc 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ } }, "scripts": { - "build": "pkgroll --target=node12.20.0", + "build": "pkgroll --target=node16.19.0", "test": "tsx tests", "dev": "tsx watch --conditions=development tests", "lint": "eslint --cache .", From 378c74e359dbc610bc124317c4e3057bcf2ecee9 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Sat, 14 Jan 2023 09:52:25 -0500 Subject: [PATCH 06/31] refactor: esbuild to auto-detect which loader to use (#304) BREAKING CHANGE: Default value of loader now auto-detects which loader to use based on the extension of the file --- README.md | 8 ++------ src/loader.ts | 11 +---------- tests/specs/loader.ts | 18 ------------------ 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index f1b99a32..c32fc138 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ In `webpack.config.js`: + test: /\.js$/, + loader: 'esbuild-loader', + options: { -+ loader: 'jsx', // Remove this if you're not using JSX + target: 'es2015' // Syntax to compile to (see options below for possible values) + } + }, @@ -68,7 +67,6 @@ In `webpack.config.js`: + test: /\.tsx?$/, + loader: 'esbuild-loader', + options: { -+ loader: 'tsx', // Or 'ts' if you don't need tsx + target: 'es2015' + } + }, @@ -88,8 +86,6 @@ Alternatively, you can also pass it in directly via the [`tsconfigRaw` option](h test: /\.tsx?$/, loader: 'esbuild-loader', options: { - loader: 'tsx', - target: 'es2015', + tsconfigRaw: require('./tsconfig.json') } } @@ -194,7 +190,6 @@ In `webpack.config.js`: + { + loader: 'esbuild-loader', + options: { -+ loader: 'css', + minify: true + } + } @@ -267,10 +262,11 @@ Read more about it in the [esbuild docs](https://esbuild.github.io/api/#target). #### loader Type: `'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'default'` -Default: `'js'` +Default: `'default'` The loader to use to handle the file. See the type for [possible values](https://github.com/evanw/esbuild/blob/88821b7e7d46737f633120f91c65f662eace0bcf/lib/shared/types.ts#L3). +By default, it automatically detects the loader based on the file extension. Read more about it in the [esbuild docs](https://esbuild.github.io/api/#loader). diff --git a/src/loader.ts b/src/loader.ts index 760a4a12..c7bec522 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -23,7 +23,6 @@ joycon.addLoader({ }, }); -const isTsExtensionPtrn = /\.ts$/i; let tsConfig: LoadResult; async function ESBuildLoader( @@ -51,7 +50,7 @@ async function ESBuildLoader( const transformOptions = { ...esbuildTransformOptions, target: options.target ?? 'es2015', - loader: options.loader ?? 'js', + loader: options.loader ?? 'default', sourcemap: this.sourceMap, sourcefile: this.resourcePath, }; @@ -66,14 +65,6 @@ async function ESBuildLoader( } } - // https://github.com/privatenumber/esbuild-loader/pull/107 - if ( - transformOptions.loader === 'tsx' - && isTsExtensionPtrn.test(this.resourcePath) - ) { - transformOptions.loader = 'ts'; - } - try { const { code, map } = await transform(source, transformOptions); done(null, code, map && JSON.parse(map)); diff --git a/tests/specs/loader.ts b/tests/specs/loader.ts index 85e869ea..43ef848f 100644 --- a/tests/specs/loader.ts +++ b/tests/specs/loader.ts @@ -72,9 +72,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac (config) => { configureEsbuildLoader(config, { test: /\.ts$/, - options: { - loader: 'ts', - }, }); }, webpack, @@ -96,7 +93,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac configureEsbuildLoader(config, { test: /\.tsx$/, options: { - loader: 'tsx', jsxFactory: 'Array', jsxFragment: '"Fragment"', }, @@ -129,7 +125,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac configureEsbuildLoader(config, { test: /\.tsx$/, options: { - loader: 'tsx', tsconfigRaw: { compilerOptions: { jsxFactory: 'Array', @@ -213,9 +208,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac (config) => { configureEsbuildLoader(config, { test: /\.tsx?$/, - options: { - loader: 'tsx', - }, }); }, webpack, @@ -242,9 +234,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac (config) => { configureEsbuildLoader(config, { test: /\.tsx?$/, - options: { - loader: 'tsx', - }, }); }, webpack, @@ -265,9 +254,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac (config) => { configureEsbuildLoader(config, { test: /\.tsx?$/, - options: { - loader: 'tsx', - }, }); }, webpack, @@ -289,9 +275,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac (config) => { configureEsbuildLoader(config, { test: /\.tsx?$/, - options: { - loader: 'tsx', - }, }); }, webpack, @@ -410,7 +393,6 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac cssRule.use.push({ loader: 'esbuild-loader', options: { - loader: 'css', minify: true, }, }); From 06814252c46cf3a3287d2174ea9ec4d43cd9018d Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Sun, 15 Jan 2023 01:37:50 +0900 Subject: [PATCH 07/31] refactor: use Webpack 5 types --- src/@types/webpack.d.ts | 2 -- src/minify-plugin.ts | 59 +++++++++++++++-------------------------- 2 files changed, 21 insertions(+), 40 deletions(-) diff --git a/src/@types/webpack.d.ts b/src/@types/webpack.d.ts index 25733668..6202eae3 100644 --- a/src/@types/webpack.d.ts +++ b/src/@types/webpack.d.ts @@ -5,8 +5,6 @@ declare module 'webpack' { namespace compilation { interface Compilation { getAssets(): Asset[]; - - // From Webpack 5 emitAsset( file: string, source: Source, diff --git a/src/minify-plugin.ts b/src/minify-plugin.ts index 8bb150b8..4ac36e1e 100644 --- a/src/minify-plugin.ts +++ b/src/minify-plugin.ts @@ -3,33 +3,14 @@ import { RawSource as WP4RawSource, SourceMapSource as WP4SourceMapSource, } from 'webpack-sources'; -import webpack from 'webpack'; -import type { - SyncHook, SyncBailHook, AsyncSeriesHook, HookMap, -} from 'tapable'; -import type { Source } from 'webpack-sources'; +import webpack4 from 'webpack'; +import webpack5 from 'webpack5'; import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; import type { MinifyPluginOptions } from './types'; -type StatsPrinter = { - hooks: { - print: HookMap>; - }; -}; - -type Compilation = webpack.compilation.Compilation; - -type Wp5Compilation = Compilation & { - hooks: Compilation['hooks'] & { - processAssets: AsyncSeriesHook>; - statsPrinter: SyncHook; - }; - constructor: { - PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: 400; - }; -}; - -const isWebpack5 = (compilation: Compilation): compilation is Wp5Compilation => ('processAssets' in compilation.hooks); +type Compiler = webpack4.Compiler | webpack5.Compiler; +type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; +type Asset = webpack4.compilation.Asset | Readonly; // eslint-disable-next-line @typescript-eslint/no-var-requires const { version } = require('../package.json'); @@ -65,7 +46,7 @@ class ESBuildMinifyPlugin { } } - apply(compiler: webpack.Compiler): void { + apply(compiler: Compiler): void { const meta = JSON.stringify({ name: 'esbuild-loader', version, @@ -75,12 +56,12 @@ class ESBuildMinifyPlugin { compiler.hooks.compilation.tap(pluginName, (compilation) => { compilation.hooks.chunkHash.tap(pluginName, (_, hash) => hash.update(meta)); - if (isWebpack5(compilation)) { + if ('processAssets' in compilation.hooks) { compilation.hooks.processAssets.tapPromise( { name: pluginName, + // @ts-expect-error undefined on Function type stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, - // @ts-expect-error TODO: modify type additionalAssets: true, }, async () => await this.transformAssets(compilation), @@ -91,11 +72,14 @@ class ESBuildMinifyPlugin { .for('asset.info.minimized') .tap( pluginName, - (minimized, { green, formatFlag }) => ( - minimized - ? green(formatFlag('minimized')) - : undefined - ), + (minimized, { green, formatFlag }) => + // @ts-expect-error type incorrectly doesn't accept undefined + ( + minimized + // @ts-expect-error type incorrectly doesn't accept undefined + ? green(formatFlag('minimized')) + : undefined + ), ); }); } else { @@ -113,8 +97,7 @@ class ESBuildMinifyPlugin { const { compiler } = compilation; const { options: { devtool } } = compiler; - // @ts-expect-error Only exists on Webpack 5 - const sources = compiler.webpack?.sources; + const sources = 'webpack' in compiler && compiler.webpack.sources; const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); const RawSource = (sources ? sources.RawSource : WP4RawSource); @@ -133,7 +116,7 @@ class ESBuildMinifyPlugin { ...transformOptions } = this.options; - const assets = compilation.getAssets().filter(asset => ( + const assets = (compilation.getAssets() as Asset[]).filter((asset) => ( // Filter out already minimized !asset.info.minimized @@ -177,7 +160,7 @@ class ESBuildMinifyPlugin { if (result.legalComments) { compilation.emitAsset( `${asset.name}.LEGAL.txt`, - new RawSource(result.legalComments), + new RawSource(result.legalComments) as any, ); } @@ -190,11 +173,11 @@ class ESBuildMinifyPlugin { asset.name, result.map as any, sourceAsString, - map!, + map as any, true, ) : new RawSource(result.code) - ), + ) as any, { ...asset.info, minimized: true, From 53cbc73e278581a2538f31db8db82dbea15bd0c6 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Sun, 15 Jan 2023 23:31:16 -0500 Subject: [PATCH 08/31] refactor: remove `sourcemap` option (#305) BREAKING CHANGE: `sourcemap` option removed --- README.md | 7 ------ src/minify-plugin.ts | 57 ++++++++++++++++++++++++++----------------- src/types.ts | 2 +- tests/index.ts | 7 +++++- tests/specs/plugin.ts | 33 ++----------------------- 5 files changed, 43 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index c32fc138..86153127 100644 --- a/README.md +++ b/README.md @@ -344,13 +344,6 @@ Default: `'inline'` Read more about it in the [esbuild docs](https://esbuild.github.io/api/#legal-comments). -#### sourcemap -Type: `boolean` - -Default: Webpack `devtool` configuration - -Whether to emit sourcemaps. - #### css Type: `boolean` diff --git a/src/minify-plugin.ts b/src/minify-plugin.ts index 4ac36e1e..624f21ff 100644 --- a/src/minify-plugin.ts +++ b/src/minify-plugin.ts @@ -56,6 +56,24 @@ class ESBuildMinifyPlugin { compiler.hooks.compilation.tap(pluginName, (compilation) => { compilation.hooks.chunkHash.tap(pluginName, (_, hash) => hash.update(meta)); + /** + * Check if sourcemaps are enabled + * Webpack 4: https://github.com/webpack/webpack/blob/v4.46.0/lib/SourceMapDevToolModuleOptionsPlugin.js#L20 + * Webpack 5: https://github.com/webpack/webpack/blob/v5.75.0/lib/SourceMapDevToolModuleOptionsPlugin.js#LL27 + */ + let useSourceMap = false; + compilation.hooks.finishModules.tap( + pluginName, + (modules) => { + const firstModule = ( + Array.isArray(modules) + ? modules[0] + : (modules as Set).values().next().value as webpack5.Module + ); + useSourceMap = firstModule.useSourceMap; + }, + ); + if ('processAssets' in compilation.hooks) { compilation.hooks.processAssets.tapPromise( { @@ -64,7 +82,7 @@ class ESBuildMinifyPlugin { stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, additionalAssets: true, }, - async () => await this.transformAssets(compilation), + async () => await this.transformAssets(compilation, useSourceMap), ); compilation.hooks.statsPrinter.tap(pluginName, (statsPrinter) => { @@ -72,20 +90,22 @@ class ESBuildMinifyPlugin { .for('asset.info.minimized') .tap( pluginName, - (minimized, { green, formatFlag }) => - // @ts-expect-error type incorrectly doesn't accept undefined - ( - minimized - // @ts-expect-error type incorrectly doesn't accept undefined - ? green(formatFlag('minimized')) - : undefined - ), + ( + minimized, + { green, formatFlag }, + // @ts-expect-error type incorrectly doesn't accept undefined + ) => ( + minimized + // @ts-expect-error type incorrectly doesn't accept undefined + ? green(formatFlag('minimized')) + : undefined + ), ); }); } else { compilation.hooks.optimizeChunkAssets.tapPromise( pluginName, - async () => await this.transformAssets(compilation), + async () => await this.transformAssets(compilation, useSourceMap), ); } }); @@ -93,22 +113,13 @@ class ESBuildMinifyPlugin { private async transformAssets( compilation: Compilation, + useSourceMap: boolean, ): Promise { const { compiler } = compilation; - const { options: { devtool } } = compiler; - const sources = 'webpack' in compiler && compiler.webpack.sources; const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); const RawSource = (sources ? sources.RawSource : WP4RawSource); - const sourcemap = ( - // TODO: drop support for esbuild sourcemap in future so it all goes through WP API - // Might still be necessary when SourceMap plugin is used - this.options.sourcemap === undefined - ? Boolean(devtool && (devtool as string).includes('source-map')) - : this.options.sourcemap - ); - const { css: minifyCss, include, @@ -116,7 +127,7 @@ class ESBuildMinifyPlugin { ...transformOptions } = this.options; - const assets = (compilation.getAssets() as Asset[]).filter((asset) => ( + const assets = (compilation.getAssets() as Asset[]).filter(asset => ( // Filter out already minimized !asset.info.minimized @@ -153,7 +164,7 @@ class ESBuildMinifyPlugin { ? 'css' : transformOptions.loader ), - sourcemap, + sourcemap: useSourceMap, sourcefile: asset.name, }); @@ -167,7 +178,7 @@ class ESBuildMinifyPlugin { compilation.updateAsset( asset.name, ( - sourcemap + result.map ? new SourceMapSource( result.code, asset.name, diff --git a/src/types.ts b/src/types.ts index cf104a64..cdb280e4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,7 +15,7 @@ export type LoaderOptions = Except implementation?: Implementation; }; -export type MinifyPluginOptions = Except & { +export type MinifyPluginOptions = Except & { include?: Filter | Filter[]; exclude?: Filter | Filter[]; css?: boolean; diff --git a/tests/index.ts b/tests/index.ts index 6331ba5b..dd6d8b3b 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -2,8 +2,13 @@ import { describe } from 'manten'; import webpack4 from 'webpack'; import webpack5 from 'webpack5'; +const webpacks = [ + webpack4, + webpack5, +]; + describe('esbuild-loader', ({ describe, runTestSuite }) => { - for (const webpack of [webpack4, webpack5]) { + for (const webpack of webpacks) { describe(`Webpack ${webpack.version![0]}`, ({ runTestSuite }) => { runTestSuite(import('./specs/loader.js'), webpack); runTestSuite(import('./specs/plugin.js'), webpack); diff --git a/tests/specs/plugin.ts b/tests/specs/plugin.ts index a056b64f..3d237df2 100644 --- a/tests/specs/plugin.ts +++ b/tests/specs/plugin.ts @@ -206,39 +206,12 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac expect(file).toContain('//# sourceMappingURL=index.js.map'); }); - // TODO: This doesn't work, so maybe we should just remove the option? - // test('minify w/ plugin sourcemap option', async () => { - // const built = await build({ - // '/src/index.js': '', - // }, (config) => { - // delete config.devtool; - // configureEsbuildMinifyPlugin(config, { - // sourcemap: true, - // }); - // }, webpack); - - // const { stats } = built; - // expect(stats.hasWarnings()).toBe(false); - // expect(stats.hasErrors()).toBe(false); - // expect( - // Object.keys(stats.compilation.assets), - // ).toStrictEqual([ - // 'index.js', - // // 'index.js.map', - // ]); - - // const file = built.fs.readFileSync('/dist/index.js', 'utf8'); - // expect(file).toContain('//# sourceMappingURL=index.js.map'); - // }); - test('minify w/ source-map option and source-map plugin inline', async () => { const built = await build( fixtures.blank, (config) => { delete config.devtool; - configureEsbuildMinifyPlugin(config, { - sourcemap: true, - }); + configureEsbuildMinifyPlugin(config); config.plugins!.push( new webpack.SourceMapDevToolPlugin({}) as any, @@ -263,9 +236,7 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac fixtures.blank, (config) => { delete config.devtool; - configureEsbuildMinifyPlugin(config, { - sourcemap: true, - }); + configureEsbuildMinifyPlugin(config); config.plugins!.push( new webpack.SourceMapDevToolPlugin({ From b052cdd0c9f6c85681d483062532fd4d07a98c30 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Wed, 18 Jan 2023 22:20:12 -0500 Subject: [PATCH 09/31] refactor: rename `ESBuildMinifyPlugin` to `EsbuildPlugin` (#307) BREAKING CHANGE: `ESBuildMinifyPlugin` renamed to `EsbuildPlugin`; `MinifyPluginOptions` renamed to `EsbuildPluginOptions` --- README.md | 18 ++-- src/index.d.ts | 6 +- src/index.ts | 5 +- src/minify-plugin.ts | 201 ----------------------------------------- src/plugin.ts | 202 +++++++++++++++++++++++++++++++++++++++++- src/types.ts | 2 +- tests/specs/loader.ts | 4 +- tests/specs/plugin.ts | 8 +- tests/utils.ts | 6 +- 9 files changed, 222 insertions(+), 230 deletions(-) delete mode 100644 src/minify-plugin.ts diff --git a/README.md b/README.md index 86153127..72e048c9 100644 --- a/README.md +++ b/README.md @@ -106,14 +106,14 @@ You can replace JS minifiers like Terser or UglifyJs. Checkout the [benchmarks]( In `webpack.config.js`: ```diff -+ const { ESBuildMinifyPlugin } = require('esbuild-loader') ++ const { EsbuildPlugin } = require('esbuild-loader') module.exports = { ..., + optimization: { + minimizer: [ -+ new ESBuildMinifyPlugin({ ++ new EsbuildPlugin({ + target: 'es2015' // Syntax to compile to (see options below for possible values) + }) + ] @@ -121,7 +121,7 @@ In `webpack.config.js`: } ``` -#### _💁‍♀️ Protip: Use the minify plugin in-place of the loader to transpile the JS_ +#### _💁‍♀️ Protip: Use the plugin in-place of the loader to transpile the JS_ If you're not using TypeScript, JSX, or any syntax unsupported by Webpack, you can also leverage the minifier for transpilation (as an alternative to Babel). It will be faster because there's less files to work on and will produce a smaller output because the polyfills will only be bundled once for the entire build instead of per file. Simply set the `target` option on the minifier to specify which support level you want. @@ -130,12 +130,12 @@ If you're not using TypeScript, JSX, or any syntax unsupported by Webpack, you c There are two ways to minify CSS, depending on your setup. You should already have CSS setup in your build using [`css-loader`](https://github.com/webpack-contrib/css-loader). #### CSS assets -If your CSS is extracted and emitted as a CSS file, you can replace CSS minification plugins like [`css-minimizer-webpack-plugin`](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) or [`optimize-css-assets-webpack-plugin`](https://github.com/NMFR/optimize-css-assets-webpack-plugin) with the same `ESBuildMinifyPlugin` by enabling the `css` option. +If your CSS is extracted and emitted as a CSS file, you can replace CSS minification plugins like [`css-minimizer-webpack-plugin`](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) or [`optimize-css-assets-webpack-plugin`](https://github.com/NMFR/optimize-css-assets-webpack-plugin) with the `EsbuildPlugin`. Assuming the CSS is extracted using something like [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin), in `webpack.config.js`: ```diff - const { ESBuildMinifyPlugin } = require('esbuild-loader') + const { EsbuildPlugin } = require('esbuild-loader') const MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = { @@ -143,7 +143,7 @@ Assuming the CSS is extracted using something like [MiniCssExtractPlugin](https: optimization: { minimizer: [ - new ESBuildMinifyPlugin({ + new EsbuildPlugin({ target: 'es2015', + css: true // Apply minification to CSS assets }) @@ -205,9 +205,9 @@ If you'd like to see working Webpack builds that use esbuild-loader for basic JS ### Bring your own esbuild (Advanced) -esbuild-loader comes with a version of esbuild it has been tested to work with. However, [esbuild has a frequent release cadence](https://github.com/evanw/esbuild/releases), and while we try to keep up with the important releases, it can easily go out of date. +esbuild-loader comes with a version of esbuild it has been tested to work with. However, [esbuild has a frequent release cadence](https://github.com/evanw/esbuild/releases), and while we try to keep up with the important releases, it can get outdated. -Use the `implementation` option in the loader or the minify plugin to pass in your own version of esbuild (eg. a newer one). +To work around this, you can use the `implementation` option in the loader or the plugin to pass in your own version of esbuild (eg. a newer one). ⚠️ esbuild is not stable yet and can have dramatic differences across releases. Using a different version of esbuild is not guaranteed to work. @@ -296,7 +296,7 @@ _Custom esbuild-loader option._ Use it to pass in a [different esbuild version](#bring-your-own-esbuild-advanced). -### MinifyPlugin +### EsbuildPlugin The loader supports [all Transform options from esbuild](https://github.com/evanw/esbuild/blob/88821b7e7d46737f633120f91c65f662eace0bcf/lib/shared/types.ts#L158-L172). diff --git a/src/index.d.ts b/src/index.d.ts index 08dfc5d1..0c54efd4 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,7 +1,7 @@ -import { MinifyPluginOptions } from './types'; +import { EsbuildPluginOptions } from './types'; -export class ESBuildMinifyPlugin { - constructor(options?: MinifyPluginOptions); +export class EsbuildPlugin { + constructor(options?: EsbuildPluginOptions); apply(compiler: any): void; } diff --git a/src/index.ts b/src/index.ts index a20f5e14..b99db316 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,5 @@ import esbuildLoader from './loader'; -import ESBuildPlugin from './plugin'; -import ESBuildMinifyPlugin from './minify-plugin'; +import EsbuildPlugin from './plugin'; export default esbuildLoader; -export { ESBuildPlugin, ESBuildMinifyPlugin }; +export { EsbuildPlugin }; diff --git a/src/minify-plugin.ts b/src/minify-plugin.ts deleted file mode 100644 index 624f21ff..00000000 --- a/src/minify-plugin.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { transform as defaultEsbuildTransform } from 'esbuild'; -import { - RawSource as WP4RawSource, - SourceMapSource as WP4SourceMapSource, -} from 'webpack-sources'; -import webpack4 from 'webpack'; -import webpack5 from 'webpack5'; -import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; -import type { MinifyPluginOptions } from './types'; - -type Compiler = webpack4.Compiler | webpack5.Compiler; -type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; -type Asset = webpack4.compilation.Asset | Readonly; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { version } = require('../package.json'); - -const isJsFile = /\.[cm]?js(?:\?.*)?$/i; -const isCssFile = /\.css(?:\?.*)?$/i; -const pluginName = 'esbuild-minify'; - -const granularMinifyConfigs = ['minifyIdentifiers', 'minifySyntax', 'minifyWhitespace'] as const; -class ESBuildMinifyPlugin { - private readonly options: MinifyPluginOptions; - - private readonly transform: typeof defaultEsbuildTransform; - - constructor(options: MinifyPluginOptions = {}) { - const { implementation, ...remainingOptions } = options; - if (implementation && typeof implementation.transform !== 'function') { - throw new TypeError( - `ESBuildMinifyPlugin: implementation.transform must be an ESBuild transform function. Received ${typeof implementation.transform}`, - ); - } - - this.transform = implementation?.transform ?? defaultEsbuildTransform; - - this.options = remainingOptions; - - const hasGranularMinificationConfig = granularMinifyConfigs.some( - minifyConfig => minifyConfig in options, - ); - - if (!hasGranularMinificationConfig) { - this.options.minify = true; - } - } - - apply(compiler: Compiler): void { - const meta = JSON.stringify({ - name: 'esbuild-loader', - version, - options: this.options, - }); - - compiler.hooks.compilation.tap(pluginName, (compilation) => { - compilation.hooks.chunkHash.tap(pluginName, (_, hash) => hash.update(meta)); - - /** - * Check if sourcemaps are enabled - * Webpack 4: https://github.com/webpack/webpack/blob/v4.46.0/lib/SourceMapDevToolModuleOptionsPlugin.js#L20 - * Webpack 5: https://github.com/webpack/webpack/blob/v5.75.0/lib/SourceMapDevToolModuleOptionsPlugin.js#LL27 - */ - let useSourceMap = false; - compilation.hooks.finishModules.tap( - pluginName, - (modules) => { - const firstModule = ( - Array.isArray(modules) - ? modules[0] - : (modules as Set).values().next().value as webpack5.Module - ); - useSourceMap = firstModule.useSourceMap; - }, - ); - - if ('processAssets' in compilation.hooks) { - compilation.hooks.processAssets.tapPromise( - { - name: pluginName, - // @ts-expect-error undefined on Function type - stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, - additionalAssets: true, - }, - async () => await this.transformAssets(compilation, useSourceMap), - ); - - compilation.hooks.statsPrinter.tap(pluginName, (statsPrinter) => { - statsPrinter.hooks.print - .for('asset.info.minimized') - .tap( - pluginName, - ( - minimized, - { green, formatFlag }, - // @ts-expect-error type incorrectly doesn't accept undefined - ) => ( - minimized - // @ts-expect-error type incorrectly doesn't accept undefined - ? green(formatFlag('minimized')) - : undefined - ), - ); - }); - } else { - compilation.hooks.optimizeChunkAssets.tapPromise( - pluginName, - async () => await this.transformAssets(compilation, useSourceMap), - ); - } - }); - } - - private async transformAssets( - compilation: Compilation, - useSourceMap: boolean, - ): Promise { - const { compiler } = compilation; - const sources = 'webpack' in compiler && compiler.webpack.sources; - const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); - const RawSource = (sources ? sources.RawSource : WP4RawSource); - - const { - css: minifyCss, - include, - exclude, - ...transformOptions - } = this.options; - - const assets = (compilation.getAssets() as Asset[]).filter(asset => ( - - // Filter out already minimized - !asset.info.minimized - - // Filter out by file type - && ( - isJsFile.test(asset.name) - || (minifyCss && isCssFile.test(asset.name)) - ) - && matchObject({ include, exclude }, asset.name) - )); - - await Promise.all(assets.map(async (asset) => { - const assetIsCss = isCssFile.test(asset.name); - let source: string | Buffer | ArrayBuffer; - let map = null; - - if (asset.source.sourceAndMap) { - const sourceAndMap = asset.source.sourceAndMap(); - source = sourceAndMap.source; - map = sourceAndMap.map; - } else { - source = asset.source.source(); - if (asset.source.map) { - map = asset.source.map(); - } - } - - const sourceAsString = source.toString(); - const result = await this.transform(sourceAsString, { - ...transformOptions, - loader: ( - assetIsCss - ? 'css' - : transformOptions.loader - ), - sourcemap: useSourceMap, - sourcefile: asset.name, - }); - - if (result.legalComments) { - compilation.emitAsset( - `${asset.name}.LEGAL.txt`, - new RawSource(result.legalComments) as any, - ); - } - - compilation.updateAsset( - asset.name, - ( - result.map - ? new SourceMapSource( - result.code, - asset.name, - result.map as any, - sourceAsString, - map as any, - true, - ) - : new RawSource(result.code) - ) as any, - { - ...asset.info, - minimized: true, - }, - ); - })); - } -} - -export default ESBuildMinifyPlugin; diff --git a/src/plugin.ts b/src/plugin.ts index 62451588..2938e3d8 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,7 +1,201 @@ -class ESBuildPlugin { - apply() { - console.warn('[esbuild-loader] ESBuildPlugin is no longer required for usage and will be removed in the next major release. Please refer to the docs and release notes for more info.'); +import { transform as defaultEsbuildTransform } from 'esbuild'; +import { + RawSource as WP4RawSource, + SourceMapSource as WP4SourceMapSource, +} from 'webpack-sources'; +import webpack4 from 'webpack'; +import webpack5 from 'webpack5'; +import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; +import type { EsbuildPluginOptions } from './types'; + +type Compiler = webpack4.Compiler | webpack5.Compiler; +type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; +type Asset = webpack4.compilation.Asset | Readonly; + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { version } = require('../package.json'); + +const isJsFile = /\.[cm]?js(?:\?.*)?$/i; +const isCssFile = /\.css(?:\?.*)?$/i; +const pluginName = 'esbuild-minify'; + +const granularMinifyConfigs = ['minifyIdentifiers', 'minifySyntax', 'minifyWhitespace'] as const; +class EsbuildPlugin { + private readonly options: EsbuildPluginOptions; + + private readonly transform: typeof defaultEsbuildTransform; + + constructor(options: EsbuildPluginOptions = {}) { + const { implementation, ...remainingOptions } = options; + if (implementation && typeof implementation.transform !== 'function') { + throw new TypeError( + `[${EsbuildPlugin.name}] implementation.transform must be an esbuild transform function. Received ${typeof implementation.transform}`, + ); + } + + this.transform = implementation?.transform ?? defaultEsbuildTransform; + + this.options = remainingOptions; + + const hasGranularMinificationConfig = granularMinifyConfigs.some( + minifyConfig => minifyConfig in options, + ); + + if (!hasGranularMinificationConfig) { + this.options.minify = true; + } + } + + apply(compiler: Compiler): void { + const meta = JSON.stringify({ + name: 'esbuild-loader', + version, + options: this.options, + }); + + compiler.hooks.compilation.tap(pluginName, (compilation) => { + compilation.hooks.chunkHash.tap(pluginName, (_, hash) => hash.update(meta)); + + /** + * Check if sourcemaps are enabled + * Webpack 4: https://github.com/webpack/webpack/blob/v4.46.0/lib/SourceMapDevToolModuleOptionsPlugin.js#L20 + * Webpack 5: https://github.com/webpack/webpack/blob/v5.75.0/lib/SourceMapDevToolModuleOptionsPlugin.js#LL27 + */ + let useSourceMap = false; + compilation.hooks.finishModules.tap( + pluginName, + (modules) => { + const firstModule = ( + Array.isArray(modules) + ? modules[0] + : (modules as Set).values().next().value as webpack5.Module + ); + useSourceMap = firstModule.useSourceMap; + }, + ); + + if ('processAssets' in compilation.hooks) { + compilation.hooks.processAssets.tapPromise( + { + name: pluginName, + // @ts-expect-error undefined on Function type + stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, + additionalAssets: true, + }, + async () => await this.transformAssets(compilation, useSourceMap), + ); + + compilation.hooks.statsPrinter.tap(pluginName, (statsPrinter) => { + statsPrinter.hooks.print + .for('asset.info.minimized') + .tap( + pluginName, + ( + minimized, + { green, formatFlag }, + // @ts-expect-error type incorrectly doesn't accept undefined + ) => ( + minimized + // @ts-expect-error type incorrectly doesn't accept undefined + ? green(formatFlag('minimized')) + : undefined + ), + ); + }); + } else { + compilation.hooks.optimizeChunkAssets.tapPromise( + pluginName, + async () => await this.transformAssets(compilation, useSourceMap), + ); + } + }); + } + + private async transformAssets( + compilation: Compilation, + useSourceMap: boolean, + ): Promise { + const { compiler } = compilation; + const sources = 'webpack' in compiler && compiler.webpack.sources; + const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); + const RawSource = (sources ? sources.RawSource : WP4RawSource); + + const { + css: minifyCss, + include, + exclude, + ...transformOptions + } = this.options; + + const assets = (compilation.getAssets() as Asset[]).filter(asset => ( + + // Filter out already minimized + !asset.info.minimized + + // Filter out by file type + && ( + isJsFile.test(asset.name) + || (minifyCss && isCssFile.test(asset.name)) + ) + && matchObject({ include, exclude }, asset.name) + )); + + await Promise.all(assets.map(async (asset) => { + const assetIsCss = isCssFile.test(asset.name); + let source: string | Buffer | ArrayBuffer; + let map = null; + + if (asset.source.sourceAndMap) { + const sourceAndMap = asset.source.sourceAndMap(); + source = sourceAndMap.source; + map = sourceAndMap.map; + } else { + source = asset.source.source(); + if (asset.source.map) { + map = asset.source.map(); + } + } + + const sourceAsString = source.toString(); + const result = await this.transform(sourceAsString, { + ...transformOptions, + loader: ( + assetIsCss + ? 'css' + : transformOptions.loader + ), + sourcemap: useSourceMap, + sourcefile: asset.name, + }); + + if (result.legalComments) { + compilation.emitAsset( + `${asset.name}.LEGAL.txt`, + new RawSource(result.legalComments) as any, + ); + } + + compilation.updateAsset( + asset.name, + ( + result.map + ? new SourceMapSource( + result.code, + asset.name, + result.map as any, + sourceAsString, + map as any, + true, + ) + : new RawSource(result.code) + ) as any, + { + ...asset.info, + minimized: true, + }, + ); + })); } } -export default ESBuildPlugin; +export default EsbuildPlugin; diff --git a/src/types.ts b/src/types.ts index cdb280e4..01f19d0d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,7 +15,7 @@ export type LoaderOptions = Except implementation?: Implementation; }; -export type MinifyPluginOptions = Except & { +export type EsbuildPluginOptions = Except & { include?: Filter | Filter[]; exclude?: Filter | Filter[]; css?: boolean; diff --git a/tests/specs/loader.ts b/tests/specs/loader.ts index 43ef848f..34701f9c 100644 --- a/tests/specs/loader.ts +++ b/tests/specs/loader.ts @@ -7,7 +7,7 @@ import { configureCssLoader, } from '../utils'; import * as fixtures from '../fixtures.js'; -import type { MinifyPluginOptions } from '#esbuild-loader'; +import type { EsbuildPluginOptions } from '#esbuild-loader'; const { exportFile } = fixtures; @@ -144,7 +144,7 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac describe('implementation', ({ test }) => { test('error', async () => { const runWithImplementation = async ( - implementation: MinifyPluginOptions['implementation'], + implementation: EsbuildPluginOptions['implementation'], ) => { const built = await build( fixtures.blank, diff --git a/tests/specs/plugin.ts b/tests/specs/plugin.ts index 3d237df2..788fba68 100644 --- a/tests/specs/plugin.ts +++ b/tests/specs/plugin.ts @@ -8,7 +8,7 @@ import { configureMiniCssExtractPlugin, } from '../utils'; import * as fixtures from '../fixtures.js'; -import type { MinifyPluginOptions } from '#esbuild-loader'; +import type { EsbuildPluginOptions } from '#esbuild-loader'; const assertMinified = (code: string) => { expect(code).not.toMatch(/\s{2,}/); @@ -384,7 +384,7 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac describe('implementation', ({ test }) => { test('error', async () => { - const runWithImplementation = async (implementation: MinifyPluginOptions['implementation']) => { + const runWithImplementation = async (implementation: EsbuildPluginOptions['implementation']) => { await build( fixtures.blank, (config) => { @@ -400,14 +400,14 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac // @ts-expect-error testing invalid type runWithImplementation({}), ).rejects.toThrow( - 'ESBuildMinifyPlugin: implementation.transform must be an ESBuild transform function. Received undefined', + '[EsbuildPlugin] implementation.transform must be an esbuild transform function. Received undefined', ); await expect( // @ts-expect-error testing invalid type runWithImplementation({ transform: 123 }), ).rejects.toThrow( - 'ESBuildMinifyPlugin: implementation.transform must be an ESBuild transform function. Received number', + '[EsbuildPlugin] implementation.transform must be an esbuild transform function. Received number', ); }); diff --git a/tests/utils.ts b/tests/utils.ts index f25a83da..402468d6 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -1,7 +1,7 @@ import type webpack4 from 'webpack'; import type webpack5 from 'webpack5'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; -import { ESBuildMinifyPlugin, type MinifyPluginOptions } from '#esbuild-loader'; +import { EsbuildPlugin, type EsbuildPluginOptions } from '#esbuild-loader'; const esbuildLoaderPath = require.resolve('../src/'); @@ -28,12 +28,12 @@ export const configureEsbuildLoader = ( export const configureEsbuildMinifyPlugin = ( config: WebpackConfiguration, - options?: MinifyPluginOptions, + options?: EsbuildPluginOptions, ) => { config.optimization = { minimize: true, minimizer: [ - new ESBuildMinifyPlugin(options), + new EsbuildPlugin(options), ], }; }; From a9e8e7e1630ab11371f88f9349cad7ebbce57efc Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Thu, 19 Jan 2023 04:56:28 -0500 Subject: [PATCH 10/31] feat(plugin): default `format` to `iife` BREAKING CHANGE: Plugin default format is now `iife` when Webpack's target is `web` & esbuild's target is below `esnext` --- README.md | 13 ++++++++ src/plugin.ts | 36 ++++++++++++++++++--- tests/fixtures.ts | 4 +++ tests/specs/plugin.ts | 75 ++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 122 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 72e048c9..8ad5177b 100644 --- a/README.md +++ b/README.md @@ -311,6 +311,19 @@ Read more about it in the [esbuild docs](https://esbuild.github.io/api/#target). Here are some common configurations and custom options: +#### format +Type: `'iife' | 'cjs' | 'esm'` + +Default: + - `iife` if both of these conditions are met: + - Webpack's [`target`](https://webpack.js.org/configuration/target/) is set to `web` + - esbuild's [`target`](#target-1) is not `esnext` + - `undefined` (no format conversion) otherwise + +The default is `iife` when esbuild is configured to support a low target, because esbuild injects helper functions at the top of the code. On the web, having functions declared at the top of a script can pollute the global scope. In some cases, this can lead to a variable collision error. By setting `format: 'iife'`, esbuild wraps the helper functions in an [IIFE](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) to prevent them from polluting the global. + +Read more about it in the [esbuild docs](https://esbuild.github.io/api/#format). + #### minify Type: `boolean` diff --git a/src/plugin.ts b/src/plugin.ts index 2938e3d8..f2143383 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -26,7 +26,11 @@ class EsbuildPlugin { private readonly transform: typeof defaultEsbuildTransform; constructor(options: EsbuildPluginOptions = {}) { - const { implementation, ...remainingOptions } = options; + const { + implementation, + ...remainingOptions + } = options; + if (implementation && typeof implementation.transform !== 'function') { throw new TypeError( `[${EsbuildPlugin.name}] implementation.transform must be an esbuild transform function. Received ${typeof implementation.transform}`, @@ -35,24 +39,46 @@ class EsbuildPlugin { this.transform = implementation?.transform ?? defaultEsbuildTransform; - this.options = remainingOptions; - const hasGranularMinificationConfig = granularMinifyConfigs.some( minifyConfig => minifyConfig in options, ); if (!hasGranularMinificationConfig) { - this.options.minify = true; + remainingOptions.minify = true; } + + this.options = remainingOptions; } apply(compiler: Compiler): void { + const { options } = this; const meta = JSON.stringify({ name: 'esbuild-loader', version, - options: this.options, + options, }); + if (!('format' in options)) { + const { target } = compiler.options; + const isWebTarget = ( + Array.isArray(target) + ? target.includes('web') + : target === 'web' + ); + const wontGenerateHelpers = !options.target || ( + Array.isArray(options.target) + ? ( + options.target.length === 1 + && options.target[0] === 'esnext' + ) + : options.target === 'esnext' + ); + + if (isWebTarget && !wontGenerateHelpers) { + options.format = 'iife'; + } + } + compiler.hooks.compilation.tap(pluginName, (compilation) => { compilation.hooks.chunkHash.tap(pluginName, (_, hash) => hash.update(meta)); diff --git a/tests/fixtures.ts b/tests/fixtures.ts index 670e7b68..4414a80e 100644 --- a/tests/fixtures.ts +++ b/tests/fixtures.ts @@ -162,6 +162,10 @@ export const minification = { '/src/index.js': 'export default ( stringVal ) => { return stringVal }', }; +export const getHelpers = { + '/src/index.js': 'export default async () => {}', +}; + export const legalComments = { '/src/index.js': ` //! legal comment diff --git a/tests/specs/plugin.ts b/tests/specs/plugin.ts index 788fba68..4ea1ccd8 100644 --- a/tests/specs/plugin.ts +++ b/tests/specs/plugin.ts @@ -16,7 +16,11 @@ const assertMinified = (code: string) => { expect(code).not.toMatch('return '); }; +const countIife = (code: string) => Array.from(code.matchAll(/\(\(\)=>\{/g)).length; + export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpack5) => { + const isWebpack4 = webpack.version?.startsWith('4.'); + describe('Plugin', ({ test, describe }) => { describe('Minify JS', ({ test }) => { test('minify', async () => { @@ -528,7 +532,7 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac size: () => Buffer.byteLength(content), }); - const built = await build({ '/src/index.js': '' }, (config) => { + const built = await build(fixtures.blank, (config) => { configureEsbuildMinifyPlugin(config); config.plugins!.push({ @@ -559,5 +563,74 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac built.fs.readFileSync('/dist/test.js', 'utf8'), ).toBe('1+1;\n'); }); + + describe('minify targets', ({ test }) => { + test('no iife for node', async () => { + const built = await build( + fixtures.getHelpers, + (config) => { + configureEsbuildMinifyPlugin(config, { + target: 'es2015', + }); + + config.target = isWebpack4 ? 'node' : ['node']; + delete config.output?.libraryTarget; + delete config.output?.libraryExport; + }, + webpack, + ); + + expect(built.stats.hasWarnings()).toBe(false); + expect(built.stats.hasErrors()).toBe(false); + + const code = built.fs.readFileSync('/dist/index.js', 'utf8').toString(); + expect(code.startsWith('var ')).toBe(true); + }); + + test('no iife for web with high target (no helpers are added)', async () => { + const built = await build( + fixtures.getHelpers, + (config) => { + configureEsbuildMinifyPlugin(config); + + config.target = isWebpack4 ? 'web' : ['web']; + delete config.output?.libraryTarget; + delete config.output?.libraryExport; + }, + webpack, + ); + + expect(built.stats.hasWarnings()).toBe(false); + expect(built.stats.hasErrors()).toBe(false); + + const code = built.fs.readFileSync('/dist/index.js', 'utf8').toString(); + expect(code.startsWith('(()=>{var ')).toBe(false); + expect(countIife(code)).toBe(isWebpack4 ? 0 : 1); + }); + + test('iife for web & low target', async () => { + const built = await build( + fixtures.getHelpers, + (config) => { + configureEsbuildMinifyPlugin(config, { + target: 'es2015', + }); + + config.target = isWebpack4 ? 'web' : ['web']; + delete config.output?.libraryTarget; + delete config.output?.libraryExport; + }, + webpack, + ); + + expect(built.stats.hasWarnings()).toBe(false); + expect(built.stats.hasErrors()).toBe(false); + + const code = built.fs.readFileSync('/dist/index.js', 'utf8').toString(); + expect(code.startsWith('(()=>{var ')).toBe(true); + expect(code.endsWith('})();\n')).toBe(true); + expect(countIife(code)).toBe(isWebpack4 ? 1 : 2); + }); + }); }); }); From 0e6b8f12d40f1d565a8a8417acf42f52d81e50e1 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 20 Jan 2023 01:22:38 +0900 Subject: [PATCH 11/31] refactor: convert require to import --- src/plugin.ts | 4 +--- tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugin.ts b/src/plugin.ts index f2143383..b0e55f54 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -6,15 +6,13 @@ import { import webpack4 from 'webpack'; import webpack5 from 'webpack5'; import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; +import { version } from '../package.json'; import type { EsbuildPluginOptions } from './types'; type Compiler = webpack4.Compiler | webpack5.Compiler; type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; type Asset = webpack4.compilation.Asset | Readonly; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { version } = require('../package.json'); - const isJsFile = /\.[cm]?js(?:\?.*)?$/i; const isCssFile = /\.css(?:\?.*)?$/i; const pluginName = 'esbuild-minify'; diff --git a/tsconfig.json b/tsconfig.json index 51a3b94d..fecd870a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,6 +9,7 @@ "declaration": true, "strict": true, "esModuleInterop": true, - "skipLibCheck": true + "skipLibCheck": true, + "resolveJsonModule": true, }, } From 6ec4abfdf7e9c4a2610bfe788bac8c06ab09999e Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 20 Jan 2023 02:39:42 +0900 Subject: [PATCH 12/31] refactor(plugin): functional style --- src/plugin.ts | 377 +++++++++++++++++++++++++------------------------- 1 file changed, 191 insertions(+), 186 deletions(-) diff --git a/src/plugin.ts b/src/plugin.ts index b0e55f54..68c4f59b 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -12,214 +12,219 @@ import type { EsbuildPluginOptions } from './types'; type Compiler = webpack4.Compiler | webpack5.Compiler; type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; type Asset = webpack4.compilation.Asset | Readonly; +type EsbuildTransform = typeof defaultEsbuildTransform; const isJsFile = /\.[cm]?js(?:\?.*)?$/i; const isCssFile = /\.css(?:\?.*)?$/i; -const pluginName = 'esbuild-minify'; - -const granularMinifyConfigs = ['minifyIdentifiers', 'minifySyntax', 'minifyWhitespace'] as const; -class EsbuildPlugin { - private readonly options: EsbuildPluginOptions; - - private readonly transform: typeof defaultEsbuildTransform; +const pluginName = 'EsbuildPlugin'; + +const transformAssets = async ( + options: EsbuildPluginOptions, + transform: EsbuildTransform, + compilation: Compilation, + useSourceMap: boolean, +): Promise => { + const { compiler } = compilation; + const sources = 'webpack' in compiler && compiler.webpack.sources; + const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); + const RawSource = (sources ? sources.RawSource : WP4RawSource); + + const { + css: minifyCss, + include, + exclude, + ...transformOptions + } = options; + + const assets = (compilation.getAssets() as Asset[]).filter(asset => ( + + // Filter out already minimized + !asset.info.minimized + + // Filter out by file type + && ( + isJsFile.test(asset.name) + || (minifyCss && isCssFile.test(asset.name)) + ) + && matchObject( + { include, exclude }, + asset.name, + ) + )); + + await Promise.all(assets.map(async (asset) => { + const assetIsCss = isCssFile.test(asset.name); + let source: string | Buffer | ArrayBuffer; + let map = null; + + if (asset.source.sourceAndMap) { + const sourceAndMap = asset.source.sourceAndMap(); + source = sourceAndMap.source; + map = sourceAndMap.map; + } else { + source = asset.source.source(); + if (asset.source.map) { + map = asset.source.map(); + } + } - constructor(options: EsbuildPluginOptions = {}) { - const { - implementation, - ...remainingOptions - } = options; + const sourceAsString = source.toString(); + const result = await transform(sourceAsString, { + ...transformOptions, + loader: ( + assetIsCss + ? 'css' + : transformOptions.loader + ), + sourcemap: useSourceMap, + sourcefile: asset.name, + }); - if (implementation && typeof implementation.transform !== 'function') { - throw new TypeError( - `[${EsbuildPlugin.name}] implementation.transform must be an esbuild transform function. Received ${typeof implementation.transform}`, + if (result.legalComments) { + compilation.emitAsset( + `${asset.name}.LEGAL.txt`, + new RawSource(result.legalComments) as any, ); } - this.transform = implementation?.transform ?? defaultEsbuildTransform; - - const hasGranularMinificationConfig = granularMinifyConfigs.some( - minifyConfig => minifyConfig in options, + compilation.updateAsset( + asset.name, + ( + result.map + ? new SourceMapSource( + result.code, + asset.name, + result.map as any, + sourceAsString, + map as any, + true, + ) + : new RawSource(result.code) + ) as any, + { + ...asset.info, + minimized: true, + }, + ); + })); +}; + +export default function EsbuildPlugin( + { + implementation, + ...options + }: EsbuildPluginOptions = {}, +) { + if ( + implementation + && typeof implementation.transform !== 'function' + ) { + throw new TypeError( + `[${pluginName}] implementation.transform must be an esbuild transform function. Received ${typeof implementation.transform}`, ); + } - if (!hasGranularMinificationConfig) { - remainingOptions.minify = true; - } + const transform = implementation?.transform ?? defaultEsbuildTransform; - this.options = remainingOptions; - } + const hasGranularMinificationConfig = ( + 'minifyIdentifiers' in options + || 'minifySyntax' in options + || 'minifyWhitespace' in options + ); - apply(compiler: Compiler): void { - const { options } = this; - const meta = JSON.stringify({ - name: 'esbuild-loader', - version, - options, - }); + if (!hasGranularMinificationConfig) { + options.minify = true; + } - if (!('format' in options)) { - const { target } = compiler.options; - const isWebTarget = ( - Array.isArray(target) - ? target.includes('web') - : target === 'web' - ); - const wontGenerateHelpers = !options.target || ( - Array.isArray(options.target) - ? ( - options.target.length === 1 - && options.target[0] === 'esnext' - ) - : options.target === 'esnext' - ); + return { + apply(compiler: Compiler): void { + if (!('format' in options)) { + const { target } = compiler.options; + const isWebTarget = ( + Array.isArray(target) + ? target.includes('web') + : target === 'web' + ); + const wontGenerateHelpers = !options.target || ( + Array.isArray(options.target) + ? ( + options.target.length === 1 + && options.target[0] === 'esnext' + ) + : options.target === 'esnext' + ); - if (isWebTarget && !wontGenerateHelpers) { - options.format = 'iife'; + if (isWebTarget && !wontGenerateHelpers) { + options.format = 'iife'; + } } - } - compiler.hooks.compilation.tap(pluginName, (compilation) => { - compilation.hooks.chunkHash.tap(pluginName, (_, hash) => hash.update(meta)); - - /** - * Check if sourcemaps are enabled - * Webpack 4: https://github.com/webpack/webpack/blob/v4.46.0/lib/SourceMapDevToolModuleOptionsPlugin.js#L20 - * Webpack 5: https://github.com/webpack/webpack/blob/v5.75.0/lib/SourceMapDevToolModuleOptionsPlugin.js#LL27 - */ - let useSourceMap = false; - compilation.hooks.finishModules.tap( - pluginName, - (modules) => { - const firstModule = ( - Array.isArray(modules) - ? modules[0] - : (modules as Set).values().next().value as webpack5.Module - ); - useSourceMap = firstModule.useSourceMap; - }, - ); + compiler.hooks.compilation.tap(pluginName, (compilation) => { + const meta = JSON.stringify({ + name: 'esbuild-loader', + version, + options, + }); - if ('processAssets' in compilation.hooks) { - compilation.hooks.processAssets.tapPromise( - { - name: pluginName, - // @ts-expect-error undefined on Function type - stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, - additionalAssets: true, - }, - async () => await this.transformAssets(compilation, useSourceMap), + compilation.hooks.chunkHash.tap( + pluginName, + (_, hash) => hash.update(meta), ); - compilation.hooks.statsPrinter.tap(pluginName, (statsPrinter) => { - statsPrinter.hooks.print - .for('asset.info.minimized') - .tap( - pluginName, - ( - minimized, - { green, formatFlag }, - // @ts-expect-error type incorrectly doesn't accept undefined - ) => ( - minimized - // @ts-expect-error type incorrectly doesn't accept undefined - ? green(formatFlag('minimized')) - : undefined - ), - ); - }); - } else { - compilation.hooks.optimizeChunkAssets.tapPromise( + /** + * Check if sourcemaps are enabled + * Webpack 4: https://github.com/webpack/webpack/blob/v4.46.0/lib/SourceMapDevToolModuleOptionsPlugin.js#L20 + * Webpack 5: https://github.com/webpack/webpack/blob/v5.75.0/lib/SourceMapDevToolModuleOptionsPlugin.js#LL27 + */ + let useSourceMap = false; + compilation.hooks.finishModules.tap( pluginName, - async () => await this.transformAssets(compilation, useSourceMap), + (modules) => { + const firstModule = ( + Array.isArray(modules) + ? modules[0] + : (modules as Set).values().next().value as webpack5.Module + ); + useSourceMap = firstModule.useSourceMap; + }, ); - } - }); - } - private async transformAssets( - compilation: Compilation, - useSourceMap: boolean, - ): Promise { - const { compiler } = compilation; - const sources = 'webpack' in compiler && compiler.webpack.sources; - const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); - const RawSource = (sources ? sources.RawSource : WP4RawSource); - - const { - css: minifyCss, - include, - exclude, - ...transformOptions - } = this.options; - - const assets = (compilation.getAssets() as Asset[]).filter(asset => ( - - // Filter out already minimized - !asset.info.minimized - - // Filter out by file type - && ( - isJsFile.test(asset.name) - || (minifyCss && isCssFile.test(asset.name)) - ) - && matchObject({ include, exclude }, asset.name) - )); - - await Promise.all(assets.map(async (asset) => { - const assetIsCss = isCssFile.test(asset.name); - let source: string | Buffer | ArrayBuffer; - let map = null; - - if (asset.source.sourceAndMap) { - const sourceAndMap = asset.source.sourceAndMap(); - source = sourceAndMap.source; - map = sourceAndMap.map; - } else { - source = asset.source.source(); - if (asset.source.map) { - map = asset.source.map(); - } - } + // Webpack 5 + if ('processAssets' in compilation.hooks) { + compilation.hooks.processAssets.tapPromise( + { + name: pluginName, + // @ts-expect-error undefined on Function type + stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, + additionalAssets: true, + }, + () => transformAssets(options, transform, compilation, useSourceMap), + ); - const sourceAsString = source.toString(); - const result = await this.transform(sourceAsString, { - ...transformOptions, - loader: ( - assetIsCss - ? 'css' - : transformOptions.loader - ), - sourcemap: useSourceMap, - sourcefile: asset.name, + compilation.hooks.statsPrinter.tap(pluginName, (statsPrinter) => { + statsPrinter.hooks.print + .for('asset.info.minimized') + .tap( + pluginName, + ( + minimized, + { green, formatFlag }, + // @ts-expect-error type incorrectly doesn't accept undefined + ) => ( + minimized + // @ts-expect-error type incorrectly doesn't accept undefined + ? green(formatFlag('minimized')) + : undefined + ), + ); + }); + } else { + compilation.hooks.optimizeChunkAssets.tapPromise( + pluginName, + () => transformAssets(options, transform, compilation, useSourceMap), + ); + } }); - - if (result.legalComments) { - compilation.emitAsset( - `${asset.name}.LEGAL.txt`, - new RawSource(result.legalComments) as any, - ); - } - - compilation.updateAsset( - asset.name, - ( - result.map - ? new SourceMapSource( - result.code, - asset.name, - result.map as any, - sourceAsString, - map as any, - true, - ) - : new RawSource(result.code) - ) as any, - { - ...asset.info, - minimized: true, - }, - ); - })); - } + }, + }; } - -export default EsbuildPlugin; From ca024be347707a8e41d1e30b6ab87cdb09e5ba43 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 1 Feb 2023 09:43:31 +0900 Subject: [PATCH 13/31] chore(tsconfig): remove declaration option --- tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index fecd870a..813c925f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,6 @@ "target": "ES2018", "lib": ["ES2018"], - "declaration": true, "strict": true, "esModuleInterop": true, "skipLibCheck": true, From 7664f892b53d90987d9cf183f87ba557d6a155a6 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 1 Feb 2023 09:47:50 +0900 Subject: [PATCH 14/31] test: use webpack 5 source --- tests/specs/webpack5.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/specs/webpack5.ts b/tests/specs/webpack5.ts index 22e5c93d..203124e8 100644 --- a/tests/specs/webpack5.ts +++ b/tests/specs/webpack5.ts @@ -1,9 +1,10 @@ import { testSuite, expect } from 'manten'; import { build } from 'webpack-test-utils'; import webpack5 from 'webpack5'; -import { RawSource } from 'webpack-sources'; import { configureEsbuildMinifyPlugin } from '../utils'; +const { RawSource } = webpack5.sources; + export default testSuite(({ describe }) => { describe('Webpack 5', ({ test }) => { test('Stats', async () => { From 4c59b020d2b3d9e9e05bbe8305f6975720886cd7 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 1 Feb 2023 09:51:38 +0900 Subject: [PATCH 15/31] test: cast webpack 5 source --- tests/specs/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/specs/plugin.ts b/tests/specs/plugin.ts index 4ea1ccd8..d7a2763b 100644 --- a/tests/specs/plugin.ts +++ b/tests/specs/plugin.ts @@ -530,7 +530,7 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac const createSource = (content: string) => ({ source: () => content, size: () => Buffer.byteLength(content), - }); + }) as webpack5.sources.Source; const built = await build(fixtures.blank, (config) => { configureEsbuildMinifyPlugin(config); From b1e938b4c836e07b30a0936aa9569aaba3023d0a Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 1 Feb 2023 09:56:34 +0900 Subject: [PATCH 16/31] test: fix mini-css-extract-plugin types --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++++---------- tests/utils.ts | 2 ++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 4a2549cc..dfc3c19a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "devDependencies": { "@pvtnbr/eslint-config": "^0.33.0", "@types/loader-utils": "^2.0.3", - "@types/mini-css-extract-plugin": "^2.5.1", + "@types/mini-css-extract-plugin": "2.4.0", "@types/node": "^18.11.18", "@types/webpack": "^4.41.33", "@types/webpack-sources": "^0.1.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2818667..421a1e0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,7 +3,7 @@ lockfileVersion: 5.4 specifiers: '@pvtnbr/eslint-config': ^0.33.0 '@types/loader-utils': ^2.0.3 - '@types/mini-css-extract-plugin': ^2.5.1 + '@types/mini-css-extract-plugin': 2.4.0 '@types/node': ^18.11.18 '@types/webpack': ^4.41.33 '@types/webpack-sources': ^0.1.9 @@ -37,7 +37,7 @@ dependencies: devDependencies: '@pvtnbr/eslint-config': 0.33.0_iukboom6ndih5an6iafl45j2fe '@types/loader-utils': 2.0.3 - '@types/mini-css-extract-plugin': 2.5.1_webpack@4.46.0 + '@types/mini-css-extract-plugin': 2.4.0_esbuild@0.16.17 '@types/node': 18.11.18 '@types/webpack': 4.41.33 '@types/webpack-sources': 0.1.9 @@ -628,13 +628,17 @@ packages: '@types/unist': 2.0.6 dev: true - /@types/mini-css-extract-plugin/2.5.1_webpack@4.46.0: - resolution: {integrity: sha512-evjjtJttaUexgg3au9ZJFy76tV9mySwX3a4Jl82BuormBYluWLRt0xk2urWrhOdPgDWzulRFyotwYOJTmkSgKw==} - deprecated: This is a stub types definition. mini-css-extract-plugin provides its own type definitions, so you do not need this installed. + /@types/mini-css-extract-plugin/2.4.0_esbuild@0.16.17: + resolution: {integrity: sha512-1Pq4i+2+c8jncxfX5k7BzPIEoyrq+n7L319zMxiLUH4RlWTGcQJjemtMftLQnoTt21oHhZE0PjXd2W1xM1m4Hg==} dependencies: - mini-css-extract-plugin: 1.6.2_webpack@4.46.0 + '@types/node': 18.11.18 + tapable: 2.2.1 + webpack: 5.75.0_esbuild@0.16.17 transitivePeerDependencies: - - webpack + - '@swc/core' + - esbuild + - uglify-js + - webpack-cli dev: true /@types/node/18.11.18: @@ -5414,7 +5418,7 @@ packages: worker-farm: 1.7.0 dev: true - /terser-webpack-plugin/5.3.6_h5vyqageqm634ioygmnxx6wkla: + /terser-webpack-plugin/5.3.6_htvmhiqynazf46fjrszipnqp7a: resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -5436,7 +5440,7 @@ packages: schema-utils: 3.1.1 serialize-javascript: 6.0.0 terser: 5.16.1 - webpack: 4.46.0 + webpack: 5.75.0_esbuild@0.16.17 dev: true /terser/4.8.1: @@ -5863,7 +5867,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 - terser-webpack-plugin: 5.3.6_h5vyqageqm634ioygmnxx6wkla + terser-webpack-plugin: 5.3.6_htvmhiqynazf46fjrszipnqp7a watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: diff --git a/tests/utils.ts b/tests/utils.ts index 402468d6..6ef669c1 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -56,5 +56,7 @@ export const configureMiniCssExtractPlugin = ( ) => { const cssRule = configureCssLoader(config); cssRule.use.unshift(MiniCssExtractPlugin.loader); + + // @ts-expect-error Forcing it to Webpack 5 config.plugins!.push(new MiniCssExtractPlugin()); }; From c4c4eb6f6912c24bf008f39e2f9434435c95b9cd Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 1 Feb 2023 09:57:25 +0900 Subject: [PATCH 17/31] ci: type check --- .github/workflows/test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0da1631f..4fe65a03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,12 @@ jobs: version: 7 run_install: true + - name: Lint + run: pnpm lint + + - name: Type check + run: pnpm type-check + - name: Build run: pnpm build @@ -34,6 +40,3 @@ jobs: - name: Test Node.js v16 run: pnpm --use-node-version=16.19.0 test - - - name: Lint - run: pnpm lint From c6bb06e14866baef882d6bf9a2d247839279d7de Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Tue, 31 Jan 2023 20:21:06 -0500 Subject: [PATCH 18/31] feat: enhanced tsconfig loading behavior (#309) --- package.json | 7 +- pnpm-lock.yaml | 277 ++++++++++++++++++++++++++++++++++++---- src/index.d.ts | 4 +- src/index.ts | 4 +- src/loader.ts | 33 +---- src/plugin.ts | 11 +- src/tsconfig.ts | 6 + tests/index.ts | 1 + tests/specs/loader.ts | 2 +- tests/specs/plugin.ts | 2 +- tests/specs/tsconfig.ts | 95 ++++++++++++++ tests/specs/webpack5.ts | 2 +- tests/utils.ts | 16 ++- 13 files changed, 389 insertions(+), 71 deletions(-) create mode 100644 src/tsconfig.ts create mode 100644 tests/specs/tsconfig.ts diff --git a/package.json b/package.json index dfc3c19a..72809bec 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "name": "Hiroki Osame", "email": "hiroki.osame@gmail.com" }, + "type": "module", "files": [ "dist" ], @@ -48,8 +49,7 @@ }, "dependencies": { "esbuild": "^0.16.17", - "joycon": "^3.0.1", - "json5": "^2.2.0", + "get-tsconfig": "^4.3.0", "loader-utils": "^2.0.0", "tapable": "^2.2.0", "webpack-sources": "^1.4.3" @@ -64,6 +64,8 @@ "clean-pkg-json": "^1.2.0", "css-loader": "^5.2.7", "eslint": "^8.31.0", + "execa": "^6.1.0", + "fs-fixture": "^1.2.0", "manten": "^0.6.0", "memfs": "^3.4.13", "mini-css-extract-plugin": "^1.6.2", @@ -71,6 +73,7 @@ "tsx": "^3.12.2", "typescript": "^4.9.4", "webpack": "^4.44.2", + "webpack-cli": "^4.10.0", "webpack-test-utils": "^2.1.0", "webpack5": "npm:webpack@^5.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 421a1e0a..6d59372b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,9 @@ specifiers: css-loader: ^5.2.7 esbuild: ^0.16.17 eslint: ^8.31.0 - joycon: ^3.0.1 - json5: ^2.2.0 + execa: ^6.1.0 + fs-fixture: ^1.2.0 + get-tsconfig: ^4.3.0 loader-utils: ^2.0.0 manten: ^0.6.0 memfs: ^3.4.13 @@ -22,14 +23,14 @@ specifiers: tsx: ^3.12.2 typescript: ^4.9.4 webpack: ^4.44.2 + webpack-cli: ^4.10.0 webpack-sources: ^1.4.3 webpack-test-utils: ^2.1.0 webpack5: npm:webpack@^5.0.0 dependencies: esbuild: 0.16.17 - joycon: 3.0.1 - json5: 2.2.0 + get-tsconfig: 4.3.0 loader-utils: 2.0.0 tapable: 2.2.0 webpack-sources: 1.4.3 @@ -37,22 +38,25 @@ dependencies: devDependencies: '@pvtnbr/eslint-config': 0.33.0_iukboom6ndih5an6iafl45j2fe '@types/loader-utils': 2.0.3 - '@types/mini-css-extract-plugin': 2.4.0_esbuild@0.16.17 + '@types/mini-css-extract-plugin': 2.4.0_frt44zp6b6ywsvanisas3d33qe '@types/node': 18.11.18 '@types/webpack': 4.41.33 '@types/webpack-sources': 0.1.9 clean-pkg-json: 1.2.0 css-loader: 5.2.7_webpack@4.46.0 eslint: 8.31.0 + execa: 6.1.0 + fs-fixture: 1.2.0 manten: 0.6.0 memfs: 3.4.13 mini-css-extract-plugin: 1.6.2_webpack@4.46.0 pkgroll: 1.8.0_typescript@4.9.4 tsx: 3.12.2 typescript: 4.9.4 - webpack: 4.46.0 + webpack: 4.46.0_webpack-cli@4.10.0 + webpack-cli: 4.10.0_webpack@4.46.0 webpack-test-utils: 2.1.0_webpack@4.46.0 - webpack5: /webpack/5.75.0_esbuild@0.16.17 + webpack5: /webpack/5.75.0_frt44zp6b6ywsvanisas3d33qe packages: @@ -98,6 +102,11 @@ packages: js-tokens: 4.0.0 dev: true + /@discoveryjs/json-ext/0.5.7: + resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} + engines: {node: '>=10.0.0'} + dev: true + /@esbuild-kit/cjs-loader/2.4.1: resolution: {integrity: sha512-lhc/XLith28QdW0HpHZvZKkorWgmCNT7sVelMHDj3HFdTfdqkwEKvT+aXVQtNAmCC39VJhunDkWhONWB7335mg==} dependencies: @@ -628,12 +637,12 @@ packages: '@types/unist': 2.0.6 dev: true - /@types/mini-css-extract-plugin/2.4.0_esbuild@0.16.17: + /@types/mini-css-extract-plugin/2.4.0_frt44zp6b6ywsvanisas3d33qe: resolution: {integrity: sha512-1Pq4i+2+c8jncxfX5k7BzPIEoyrq+n7L319zMxiLUH4RlWTGcQJjemtMftLQnoTt21oHhZE0PjXd2W1xM1m4Hg==} dependencies: '@types/node': 18.11.18 tapable: 2.2.1 - webpack: 5.75.0_esbuild@0.16.17 + webpack: 5.75.0_frt44zp6b6ywsvanisas3d33qe transitivePeerDependencies: - '@swc/core' - esbuild @@ -1080,6 +1089,37 @@ packages: '@xtuc/long': 4.2.2 dev: true + /@webpack-cli/configtest/1.2.0_dfxgqfcw6epibhmjfd2ethbqbi: + resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==} + peerDependencies: + webpack: 4.x.x || 5.x.x + webpack-cli: 4.x.x + dependencies: + webpack: 4.46.0_webpack-cli@4.10.0 + webpack-cli: 4.10.0_webpack@4.46.0 + dev: true + + /@webpack-cli/info/1.5.0_webpack-cli@4.10.0: + resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} + peerDependencies: + webpack-cli: 4.x.x + dependencies: + envinfo: 7.8.1 + webpack-cli: 4.10.0_webpack@4.46.0 + dev: true + + /@webpack-cli/serve/1.7.0_webpack-cli@4.10.0: + resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} + peerDependencies: + webpack-cli: 4.x.x + webpack-dev-server: '*' + peerDependenciesMeta: + webpack-dev-server: + optional: true + dependencies: + webpack-cli: 4.10.0_webpack@4.46.0 + dev: true + /@xtuc/ieee754/1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} dev: true @@ -1646,6 +1686,15 @@ packages: escape-string-regexp: 1.0.5 dev: true + /clone-deep/4.0.1: + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} + dependencies: + is-plain-object: 2.0.4 + kind-of: 6.0.3 + shallow-clone: 3.0.1 + dev: true + /collection-visit/1.0.0: resolution: {integrity: sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=} engines: {node: '>=0.10.0'} @@ -1679,10 +1728,19 @@ packages: resolution: {integrity: sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==} dev: true + /colorette/2.0.19: + resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} + dev: true + /commander/2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true + /commander/7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + dev: true + /comment-parser/1.3.1: resolution: {integrity: sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==} engines: {node: '>= 12.0.0'} @@ -1811,7 +1869,7 @@ packages: postcss-value-parser: 4.1.0 schema-utils: 3.1.1 semver: 7.3.8 - webpack: 4.46.0 + webpack: 4.46.0_webpack-cli@4.10.0 dev: true /cssesc/3.0.0: @@ -2005,6 +2063,12 @@ packages: tapable: 2.2.1 dev: true + /envinfo/7.8.1: + resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} + engines: {node: '>=4'} + hasBin: true + dev: true + /errno/0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} hasBin: true @@ -2770,6 +2834,21 @@ packages: safe-buffer: 5.2.1 dev: true + /execa/6.1.0: + resolution: {integrity: sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 3.0.1 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.1.0 + onetime: 6.0.0 + signal-exit: 3.0.7 + strip-final-newline: 3.0.0 + dev: true + /expand-brackets/2.1.4: resolution: {integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI=} engines: {node: '>=0.10.0'} @@ -2850,6 +2929,11 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fastest-levenshtein/1.0.16: + resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} + engines: {node: '>= 4.9.1'} + dev: true + /fastq/1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -2965,6 +3049,11 @@ packages: readable-stream: 2.3.7 dev: true + /fs-fixture/1.2.0: + resolution: {integrity: sha512-bPBNW12US81zxCXzP/BQ6ntSvMXNgX76nHVUxzQJVTmHkzXnbfp+M4mNWeJ9LuCG8M1wyeFov7oiwO9wnCEBjQ==} + engines: {node: '>=16.7.0'} + dev: true + /fs-monkey/1.0.3: resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==} dev: true @@ -3037,6 +3126,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /get-stream/6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + dev: true + /get-symbol-description/1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} @@ -3047,7 +3141,6 @@ packages: /get-tsconfig/4.3.0: resolution: {integrity: sha512-YCcF28IqSay3fqpIu5y3Krg/utCBHBeoflkZyHj/QcqI2nrLPC3ZegS9CmIo+hJb8K7aiGsuUl7PwWVjNG2HQQ==} - dev: true /get-value/2.0.6: resolution: {integrity: sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=} @@ -3268,6 +3361,11 @@ packages: resolution: {integrity: sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=} dev: true + /human-signals/3.0.1: + resolution: {integrity: sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==} + engines: {node: '>=12.20.0'} + dev: true + /icss-utils/5.1.0_postcss@8.3.6: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} @@ -3298,6 +3396,15 @@ packages: resolve-from: 4.0.0 dev: true + /import-local/3.1.0: + resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} + engines: {node: '>=8'} + hasBin: true + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + dev: true + /imurmurhash/0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -3340,6 +3447,11 @@ packages: side-channel: 1.0.4 dev: true + /interpret/2.2.0: + resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==} + engines: {node: '>= 0.10'} + dev: true + /is-accessor-descriptor/0.1.6: resolution: {integrity: sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=} engines: {node: '>=0.10.0'} @@ -3601,6 +3713,11 @@ packages: call-bind: 1.0.2 dev: true + /is-stream/3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /is-string/1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -3658,7 +3775,7 @@ packages: dev: true /isobject/2.1.0: - resolution: {integrity: sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=} + resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} engines: {node: '>=0.10.0'} dependencies: isarray: 1.0.0 @@ -3730,11 +3847,6 @@ packages: supports-color: 8.1.1 dev: true - /joycon/3.0.1: - resolution: {integrity: sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==} - engines: {node: '>=10'} - dev: false - /js-sdsl/4.2.0: resolution: {integrity: sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==} dev: true @@ -3810,14 +3922,14 @@ packages: dev: true /kind-of/3.2.2: - resolution: {integrity: sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=} + resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} engines: {node: '>=0.10.0'} dependencies: is-buffer: 1.1.6 dev: true /kind-of/4.0.0: - resolution: {integrity: sha1-IIE989cSkosgc3hpGkUGb65y3Vc=} + resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} engines: {node: '>=0.10.0'} dependencies: is-buffer: 1.1.6 @@ -4079,6 +4191,11 @@ packages: mime-db: 1.52.0 dev: true + /mimic-fn/4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + /min-indent/1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -4092,7 +4209,7 @@ packages: dependencies: loader-utils: 2.0.0 schema-utils: 3.1.1 - webpack: 4.46.0 + webpack: 4.46.0_webpack-cli@4.10.0 webpack-sources: 1.4.3 dev: true @@ -4267,6 +4384,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /npm-run-path/5.1.0: + resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true + /nth-check/2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: @@ -4365,6 +4489,13 @@ packages: wrappy: 1.0.2 dev: true + /onetime/6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true + /open/8.4.0: resolution: {integrity: sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==} engines: {node: '>=12'} @@ -4514,6 +4645,11 @@ packages: engines: {node: '>=8'} dev: true + /path-key/4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + /path-parse/1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true @@ -4560,6 +4696,13 @@ packages: find-up: 3.0.0 dev: true + /pkg-dir/4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + dev: true + /pkgroll/1.8.0_typescript@4.9.4: resolution: {integrity: sha512-udmzTqrlFcUxHG+KU+bYZqb1Z/2LFFRGwLg4EuOCe6t52dIFJYrWE7iAqY3/sU9EmwDQqIVoLbxX5NKj1d1h6Q==} hasBin: true @@ -4847,6 +4990,13 @@ packages: dev: true optional: true + /rechoir/0.7.1: + resolution: {integrity: sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==} + engines: {node: '>= 0.10'} + dependencies: + resolve: 1.22.1 + dev: true + /refa/0.9.1: resolution: {integrity: sha512-egU8LgFq2VXlAfUi8Jcbr5X38wEOadMFf8tCbshgcpVCYlE7k84pJOSlnvXF+muDB4igkdVMq7Z/kiNPqDT9TA==} dependencies: @@ -4909,11 +5059,23 @@ packages: engines: {node: '>=0.10'} 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/4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: true + /resolve-from/5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + /resolve-url/0.2.1: resolution: {integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=} deprecated: https://github.com/lydell/resolve-url#deprecated @@ -5098,6 +5260,13 @@ packages: safe-buffer: 5.2.1 dev: true + /shallow-clone/3.0.1: + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} + dependencies: + kind-of: 6.0.3 + dev: true + /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5118,6 +5287,10 @@ packages: object-inspect: 1.12.2 dev: true + /signal-exit/3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -5339,6 +5512,11 @@ packages: engines: {node: '>=4'} dev: true + /strip-final-newline/3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + /strip-indent/3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -5413,7 +5591,7 @@ packages: serialize-javascript: 4.0.0 source-map: 0.6.1 terser: 4.8.1 - webpack: 4.46.0 + webpack: 4.46.0_webpack-cli@4.10.0 webpack-sources: 1.4.3 worker-farm: 1.7.0 dev: true @@ -5440,7 +5618,7 @@ packages: schema-utils: 3.1.1 serialize-javascript: 6.0.0 terser: 5.16.1 - webpack: 5.75.0_esbuild@0.16.17 + webpack: 5.75.0_frt44zp6b6ywsvanisas3d33qe dev: true /terser/4.8.1: @@ -5774,6 +5952,49 @@ packages: graceful-fs: 4.2.10 dev: true + /webpack-cli/4.10.0_webpack@4.46.0: + resolution: {integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + '@webpack-cli/generators': '*' + '@webpack-cli/migrate': '*' + webpack: 4.x.x || 5.x.x + webpack-bundle-analyzer: '*' + webpack-dev-server: '*' + peerDependenciesMeta: + '@webpack-cli/generators': + optional: true + '@webpack-cli/migrate': + optional: true + webpack-bundle-analyzer: + optional: true + webpack-dev-server: + optional: true + dependencies: + '@discoveryjs/json-ext': 0.5.7 + '@webpack-cli/configtest': 1.2.0_dfxgqfcw6epibhmjfd2ethbqbi + '@webpack-cli/info': 1.5.0_webpack-cli@4.10.0 + '@webpack-cli/serve': 1.7.0_webpack-cli@4.10.0 + colorette: 2.0.19 + commander: 7.2.0 + cross-spawn: 7.0.3 + fastest-levenshtein: 1.0.16 + import-local: 3.1.0 + interpret: 2.2.0 + rechoir: 0.7.1 + webpack: 4.46.0_webpack-cli@4.10.0 + webpack-merge: 5.8.0 + dev: true + + /webpack-merge/5.8.0: + resolution: {integrity: sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==} + engines: {node: '>=10.0.0'} + dependencies: + clone-deep: 4.0.1 + wildcard: 2.0.0 + dev: true + /webpack-sources/1.4.3: resolution: {integrity: sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==} dependencies: @@ -5793,10 +6014,10 @@ packages: fs-require: 1.6.0 memfs: 3.4.13 unionfs: 4.4.0 - webpack: 4.46.0 + webpack: 4.46.0_webpack-cli@4.10.0 dev: true - /webpack/4.46.0: + /webpack/4.46.0_webpack-cli@4.10.0: resolution: {integrity: sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==} engines: {node: '>=6.11.5'} hasBin: true @@ -5831,12 +6052,13 @@ packages: tapable: 1.1.3 terser-webpack-plugin: 1.4.5_webpack@4.46.0 watchpack: 1.7.5 + webpack-cli: 4.10.0_webpack@4.46.0 webpack-sources: 1.4.3 transitivePeerDependencies: - supports-color dev: true - /webpack/5.75.0_esbuild@0.16.17: + /webpack/5.75.0_frt44zp6b6ywsvanisas3d33qe: resolution: {integrity: sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -5869,6 +6091,7 @@ packages: tapable: 2.2.1 terser-webpack-plugin: 5.3.6_htvmhiqynazf46fjrszipnqp7a watchpack: 2.4.0 + webpack-cli: 4.10.0_webpack@4.46.0 webpack-sources: 3.2.3 transitivePeerDependencies: - '@swc/core' @@ -5906,6 +6129,10 @@ packages: isexe: 2.0.0 dev: true + /wildcard/2.0.0: + resolution: {integrity: sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==} + dev: true + /word-wrap/1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} diff --git a/src/index.d.ts b/src/index.d.ts index 0c54efd4..aa68f7c7 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,4 +1,4 @@ -import { EsbuildPluginOptions } from './types'; +import { EsbuildPluginOptions } from './types.js'; export class EsbuildPlugin { constructor(options?: EsbuildPluginOptions); @@ -6,4 +6,4 @@ export class EsbuildPlugin { apply(compiler: any): void; } -export * from './types'; +export * from './types.js'; diff --git a/src/index.ts b/src/index.ts index b99db316..64e2534f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ -import esbuildLoader from './loader'; -import EsbuildPlugin from './plugin'; +import esbuildLoader from './loader.js'; +import EsbuildPlugin from './plugin.js'; export default esbuildLoader; export { EsbuildPlugin }; diff --git a/src/loader.ts b/src/loader.ts index c7bec522..a50fbba3 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -1,29 +1,8 @@ -import fs from 'fs'; -import path from 'path'; import { transform as defaultEsbuildTransform } from 'esbuild'; import { getOptions } from 'loader-utils'; import webpack from 'webpack'; -import JoyCon, { LoadResult } from 'joycon'; -import JSON5 from 'json5'; -import type { LoaderOptions } from './types'; - -const joycon = new JoyCon(); - -joycon.addLoader({ - test: /\.json$/, - async load(filePath) { - try { - const config = fs.readFileSync(filePath, 'utf8'); - return JSON5.parse(config); - } catch (error: any) { - throw new Error( - `Failed to parse tsconfig at ${path.relative(process.cwd(), filePath)}: ${error.message as string}`, - ); - } - }, -}); - -let tsConfig: LoadResult; +import type { LoaderOptions } from './types.js'; +import { tsconfig } from './tsconfig.js'; async function ESBuildLoader( this: webpack.loader.LoaderContext, @@ -56,13 +35,7 @@ async function ESBuildLoader( }; if (!('tsconfigRaw' in transformOptions)) { - if (!tsConfig) { - tsConfig = await joycon.load(['tsconfig.json']); - } - - if (tsConfig.data) { - transformOptions.tsconfigRaw = tsConfig.data; - } + transformOptions.tsconfigRaw = tsconfig; } try { diff --git a/src/plugin.ts b/src/plugin.ts index 68c4f59b..cc10beae 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -7,7 +7,8 @@ import webpack4 from 'webpack'; import webpack5 from 'webpack5'; import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; import { version } from '../package.json'; -import type { EsbuildPluginOptions } from './types'; +import type { EsbuildPluginOptions } from './types.js'; +import { tsconfig } from './tsconfig.js'; type Compiler = webpack4.Compiler | webpack5.Compiler; type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; @@ -23,7 +24,7 @@ const transformAssets = async ( transform: EsbuildTransform, compilation: Compilation, useSourceMap: boolean, -): Promise => { +) => { const { compiler } = compilation; const sources = 'webpack' in compiler && compiler.webpack.sources; const SourceMapSource = (sources ? sources.SourceMapSource : WP4SourceMapSource); @@ -136,8 +137,12 @@ export default function EsbuildPlugin( options.minify = true; } + if (!('tsconfigRaw' in options)) { + options.tsconfigRaw = tsconfig; + } + return { - apply(compiler: Compiler): void { + apply(compiler: Compiler) { if (!('format' in options)) { const { target } = compiler.options; const isWebTarget = ( diff --git a/src/tsconfig.ts b/src/tsconfig.ts new file mode 100644 index 00000000..027f4327 --- /dev/null +++ b/src/tsconfig.ts @@ -0,0 +1,6 @@ +import { getTsconfig } from 'get-tsconfig'; +import type { TransformOptions } from 'esbuild'; + +const foundTsconfig = getTsconfig(); + +export const tsconfig = foundTsconfig?.config as (TransformOptions['tsconfigRaw'] | undefined); diff --git a/tests/index.ts b/tests/index.ts index dd6d8b3b..aa61f54e 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -15,5 +15,6 @@ describe('esbuild-loader', ({ describe, runTestSuite }) => { }); } + runTestSuite(import('./specs/tsconfig.js')); runTestSuite(import('./specs/webpack5.js')); }); diff --git a/tests/specs/loader.ts b/tests/specs/loader.ts index 34701f9c..1a2bccd0 100644 --- a/tests/specs/loader.ts +++ b/tests/specs/loader.ts @@ -5,7 +5,7 @@ import webpack5 from 'webpack5'; import { configureEsbuildLoader, configureCssLoader, -} from '../utils'; +} from '../utils.js'; import * as fixtures from '../fixtures.js'; import type { EsbuildPluginOptions } from '#esbuild-loader'; diff --git a/tests/specs/plugin.ts b/tests/specs/plugin.ts index d7a2763b..1e188513 100644 --- a/tests/specs/plugin.ts +++ b/tests/specs/plugin.ts @@ -6,7 +6,7 @@ import * as esbuild from 'esbuild'; import { configureEsbuildMinifyPlugin, configureMiniCssExtractPlugin, -} from '../utils'; +} from '../utils.js'; import * as fixtures from '../fixtures.js'; import type { EsbuildPluginOptions } from '#esbuild-loader'; diff --git a/tests/specs/tsconfig.ts b/tests/specs/tsconfig.ts new file mode 100644 index 00000000..e2ac4afb --- /dev/null +++ b/tests/specs/tsconfig.ts @@ -0,0 +1,95 @@ +import path from 'path'; +import { testSuite, expect } from 'manten'; +import { createFixture } from 'fs-fixture'; +import { execa } from 'execa'; + +const webpackCli = path.resolve('node_modules/webpack-cli/bin/cli.js'); +const esbuildLoader = path.resolve('dist/index.cjs'); + +export default testSuite(({ describe }) => { + describe('tsconfig', ({ describe }) => { + describe('loader', ({ test }) => { + test('finds tsconfig.json and applies strict mode', async () => { + const fixture = await createFixture({ + src: { + 'index.ts': 'console.log(1)', + }, + 'webpack.config.js': ` + module.exports = { + mode: 'production', + + optimization: { + minimize: false, + }, + + resolveLoader: { + alias: { + 'esbuild-loader': ${JSON.stringify(esbuildLoader)}, + }, + }, + + module: { + rules: [{ + test: /\\.ts$/, + loader: 'esbuild-loader', + }], + }, + + entry: './src/index.ts', + }; + `, + 'tsconfig.json': JSON.stringify({ + compilerOptions: { + strict: true, + }, + }), + }); + + await execa(webpackCli, { + cwd: fixture.path, + }); + + const code = await fixture.readFile('dist/main.js', 'utf8'); + expect(code).toMatch('use strict'); + + await fixture.rm(); + }); + }); + + describe('plugin', ({ test }) => { + test('finds tsconfig.json and applies strict mode', async () => { + const fixture = await createFixture({ + src: { + 'index.js': 'console.log(1)', + }, + 'webpack.config.js': ` + const { EsbuildPlugin } = require(${JSON.stringify(esbuildLoader)}); + module.exports = { + mode: 'production', + optimization: { + minimizer: [ + new EsbuildPlugin(), + ], + }, + entry: './src/index.js', + }; + `, + 'tsconfig.json': JSON.stringify({ + compilerOptions: { + strict: true, + }, + }), + }); + + await execa(webpackCli, { + cwd: fixture.path, + }); + + const code = await fixture.readFile('dist/main.js', 'utf8'); + expect(code).toMatch('use strict'); + + await fixture.rm(); + }); + }); + }); +}); diff --git a/tests/specs/webpack5.ts b/tests/specs/webpack5.ts index 203124e8..f99c1eed 100644 --- a/tests/specs/webpack5.ts +++ b/tests/specs/webpack5.ts @@ -1,7 +1,7 @@ import { testSuite, expect } from 'manten'; import { build } from 'webpack-test-utils'; import webpack5 from 'webpack5'; -import { configureEsbuildMinifyPlugin } from '../utils'; +import { configureEsbuildMinifyPlugin } from '../utils.js'; const { RawSource } = webpack5.sources; diff --git a/tests/utils.ts b/tests/utils.ts index 6ef669c1..59ff0e70 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -1,9 +1,10 @@ +import path from 'path'; import type webpack4 from 'webpack'; import type webpack5 from 'webpack5'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { EsbuildPlugin, type EsbuildPluginOptions } from '#esbuild-loader'; -const esbuildLoaderPath = require.resolve('../src/'); +const esbuildLoaderPath = path.resolve('./src/index.ts'); export type Webpack = typeof webpack4 | typeof webpack5; @@ -13,7 +14,7 @@ type RuleSetUseItem = webpack4.RuleSetUseItem & webpack5.RuleSetUseItem; export const configureEsbuildLoader = ( config: WebpackConfiguration, - options?: any, + rulesConfig?: any, ) => { config.resolveLoader!.alias = { 'esbuild-loader': esbuildLoaderPath, @@ -22,7 +23,11 @@ export const configureEsbuildLoader = ( config.module!.rules!.push({ test: /\.js$/, loader: 'esbuild-loader', - ...options, + ...rulesConfig, + options: { + tsconfigRaw: undefined, + ...rulesConfig?.options, + }, }); }; @@ -33,7 +38,10 @@ export const configureEsbuildMinifyPlugin = ( config.optimization = { minimize: true, minimizer: [ - new EsbuildPlugin(options), + new EsbuildPlugin({ + tsconfigRaw: undefined, + ...options, + }), ], }; }; From 7c687699d99d0cc623d0137c7e6c6ca55c227b87 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Wed, 1 Feb 2023 23:04:26 -0500 Subject: [PATCH 19/31] fix: apply tsconfig only to matching files (#310) BREAKING CHANGE: `tsconfig.json` is now only applied to files it matches (via `include`/`exclude`/`files`) --- package.json | 4 +-- pnpm-lock.yaml | 70 ++++++++++++++++++++++++----------------- src/loader.ts | 9 ++++-- src/plugin.ts | 5 --- src/tsconfig.ts | 7 ++++- tests/specs/tsconfig.ts | 32 ++++++++++++++++--- 6 files changed, 82 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 72809bec..d8cc5da0 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "esbuild": "^0.16.17", - "get-tsconfig": "^4.3.0", + "get-tsconfig": "github:privatenumber/get-tsconfig#npm/file-matcher", "loader-utils": "^2.0.0", "tapable": "^2.2.0", "webpack-sources": "^1.4.3" @@ -70,7 +70,7 @@ "memfs": "^3.4.13", "mini-css-extract-plugin": "^1.6.2", "pkgroll": "^1.8.0", - "tsx": "^3.12.2", + "tsx": "github:esbuild-kit/tsx#npm/ts-file-matcher", "typescript": "^4.9.4", "webpack": "^4.44.2", "webpack-cli": "^4.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d59372b..c6f00fc9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,14 +13,14 @@ specifiers: eslint: ^8.31.0 execa: ^6.1.0 fs-fixture: ^1.2.0 - get-tsconfig: ^4.3.0 + get-tsconfig: github:privatenumber/get-tsconfig#npm/file-matcher loader-utils: ^2.0.0 manten: ^0.6.0 memfs: ^3.4.13 mini-css-extract-plugin: ^1.6.2 pkgroll: ^1.8.0 tapable: ^2.2.0 - tsx: ^3.12.2 + tsx: github:esbuild-kit/tsx#npm/ts-file-matcher typescript: ^4.9.4 webpack: ^4.44.2 webpack-cli: ^4.10.0 @@ -30,7 +30,7 @@ specifiers: dependencies: esbuild: 0.16.17 - get-tsconfig: 4.3.0 + get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d loader-utils: 2.0.0 tapable: 2.2.0 webpack-sources: 1.4.3 @@ -51,7 +51,7 @@ devDependencies: memfs: 3.4.13 mini-css-extract-plugin: 1.6.2_webpack@4.46.0 pkgroll: 1.8.0_typescript@4.9.4 - tsx: 3.12.2 + tsx: github.com/esbuild-kit/tsx/0276e1aefd83ecf151e43c74b5402c1b296af1f7 typescript: 4.9.4 webpack: 4.46.0_webpack-cli@4.10.0 webpack-cli: 4.10.0_webpack@4.46.0 @@ -107,13 +107,6 @@ packages: engines: {node: '>=10.0.0'} dev: true - /@esbuild-kit/cjs-loader/2.4.1: - resolution: {integrity: sha512-lhc/XLith28QdW0HpHZvZKkorWgmCNT7sVelMHDj3HFdTfdqkwEKvT+aXVQtNAmCC39VJhunDkWhONWB7335mg==} - dependencies: - '@esbuild-kit/core-utils': 3.0.0 - get-tsconfig: 4.3.0 - dev: true - /@esbuild-kit/core-utils/3.0.0: resolution: {integrity: sha512-TXmwH9EFS3DC2sI2YJWJBgHGhlteK0Xyu1VabwetMULfm3oYhbrsWV5yaSr2NTWZIgDGVLHbRf0inxbjXqAcmQ==} dependencies: @@ -121,13 +114,6 @@ packages: source-map-support: 0.5.21 dev: true - /@esbuild-kit/esm-loader/2.5.4: - resolution: {integrity: sha512-afmtLf6uqxD5IgwCzomtqCYIgz/sjHzCWZFvfS5+FzeYxOURPUo4QcHtqJxbxWOMOogKriZanN/1bJQE/ZL93A==} - dependencies: - '@esbuild-kit/core-utils': 3.0.0 - get-tsconfig: 4.3.0 - dev: true - /@esbuild/android-arm/0.15.18: resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==} engines: {node: '>=12'} @@ -3141,6 +3127,7 @@ packages: /get-tsconfig/4.3.0: resolution: {integrity: sha512-YCcF28IqSay3fqpIu5y3Krg/utCBHBeoflkZyHj/QcqI2nrLPC3ZegS9CmIo+hJb8K7aiGsuUl7PwWVjNG2HQQ==} + dev: true /get-value/2.0.6: resolution: {integrity: sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=} @@ -5731,17 +5718,6 @@ packages: typescript: 4.9.4 dev: true - /tsx/3.12.2: - resolution: {integrity: sha512-ykAEkoBg30RXxeOMVeZwar+JH632dZn9EUJVyJwhfag62k6UO/dIyJEV58YuLF6e5BTdV/qmbQrpkWqjq9cUnQ==} - hasBin: true - dependencies: - '@esbuild-kit/cjs-loader': 2.4.1 - '@esbuild-kit/core-utils': 3.0.0 - '@esbuild-kit/esm-loader': 2.5.4 - optionalDependencies: - fsevents: 2.3.2 - dev: true - /tty-browserify/0.0.0: resolution: {integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=} dev: true @@ -6174,3 +6150,39 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + github.com/esbuild-kit/cjs-loader/592345ba978c64c98bd3f2797904335f17c7ec0c: + resolution: {tarball: https://codeload.github.com/esbuild-kit/cjs-loader/tar.gz/592345ba978c64c98bd3f2797904335f17c7ec0c} + name: '@esbuild-kit/cjs-loader' + version: 0.0.0-semantic-release + dependencies: + '@esbuild-kit/core-utils': 3.0.0 + get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d + dev: true + + github.com/esbuild-kit/esm-loader/bba6380ec81039dd5e41b0e5be491a7149393f7f: + resolution: {tarball: https://codeload.github.com/esbuild-kit/esm-loader/tar.gz/bba6380ec81039dd5e41b0e5be491a7149393f7f} + name: '@esbuild-kit/esm-loader' + version: 0.0.0-semantic-release + dependencies: + '@esbuild-kit/core-utils': 3.0.0 + get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d + dev: true + + github.com/esbuild-kit/tsx/0276e1aefd83ecf151e43c74b5402c1b296af1f7: + resolution: {tarball: https://codeload.github.com/esbuild-kit/tsx/tar.gz/0276e1aefd83ecf151e43c74b5402c1b296af1f7} + name: tsx + version: 0.0.0-semantic-release + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': github.com/esbuild-kit/cjs-loader/592345ba978c64c98bd3f2797904335f17c7ec0c + '@esbuild-kit/core-utils': 3.0.0 + '@esbuild-kit/esm-loader': github.com/esbuild-kit/esm-loader/bba6380ec81039dd5e41b0e5be491a7149393f7f + optionalDependencies: + fsevents: 2.3.2 + dev: true + + github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d: + resolution: {tarball: https://codeload.github.com/privatenumber/get-tsconfig/tar.gz/2a9640126cbcea030c9d2e762f5b4411136b296d} + name: get-tsconfig + version: 0.0.0-semantic-release diff --git a/src/loader.ts b/src/loader.ts index a50fbba3..bb0a7cb8 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -1,8 +1,11 @@ -import { transform as defaultEsbuildTransform } from 'esbuild'; +import { + transform as defaultEsbuildTransform, + type TransformOptions, +} from 'esbuild'; import { getOptions } from 'loader-utils'; import webpack from 'webpack'; import type { LoaderOptions } from './types.js'; -import { tsconfig } from './tsconfig.js'; +import { fileMatcher } from './tsconfig.js'; async function ESBuildLoader( this: webpack.loader.LoaderContext, @@ -35,7 +38,7 @@ async function ESBuildLoader( }; if (!('tsconfigRaw' in transformOptions)) { - transformOptions.tsconfigRaw = tsconfig; + transformOptions.tsconfigRaw = fileMatcher?.(this.resourcePath) as TransformOptions['tsconfigRaw']; } try { diff --git a/src/plugin.ts b/src/plugin.ts index cc10beae..b769dac1 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -8,7 +8,6 @@ import webpack5 from 'webpack5'; import { matchObject } from 'webpack/lib/ModuleFilenameHelpers.js'; import { version } from '../package.json'; import type { EsbuildPluginOptions } from './types.js'; -import { tsconfig } from './tsconfig.js'; type Compiler = webpack4.Compiler | webpack5.Compiler; type Compilation = webpack4.compilation.Compilation | webpack5.Compilation; @@ -137,10 +136,6 @@ export default function EsbuildPlugin( options.minify = true; } - if (!('tsconfigRaw' in options)) { - options.tsconfigRaw = tsconfig; - } - return { apply(compiler: Compiler) { if (!('format' in options)) { diff --git a/src/tsconfig.ts b/src/tsconfig.ts index 027f4327..925fa717 100644 --- a/src/tsconfig.ts +++ b/src/tsconfig.ts @@ -1,6 +1,11 @@ -import { getTsconfig } from 'get-tsconfig'; +import { + getTsconfig, + createFilesMatcher, +} from 'get-tsconfig'; import type { TransformOptions } from 'esbuild'; const foundTsconfig = getTsconfig(); export const tsconfig = foundTsconfig?.config as (TransformOptions['tsconfigRaw'] | undefined); + +export const fileMatcher = foundTsconfig && createFilesMatcher(foundTsconfig); diff --git a/tests/specs/tsconfig.ts b/tests/specs/tsconfig.ts index e2ac4afb..473920d4 100644 --- a/tests/specs/tsconfig.ts +++ b/tests/specs/tsconfig.ts @@ -1,4 +1,5 @@ import path from 'path'; +import { createRequire } from 'node:module'; import { testSuite, expect } from 'manten'; import { createFixture } from 'fs-fixture'; import { execa } from 'execa'; @@ -6,13 +7,21 @@ import { execa } from 'execa'; const webpackCli = path.resolve('node_modules/webpack-cli/bin/cli.js'); const esbuildLoader = path.resolve('dist/index.cjs'); +const detectStrictMode = ` +(function (isStrict) { + arguments[0] = false; + return isStrict; +})(true) +`; + export default testSuite(({ describe }) => { describe('tsconfig', ({ describe }) => { describe('loader', ({ test }) => { test('finds tsconfig.json and applies strict mode', async () => { const fixture = await createFixture({ src: { - 'index.ts': 'console.log(1)', + 'index.ts': `module.exports = [${detectStrictMode}, require("./strict.ts")];`, + 'strict.ts': `module.exports = ${detectStrictMode}`, }, 'webpack.config.js': ` module.exports = { @@ -36,12 +45,19 @@ export default testSuite(({ describe }) => { }, entry: './src/index.ts', + + output: { + libraryTarget: 'commonjs2', + }, }; `, 'tsconfig.json': JSON.stringify({ compilerOptions: { strict: true, }, + include: [ + 'src/strict.ts', + ], }), }); @@ -49,15 +65,21 @@ export default testSuite(({ describe }) => { cwd: fixture.path, }); - const code = await fixture.readFile('dist/main.js', 'utf8'); - expect(code).toMatch('use strict'); + const require = createRequire(import.meta.url); + expect( + require(path.join(fixture.path, 'dist/main.js')), + ).toStrictEqual([false, true]); await fixture.rm(); }); }); describe('plugin', ({ test }) => { - test('finds tsconfig.json and applies strict mode', async () => { + /** + * Since the plugin applies on distribution assets, it should not apply + * any tsconfig settings. + */ + test('should not detect tsconfig.json and apply strict mode', async () => { const fixture = await createFixture({ src: { 'index.js': 'console.log(1)', @@ -86,7 +108,7 @@ export default testSuite(({ describe }) => { }); const code = await fixture.readFile('dist/main.js', 'utf8'); - expect(code).toMatch('use strict'); + expect(code).not.toMatch('use strict'); await fixture.rm(); }); From 92b49e94e6e3323bcb6a399d3515aa42e795d8d4 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Wed, 1 Feb 2023 23:54:05 -0500 Subject: [PATCH 20/31] feat: `tsconfig` option (#311) --- README.md | 22 ++++++++++----- src/loader.ts | 30 +++++++++++++++++++-- src/tsconfig.ts | 11 -------- src/types.ts | 5 ++++ tests/specs/tsconfig.ts | 59 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 107 insertions(+), 20 deletions(-) delete mode 100644 src/tsconfig.ts diff --git a/README.md b/README.md index 8ad5177b..3708fdd1 100644 --- a/README.md +++ b/README.md @@ -77,28 +77,31 @@ In `webpack.config.js`: } ``` -#### Configuration -If you have a `tsconfig.json` file, esbuild-loader will automatically detect it. +#### `tsconfig.json` +If you have a `tsconfig.json` file in your project, esbuild-loader will automatically load it. -Alternatively, you can also pass it in directly via the [`tsconfigRaw` option](https://esbuild.github.io/api/#tsconfig-raw): +If you use a custom name, you can pass it in the path via `tsconfig` option: ```diff { test: /\.tsx?$/, loader: 'esbuild-loader', options: { -+ tsconfigRaw: require('./tsconfig.json') ++ tsconfig: './tsconfig.custom.json' } } ``` +Behind the scenes, [`get-tsconfig`](https://github.com/privatenumber/get-tsconfig) is used to load the tsconfig, and to also resolve the `extends` property if it exists. + +You can also use the `tsconfigRaw` option to pass in a raw `tsconfig` object, but it will not resolve the `extends` property. + ⚠️ esbuild only supports a subset of `tsconfig` options [(see `TransformOptions` interface)](https://github.com/evanw/esbuild/blob/88821b7e7d46737f633120f91c65f662eace0bcf/lib/shared/types.ts#L159-L165) and does not do type-checks. It's recommended to use a type-aware IDE or `tsc --noEmit` for type-checking instead. It is also recommended to enable [`isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules) and [`esModuleInterop`](https://www.typescriptlang.org/tsconfig/#esModuleInterop) options in your `tsconfig` by the [esbuild docs](https://esbuild.github.io/content-types/#typescript-caveats). #### `tsconfig.json` Paths -Use [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin) to add support for `tsconfig.json#paths`. - -Since esbuild-loader only uses esbuild to transform code, it cannot help Webpack with resolving [tsconfig.json#paths](https://www.typescriptlang.org/tsconfig/paths.html). +Use [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin) to add support for [`tsconfig.json#paths`](https://www.typescriptlang.org/tsconfig/paths.html). +Since esbuild-loader only uses esbuild to transform code, it cannot help Webpack with resolving paths. ### JS Minification (eg. Terser) You can replace JS minifiers like Terser or UglifyJs. Checkout the [benchmarks](https://github.com/privatenumber/minification-benchmarks) to see how much faster esbuild is. The `target` option tells esbuild that it can use newer JS syntax to perform better minification. @@ -250,6 +253,11 @@ Note: Here are some common configurations and custom options: +#### tsconfig +Type: `string` + +Pass in the file path to a **custom** tsconfig file. If the file name is `tsconfig.json`, it will automatically detect it. + #### target Type: `string | Array` diff --git a/src/loader.ts b/src/loader.ts index bb0a7cb8..324158c1 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -1,11 +1,21 @@ +import path from 'path'; import { transform as defaultEsbuildTransform, type TransformOptions, } from 'esbuild'; import { getOptions } from 'loader-utils'; import webpack from 'webpack'; +import { + getTsconfig, + parseTsconfig, + createFilesMatcher, + type TsConfigResult, + type FileMatcher, +} from 'get-tsconfig'; import type { LoaderOptions } from './types.js'; -import { fileMatcher } from './tsconfig.js'; + +let foundTsconfig: TsConfigResult | null; +let fileMatcher: FileMatcher; async function ESBuildLoader( this: webpack.loader.LoaderContext, @@ -15,6 +25,7 @@ async function ESBuildLoader( const options: LoaderOptions = getOptions(this); const { implementation, + tsconfig, ...esbuildTransformOptions } = options; @@ -38,7 +49,22 @@ async function ESBuildLoader( }; if (!('tsconfigRaw' in transformOptions)) { - transformOptions.tsconfigRaw = fileMatcher?.(this.resourcePath) as TransformOptions['tsconfigRaw']; + if (fileMatcher) { + transformOptions.tsconfigRaw = fileMatcher(this.resourcePath) as TransformOptions['tsconfigRaw']; + } else { + const tsconfigPath = tsconfig && path.resolve(tsconfig); + foundTsconfig = ( + tsconfigPath + ? { + config: parseTsconfig(tsconfigPath), + path: tsconfigPath, + } + : getTsconfig() + ); + if (foundTsconfig) { + fileMatcher = createFilesMatcher(foundTsconfig); + } + } } try { diff --git a/src/tsconfig.ts b/src/tsconfig.ts deleted file mode 100644 index 925fa717..00000000 --- a/src/tsconfig.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { - getTsconfig, - createFilesMatcher, -} from 'get-tsconfig'; -import type { TransformOptions } from 'esbuild'; - -const foundTsconfig = getTsconfig(); - -export const tsconfig = foundTsconfig?.config as (TransformOptions['tsconfigRaw'] | undefined); - -export const fileMatcher = foundTsconfig && createFilesMatcher(foundTsconfig); diff --git a/src/types.ts b/src/types.ts index 01f19d0d..83624156 100644 --- a/src/types.ts +++ b/src/types.ts @@ -13,6 +13,11 @@ type Except = { export type LoaderOptions = Except & { /** Pass a custom esbuild implementation */ implementation?: Implementation; + + /** + * Path to tsconfig.json file + */ + tsconfig?: string; }; export type EsbuildPluginOptions = Except & { diff --git a/tests/specs/tsconfig.ts b/tests/specs/tsconfig.ts index 473920d4..465a84ad 100644 --- a/tests/specs/tsconfig.ts +++ b/tests/specs/tsconfig.ts @@ -72,6 +72,65 @@ export default testSuite(({ describe }) => { await fixture.rm(); }); + + test('accepts custom tsconfig.json path', async () => { + const fixture = await createFixture({ + src: { + 'index.ts': `module.exports = [${detectStrictMode}, require("./strict.ts")];`, + 'strict.ts': `module.exports = ${detectStrictMode}`, + }, + 'webpack.config.js': ` + module.exports = { + mode: 'production', + + optimization: { + minimize: false, + }, + + resolveLoader: { + alias: { + 'esbuild-loader': ${JSON.stringify(esbuildLoader)}, + }, + }, + + module: { + rules: [{ + test: /\\.ts$/, + loader: 'esbuild-loader', + options: { + tsconfig: './tsconfig.custom.json', + } + }], + }, + + entry: './src/index.ts', + + output: { + libraryTarget: 'commonjs2', + }, + }; + `, + 'tsconfig.custom.json': JSON.stringify({ + compilerOptions: { + strict: true, + }, + include: [ + 'src/strict.ts', + ], + }), + }); + + await execa(webpackCli, { + cwd: fixture.path, + }); + + const require = createRequire(import.meta.url); + expect( + require(path.join(fixture.path, 'dist/main.js')), + ).toStrictEqual([false, true]); + + await fixture.rm(); + }); }); describe('plugin', ({ test }) => { From 92dd0eab3555ad9455875d145c1745b4cd51148c Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 14:16:06 +0900 Subject: [PATCH 21/31] docs: update --- README.md | 59 ++++++++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 3708fdd1..1431742e 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ npm i -D esbuild-loader ## 🚦 Quick Setup -### Javascript & JSX transpilation (eg. Babel) In `webpack.config.js`: ```diff @@ -36,58 +35,41 @@ In `webpack.config.js`: rules: [ - { - test: /\.js$/, -- use: 'babel-loader', +- use: 'babel-loader' - }, -+ { -+ test: /\.js$/, -+ loader: 'esbuild-loader', -+ options: { -+ target: 'es2015' // Syntax to compile to (see options below for possible values) -+ } -+ }, - - ... - ], - }, - } -``` - -### TypeScript & TSX -In `webpack.config.js`: - -```diff - module.exports = { - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader' - }, + { -+ test: /\.tsx?$/, ++ // Match js, jsx, ts & tsx files ++ test: /\.[jt]sx?$/, + loader: 'esbuild-loader', + options: { ++ // JavaScript version to compile to + target: 'es2015' + } + }, ... - ] + ], }, } ``` +### TypeScript + #### `tsconfig.json` If you have a `tsconfig.json` file in your project, esbuild-loader will automatically load it. If you use a custom name, you can pass it in the path via `tsconfig` option: ```diff { - test: /\.tsx?$/, - loader: 'esbuild-loader', - options: { -+ tsconfig: './tsconfig.custom.json' - } + test: /\.tsx?$/, + loader: 'esbuild-loader', + options: { ++ tsconfig: './tsconfig.custom.json' + } } ``` @@ -103,7 +85,7 @@ Use [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-we Since esbuild-loader only uses esbuild to transform code, it cannot help Webpack with resolving paths. -### JS Minification (eg. Terser) +### Minification You can replace JS minifiers like Terser or UglifyJs. Checkout the [benchmarks](https://github.com/privatenumber/minification-benchmarks) to see how much faster esbuild is. The `target` option tells esbuild that it can use newer JS syntax to perform better minification. In `webpack.config.js`: @@ -133,7 +115,7 @@ If you're not using TypeScript, JSX, or any syntax unsupported by Webpack, you c There are two ways to minify CSS, depending on your setup. You should already have CSS setup in your build using [`css-loader`](https://github.com/webpack-contrib/css-loader). #### CSS assets -If your CSS is extracted and emitted as a CSS file, you can replace CSS minification plugins like [`css-minimizer-webpack-plugin`](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) or [`optimize-css-assets-webpack-plugin`](https://github.com/NMFR/optimize-css-assets-webpack-plugin) with the `EsbuildPlugin`. +If the CSS is extracted and emitted as a separate file, you can replace CSS minification plugins like [`css-minimizer-webpack-plugin`](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) with the `EsbuildPlugin`. Assuming the CSS is extracted using something like [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin), in `webpack.config.js`: @@ -254,6 +236,7 @@ Note: Here are some common configurations and custom options: #### tsconfig + Type: `string` Pass in the file path to a **custom** tsconfig file. If the file name is `tsconfig.json`, it will automatically detect it. @@ -370,29 +353,21 @@ Type: `boolean` Default: `false` -_Custom esbuild-loader option._ - Whether to minify CSS files. #### include Type: `string | RegExp | Array` -_Custom esbuild-loader option._ - -Filter assets to include in minification +To only apply the plugin to certain assets, pass in filters include #### exclude Type: `string | RegExp | Array` -_Custom esbuild-loader option._ - -Filter assets to exclude from minification +To prevent the plugin from applying to certain assets, pass in filters to exclude #### implementation Type: `{ transform: Function }` -_Custom esbuild-loader option._ - Use it to pass in a [different esbuild version](#bring-your-own-esbuild-advanced). ## 🙋‍♀️ FAQ From d202ca09ab51194cdd7ac81d9bd2e16e8c7aff82 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 14:19:52 +0900 Subject: [PATCH 22/31] docs: update --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1431742e..29679de2 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,14 @@ npm i -D esbuild-loader ## 🚦 Quick Setup -In `webpack.config.js`: +`esbuild-loader` can transform JavaScript to support older browsers, and TypeScript to JavaScript. + + +In your Webpack configuration, add a new rule for `esbuild-loader` matching the files you want to transform (e.g. `.js`, `.jsx`, `.ts`, `.tsx`). + +If you were using other loaders before (e.g. `babel-loader`/`ts-loader`), make sure to remove them. +`webpack.config.js`: ```diff module.exports = { module: { From ea96d71087115f9627f05138a1b4918f23e4285c Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 14:22:20 +0900 Subject: [PATCH 23/31] docs: update --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 29679de2..e4371ad9 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,7 @@ npm i -D esbuild-loader ## 🚦 Quick Setup -`esbuild-loader` can transform JavaScript to support older browsers, and TypeScript to JavaScript. - +Use `esbuild-loader` to transform new JavaScript syntax to support older browsers, and TypeScript to JavaScript In your Webpack configuration, add a new rule for `esbuild-loader` matching the files you want to transform (e.g. `.js`, `.jsx`, `.ts`, `.tsx`). From fd894fa23259e5658ad59c3e43b739826f77197c Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 14:29:45 +0900 Subject: [PATCH 24/31] chore: removed unused dependency "tapable" --- package.json | 1 - pnpm-lock.yaml | 7 ------- 2 files changed, 8 deletions(-) diff --git a/package.json b/package.json index d8cc5da0..f723fe77 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "esbuild": "^0.16.17", "get-tsconfig": "github:privatenumber/get-tsconfig#npm/file-matcher", "loader-utils": "^2.0.0", - "tapable": "^2.2.0", "webpack-sources": "^1.4.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6f00fc9..ab9aeb10 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,6 @@ specifiers: memfs: ^3.4.13 mini-css-extract-plugin: ^1.6.2 pkgroll: ^1.8.0 - tapable: ^2.2.0 tsx: github:esbuild-kit/tsx#npm/ts-file-matcher typescript: ^4.9.4 webpack: ^4.44.2 @@ -32,7 +31,6 @@ dependencies: esbuild: 0.16.17 get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d loader-utils: 2.0.0 - tapable: 2.2.0 webpack-sources: 1.4.3 devDependencies: @@ -5555,11 +5553,6 @@ packages: engines: {node: '>=6'} dev: true - /tapable/2.2.0: - resolution: {integrity: sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==} - engines: {node: '>=6'} - dev: false - /tapable/2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} From b1a6f60f9d0ef66b3d6ad2ebcce7edb0114a86e8 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 14:40:29 +0900 Subject: [PATCH 25/31] chore: upgrade dependencies --- package.json | 10 +- pnpm-lock.yaml | 584 +++++++++++++++++++++--------------------- tests/specs/plugin.ts | 2 + 3 files changed, 295 insertions(+), 301 deletions(-) diff --git a/package.json b/package.json index f723fe77..f463c022 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "webpack": "^4.40.0 || ^5.0.0" }, "dependencies": { - "esbuild": "^0.16.17", + "esbuild": "^0.17.5", "get-tsconfig": "github:privatenumber/get-tsconfig#npm/file-matcher", "loader-utils": "^2.0.0", "webpack-sources": "^1.4.3" @@ -62,15 +62,15 @@ "@types/webpack-sources": "^0.1.9", "clean-pkg-json": "^1.2.0", "css-loader": "^5.2.7", - "eslint": "^8.31.0", + "eslint": "^8.33.0", "execa": "^6.1.0", "fs-fixture": "^1.2.0", - "manten": "^0.6.0", + "manten": "^0.6.1", "memfs": "^3.4.13", "mini-css-extract-plugin": "^1.6.2", - "pkgroll": "^1.8.0", + "pkgroll": "^1.8.2", "tsx": "github:esbuild-kit/tsx#npm/ts-file-matcher", - "typescript": "^4.9.4", + "typescript": "^4.9.5", "webpack": "^4.44.2", "webpack-cli": "^4.10.0", "webpack-test-utils": "^2.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab9aeb10..4f907c05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,18 +9,18 @@ specifiers: '@types/webpack-sources': ^0.1.9 clean-pkg-json: ^1.2.0 css-loader: ^5.2.7 - esbuild: ^0.16.17 - eslint: ^8.31.0 + esbuild: ^0.17.5 + eslint: ^8.33.0 execa: ^6.1.0 fs-fixture: ^1.2.0 get-tsconfig: github:privatenumber/get-tsconfig#npm/file-matcher loader-utils: ^2.0.0 - manten: ^0.6.0 + manten: ^0.6.1 memfs: ^3.4.13 mini-css-extract-plugin: ^1.6.2 - pkgroll: ^1.8.0 + pkgroll: ^1.8.2 tsx: github:esbuild-kit/tsx#npm/ts-file-matcher - typescript: ^4.9.4 + typescript: ^4.9.5 webpack: ^4.44.2 webpack-cli: ^4.10.0 webpack-sources: ^1.4.3 @@ -28,43 +28,36 @@ specifiers: webpack5: npm:webpack@^5.0.0 dependencies: - esbuild: 0.16.17 + esbuild: 0.17.5 get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d loader-utils: 2.0.0 webpack-sources: 1.4.3 devDependencies: - '@pvtnbr/eslint-config': 0.33.0_iukboom6ndih5an6iafl45j2fe + '@pvtnbr/eslint-config': 0.33.0_4vsywjlpuriuw3tl5oq6zy5a64 '@types/loader-utils': 2.0.3 - '@types/mini-css-extract-plugin': 2.4.0_frt44zp6b6ywsvanisas3d33qe + '@types/mini-css-extract-plugin': 2.4.0_36zrqstrtvtlfjqucbku36jfyq '@types/node': 18.11.18 '@types/webpack': 4.41.33 '@types/webpack-sources': 0.1.9 clean-pkg-json: 1.2.0 css-loader: 5.2.7_webpack@4.46.0 - eslint: 8.31.0 + eslint: 8.33.0 execa: 6.1.0 fs-fixture: 1.2.0 - manten: 0.6.0 + manten: 0.6.1 memfs: 3.4.13 mini-css-extract-plugin: 1.6.2_webpack@4.46.0 - pkgroll: 1.8.0_typescript@4.9.4 + pkgroll: 1.8.2_typescript@4.9.5 tsx: github.com/esbuild-kit/tsx/0276e1aefd83ecf151e43c74b5402c1b296af1f7 - typescript: 4.9.4 + typescript: 4.9.5 webpack: 4.46.0_webpack-cli@4.10.0 webpack-cli: 4.10.0_webpack@4.46.0 webpack-test-utils: 2.1.0_webpack@4.46.0 - webpack5: /webpack/5.75.0_frt44zp6b6ywsvanisas3d33qe + webpack5: /webpack/5.75.0_36zrqstrtvtlfjqucbku36jfyq packages: - /@babel/code-frame/7.16.0: - resolution: {integrity: sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.16.0 - dev: true - /@babel/code-frame/7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} @@ -72,25 +65,11 @@ packages: '@babel/highlight': 7.18.6 dev: true - /@babel/helper-validator-identifier/7.18.6: - resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-validator-identifier/7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} dev: true - /@babel/highlight/7.16.0: - resolution: {integrity: sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.18.6 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} @@ -121,80 +100,80 @@ packages: dev: true optional: true - /@esbuild/android-arm/0.16.17: - resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} + /@esbuild/android-arm/0.17.5: + resolution: {integrity: sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true optional: true - /@esbuild/android-arm64/0.16.17: - resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} + /@esbuild/android-arm64/0.17.5: + resolution: {integrity: sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@esbuild/android-x64/0.16.17: - resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} + /@esbuild/android-x64/0.17.5: + resolution: {integrity: sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true optional: true - /@esbuild/darwin-arm64/0.16.17: - resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} + /@esbuild/darwin-arm64/0.17.5: + resolution: {integrity: sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@esbuild/darwin-x64/0.16.17: - resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} + /@esbuild/darwin-x64/0.17.5: + resolution: {integrity: sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@esbuild/freebsd-arm64/0.16.17: - resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} + /@esbuild/freebsd-arm64/0.17.5: + resolution: {integrity: sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true optional: true - /@esbuild/freebsd-x64/0.16.17: - resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} + /@esbuild/freebsd-x64/0.17.5: + resolution: {integrity: sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true optional: true - /@esbuild/linux-arm/0.16.17: - resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} + /@esbuild/linux-arm/0.17.5: + resolution: {integrity: sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-arm64/0.16.17: - resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} + /@esbuild/linux-arm64/0.17.5: + resolution: {integrity: sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-ia32/0.16.17: - resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} + /@esbuild/linux-ia32/0.17.5: + resolution: {integrity: sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -210,96 +189,96 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.16.17: - resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} + /@esbuild/linux-loong64/0.17.5: + resolution: {integrity: sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-mips64el/0.16.17: - resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} + /@esbuild/linux-mips64el/0.17.5: + resolution: {integrity: sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-ppc64/0.16.17: - resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} + /@esbuild/linux-ppc64/0.17.5: + resolution: {integrity: sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-riscv64/0.16.17: - resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} + /@esbuild/linux-riscv64/0.17.5: + resolution: {integrity: sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-s390x/0.16.17: - resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} + /@esbuild/linux-s390x/0.17.5: + resolution: {integrity: sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-x64/0.16.17: - resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} + /@esbuild/linux-x64/0.17.5: + resolution: {integrity: sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@esbuild/netbsd-x64/0.16.17: - resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} + /@esbuild/netbsd-x64/0.17.5: + resolution: {integrity: sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true optional: true - /@esbuild/openbsd-x64/0.16.17: - resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} + /@esbuild/openbsd-x64/0.17.5: + resolution: {integrity: sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true optional: true - /@esbuild/sunos-x64/0.16.17: - resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} + /@esbuild/sunos-x64/0.17.5: + resolution: {integrity: sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true optional: true - /@esbuild/win32-arm64/0.16.17: - resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} + /@esbuild/win32-arm64/0.17.5: + resolution: {integrity: sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@esbuild/win32-ia32/0.16.17: - resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} + /@esbuild/win32-ia32/0.17.5: + resolution: {integrity: sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@esbuild/win32-x64/0.16.17: - resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} + /@esbuild/win32-x64/0.17.5: + resolution: {integrity: sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -313,7 +292,7 @@ packages: ajv: 6.12.6 debug: 4.3.4 espree: 9.4.1 - globals: 13.19.0 + globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -343,29 +322,29 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@jest/expect-utils/29.3.1: - resolution: {integrity: sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g==} + /@jest/expect-utils/29.4.1: + resolution: {integrity: sha512-w6YJMn5DlzmxjO00i9wu2YSozUYRBhIoJ6nQwpMYcBMtiqMGJm1QBzOf6DDgRao8dbtpDoaqLg6iiQTvv0UHhQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.2.0 dev: true - /@jest/schemas/29.0.0: - resolution: {integrity: sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==} + /@jest/schemas/29.4.0: + resolution: {integrity: sha512-0E01f/gOZeNTG76i5eWWSupvSHaIINrTie7vCyjiYFKgzNdyEGd12BUv4oNBFHOqlHDbtoJi3HrQ38KCC90NsQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@sinclair/typebox': 0.24.51 + '@sinclair/typebox': 0.25.21 dev: true - /@jest/types/29.3.1: - resolution: {integrity: sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA==} + /@jest/types/29.4.1: + resolution: {integrity: sha512-zbrAXDUOnpJ+FMST2rV7QZOgec8rskg2zv8g2ajeqitp4tvZiyqTCYXANrKsM+ryj5o+LI+ZN2EgU9drrkiwSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.0.0 - '@types/istanbul-lib-coverage': 2.0.3 + '@jest/schemas': 29.4.0 + '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 '@types/node': 18.11.18 - '@types/yargs': 17.0.19 + '@types/yargs': 17.0.22 chalk: 4.1.2 dev: true @@ -439,28 +418,28 @@ packages: tslib: 2.4.1 dev: true - /@pvtnbr/eslint-config/0.33.0_iukboom6ndih5an6iafl45j2fe: + /@pvtnbr/eslint-config/0.33.0_4vsywjlpuriuw3tl5oq6zy5a64: resolution: {integrity: sha512-27Zs5L1LKtT4DKfFPalPTjImCiU3UMvfTMIModuFWn7nhGhbv4SEUPo5pc8fYoTgmAlnwp/NNMhw3yUUFZKyzw==} peerDependencies: eslint: ^7.15.0 || ^8.0.0 dependencies: - '@typescript-eslint/eslint-plugin': 5.48.1_3jon24igvnqaqexgwtxk6nkpse - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/eslint-plugin': 5.48.1_a6m4zgm5zctrciha4g25d3iemm + '@typescript-eslint/parser': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 confusing-browser-globals: 1.0.11 - eslint: 8.31.0 - eslint-import-resolver-typescript: 3.5.3_hnftvkj7qg3s6bbigj4pr6djxy - eslint-plugin-eslint-comments: 3.2.0_eslint@8.31.0 - eslint-plugin-import: 2.27.4_2ac3tknkazjoq5fxmuugu665ny - eslint-plugin-jsonc: 2.6.0_eslint@8.31.0 - eslint-plugin-markdown: 3.0.0_eslint@8.31.0 + eslint: 8.33.0 + eslint-import-resolver-typescript: 3.5.3_7rjw6w2qmafedc2aisb3w7g3da + eslint-plugin-eslint-comments: 3.2.0_eslint@8.33.0 + eslint-plugin-import: 2.27.4_i5n76ortidj3h7iqerugswgd3q + eslint-plugin-jsonc: 2.6.0_eslint@8.33.0 + eslint-plugin-markdown: 3.0.0_eslint@8.33.0 eslint-plugin-no-use-extend-native: 0.5.0 - eslint-plugin-node: 11.1.0_eslint@8.31.0 - eslint-plugin-promise: 6.1.1_eslint@8.31.0 - eslint-plugin-react: 7.32.0_eslint@8.31.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.31.0 - eslint-plugin-regexp: 1.12.0_eslint@8.31.0 - eslint-plugin-unicorn: 44.0.2_eslint@8.31.0 - eslint-plugin-vue: 9.8.0_eslint@8.31.0 + eslint-plugin-node: 11.1.0_eslint@8.33.0 + eslint-plugin-promise: 6.1.1_eslint@8.33.0 + eslint-plugin-react: 7.32.0_eslint@8.33.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.33.0 + eslint-plugin-regexp: 1.12.0_eslint@8.33.0 + eslint-plugin-unicorn: 44.0.2_eslint@8.33.0 + eslint-plugin-vue: 9.8.0_eslint@8.33.0 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -521,8 +500,8 @@ packages: dependencies: '@rollup/pluginutils': 3.1.0_rollup@2.79.1 '@types/resolve': 1.17.1 - deepmerge: 4.2.2 - is-builtin-module: 3.2.0 + deepmerge: 4.3.0 + is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.1 rollup: 2.79.1 @@ -558,8 +537,8 @@ packages: picomatch: 2.3.1 dev: true - /@sinclair/typebox/0.24.51: - resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} + /@sinclair/typebox/0.25.21: + resolution: {integrity: sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==} dev: true /@types/eslint-scope/3.7.4: @@ -584,14 +563,18 @@ packages: resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==} dev: true - /@types/istanbul-lib-coverage/2.0.3: - resolution: {integrity: sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==} + /@types/estree/1.0.0: + resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} + dev: true + + /@types/istanbul-lib-coverage/2.0.4: + resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} dev: true /@types/istanbul-lib-report/3.0.0: resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} dependencies: - '@types/istanbul-lib-coverage': 2.0.3 + '@types/istanbul-lib-coverage': 2.0.4 dev: true /@types/istanbul-reports/3.0.1: @@ -621,12 +604,12 @@ packages: '@types/unist': 2.0.6 dev: true - /@types/mini-css-extract-plugin/2.4.0_frt44zp6b6ywsvanisas3d33qe: + /@types/mini-css-extract-plugin/2.4.0_36zrqstrtvtlfjqucbku36jfyq: resolution: {integrity: sha512-1Pq4i+2+c8jncxfX5k7BzPIEoyrq+n7L319zMxiLUH4RlWTGcQJjemtMftLQnoTt21oHhZE0PjXd2W1xM1m4Hg==} dependencies: '@types/node': 18.11.18 tapable: 2.2.1 - webpack: 5.75.0_frt44zp6b6ywsvanisas3d33qe + webpack: 5.75.0_36zrqstrtvtlfjqucbku36jfyq transitivePeerDependencies: - '@swc/core' - esbuild @@ -701,17 +684,17 @@ packages: source-map: 0.6.1 dev: true - /@types/yargs-parser/20.2.1: - resolution: {integrity: sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==} + /@types/yargs-parser/21.0.0: + resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true - /@types/yargs/17.0.19: - resolution: {integrity: sha512-cAx3qamwaYX9R0fzOIZAlFpo4A+1uBVCxqpKz9D26uTF4srRXaGTTsikQmaotCtNdbhzyUH7ft6p9ktz9s6UNQ==} + /@types/yargs/17.0.22: + resolution: {integrity: sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==} dependencies: - '@types/yargs-parser': 20.2.1 + '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.48.1_3jon24igvnqaqexgwtxk6nkpse: + /@typescript-eslint/eslint-plugin/5.48.1_a6m4zgm5zctrciha4g25d3iemm: resolution: {integrity: sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -722,23 +705,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 '@typescript-eslint/scope-manager': 5.48.1 - '@typescript-eslint/type-utils': 5.48.1_iukboom6ndih5an6iafl45j2fe - '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/type-utils': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/utils': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 debug: 4.3.4 - eslint: 8.31.0 + eslint: 8.33.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.4 - typescript: 4.9.4 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.48.1_iukboom6ndih5an6iafl45j2fe: + /@typescript-eslint/parser/5.48.1_4vsywjlpuriuw3tl5oq6zy5a64: resolution: {integrity: sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -750,10 +733,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.48.1 '@typescript-eslint/types': 5.48.1 - '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4 + '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.5 debug: 4.3.4 - eslint: 8.31.0 - typescript: 4.9.4 + eslint: 8.33.0 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true @@ -766,7 +749,7 @@ packages: '@typescript-eslint/visitor-keys': 5.48.1 dev: true - /@typescript-eslint/type-utils/5.48.1_iukboom6ndih5an6iafl45j2fe: + /@typescript-eslint/type-utils/5.48.1_4vsywjlpuriuw3tl5oq6zy5a64: resolution: {integrity: sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -776,12 +759,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4 - '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.5 + '@typescript-eslint/utils': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 debug: 4.3.4 - eslint: 8.31.0 - tsutils: 3.21.0_typescript@4.9.4 - typescript: 4.9.4 + eslint: 8.33.0 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true @@ -791,7 +774,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.48.1_typescript@4.9.4: + /@typescript-eslint/typescript-estree/5.48.1_typescript@4.9.5: resolution: {integrity: sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -806,13 +789,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.4 - typescript: 4.9.4 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.48.1_iukboom6ndih5an6iafl45j2fe: + /@typescript-eslint/utils/5.48.1_4vsywjlpuriuw3tl5oq6zy5a64: resolution: {integrity: sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -822,10 +805,10 @@ packages: '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.48.1 '@typescript-eslint/types': 5.48.1 - '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4 - eslint: 8.31.0 + '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.5 + eslint: 8.33.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint-utils: 3.0.0_eslint@8.33.0 semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -1112,20 +1095,20 @@ packages: resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} dev: true - /acorn-import-assertions/1.8.0_acorn@8.8.1: + /acorn-import-assertions/1.8.0_acorn@8.8.2: resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==} peerDependencies: acorn: ^8 dependencies: - acorn: 8.8.1 + acorn: 8.8.2 dev: true - /acorn-jsx/5.3.2_acorn@8.8.1: + /acorn-jsx/5.3.2_acorn@8.8.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.8.1 + acorn: 8.8.2 dev: true /acorn/6.4.2: @@ -1140,6 +1123,12 @@ packages: hasBin: true dev: true + /acorn/8.8.2: + resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /ajv-errors/1.0.1_ajv@6.12.6: resolution: {integrity: sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==} peerDependencies: @@ -1468,15 +1457,15 @@ packages: pako: 1.0.11 dev: true - /browserslist/4.21.4: - resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} + /browserslist/4.21.5: + resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001443 + caniuse-lite: 1.0.30001450 electron-to-chromium: 1.4.284 - node-releases: 2.0.8 - update-browserslist-db: 1.0.10_browserslist@4.21.4 + node-releases: 2.0.9 + update-browserslist-db: 1.0.10_browserslist@4.21.5 dev: true /buffer-from/1.1.2: @@ -1551,8 +1540,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite/1.0.30001443: - resolution: {integrity: sha512-jUo8svymO8+Mkj3qbUbVjR8zv8LUGpGkUM/jKvc9SO2BvjCI980dp9fQbf/dyLs6RascPzgR4nhAKFA4OHeSaA==} + /caniuse-lite/1.0.30001450: + resolution: {integrity: sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==} dev: true /chalk/2.4.2: @@ -1632,10 +1621,6 @@ packages: engines: {node: '>=6.0'} dev: true - /ci-info/3.3.2: - resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} - dev: true - /ci-info/3.7.1: resolution: {integrity: sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==} engines: {node: '>=8'} @@ -1909,8 +1894,8 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /deepmerge/4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} + /deepmerge/4.3.0: + resolution: {integrity: sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==} engines: {node: '>=0.10.0'} dev: true @@ -2343,34 +2328,34 @@ packages: esbuild-windows-arm64: 0.15.18 dev: true - /esbuild/0.16.17: - resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} + /esbuild/0.17.5: + resolution: {integrity: sha512-Bu6WLCc9NMsNoMJUjGl3yBzTjVLXdysMltxQWiLAypP+/vQrf+3L1Xe8fCXzxaECus2cEJ9M7pk4yKatEwQMqQ==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.16.17 - '@esbuild/android-arm64': 0.16.17 - '@esbuild/android-x64': 0.16.17 - '@esbuild/darwin-arm64': 0.16.17 - '@esbuild/darwin-x64': 0.16.17 - '@esbuild/freebsd-arm64': 0.16.17 - '@esbuild/freebsd-x64': 0.16.17 - '@esbuild/linux-arm': 0.16.17 - '@esbuild/linux-arm64': 0.16.17 - '@esbuild/linux-ia32': 0.16.17 - '@esbuild/linux-loong64': 0.16.17 - '@esbuild/linux-mips64el': 0.16.17 - '@esbuild/linux-ppc64': 0.16.17 - '@esbuild/linux-riscv64': 0.16.17 - '@esbuild/linux-s390x': 0.16.17 - '@esbuild/linux-x64': 0.16.17 - '@esbuild/netbsd-x64': 0.16.17 - '@esbuild/openbsd-x64': 0.16.17 - '@esbuild/sunos-x64': 0.16.17 - '@esbuild/win32-arm64': 0.16.17 - '@esbuild/win32-ia32': 0.16.17 - '@esbuild/win32-x64': 0.16.17 + '@esbuild/android-arm': 0.17.5 + '@esbuild/android-arm64': 0.17.5 + '@esbuild/android-x64': 0.17.5 + '@esbuild/darwin-arm64': 0.17.5 + '@esbuild/darwin-x64': 0.17.5 + '@esbuild/freebsd-arm64': 0.17.5 + '@esbuild/freebsd-x64': 0.17.5 + '@esbuild/linux-arm': 0.17.5 + '@esbuild/linux-arm64': 0.17.5 + '@esbuild/linux-ia32': 0.17.5 + '@esbuild/linux-loong64': 0.17.5 + '@esbuild/linux-mips64el': 0.17.5 + '@esbuild/linux-ppc64': 0.17.5 + '@esbuild/linux-riscv64': 0.17.5 + '@esbuild/linux-s390x': 0.17.5 + '@esbuild/linux-x64': 0.17.5 + '@esbuild/netbsd-x64': 0.17.5 + '@esbuild/openbsd-x64': 0.17.5 + '@esbuild/sunos-x64': 0.17.5 + '@esbuild/win32-arm64': 0.17.5 + '@esbuild/win32-ia32': 0.17.5 + '@esbuild/win32-x64': 0.17.5 /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -2402,7 +2387,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/3.5.3_hnftvkj7qg3s6bbigj4pr6djxy: + /eslint-import-resolver-typescript/3.5.3_7rjw6w2qmafedc2aisb3w7g3da: resolution: {integrity: sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2411,8 +2396,8 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.12.0 - eslint: 8.31.0 - eslint-plugin-import: 2.27.4_2ac3tknkazjoq5fxmuugu665ny + eslint: 8.33.0 + eslint-plugin-import: 2.27.4_i5n76ortidj3h7iqerugswgd3q get-tsconfig: 4.3.0 globby: 13.1.3 is-core-module: 2.11.0 @@ -2422,7 +2407,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_v73lhamtbyinynmwa5fn7kpmfq: + /eslint-module-utils/2.7.4_tg5hlf7ceadgme4vnfo47vufz4: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -2443,38 +2428,38 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 debug: 3.2.7 - eslint: 8.31.0 + eslint: 8.33.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.3_hnftvkj7qg3s6bbigj4pr6djxy + eslint-import-resolver-typescript: 3.5.3_7rjw6w2qmafedc2aisb3w7g3da transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es/3.0.1_eslint@8.31.0: + /eslint-plugin-es/3.0.1_eslint@8.33.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.31.0 + eslint: 8.33.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-eslint-comments/3.2.0_eslint@8.31.0: + /eslint-plugin-eslint-comments/3.2.0_eslint@8.33.0: resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.31.0 + eslint: 8.33.0 ignore: 5.2.4 dev: true - /eslint-plugin-import/2.27.4_2ac3tknkazjoq5fxmuugu665ny: + /eslint-plugin-import/2.27.4_i5n76ortidj3h7iqerugswgd3q: resolution: {integrity: sha512-Z1jVt1EGKia1X9CnBCkpAOhWy8FgQ7OmJ/IblEkT82yrFU/xJaxwujaTzLWqigewwynRQ9mmHfX9MtAfhxm0sA==} engines: {node: '>=4'} peerDependencies: @@ -2484,15 +2469,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.48.1_4vsywjlpuriuw3tl5oq6zy5a64 array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.31.0 + eslint: 8.33.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_v73lhamtbyinynmwa5fn7kpmfq + eslint-module-utils: 2.7.4_tg5hlf7ceadgme4vnfo47vufz4 has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -2507,25 +2492,25 @@ packages: - supports-color dev: true - /eslint-plugin-jsonc/2.6.0_eslint@8.31.0: + /eslint-plugin-jsonc/2.6.0_eslint@8.33.0: resolution: {integrity: sha512-4bA9YTx58QaWalua1Q1b82zt7eZMB7i+ed8q8cKkbKP75ofOA2SXbtFyCSok7RY6jIXeCqQnKjN9If8zCgv6PA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: - eslint: 8.31.0 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint: 8.33.0 + eslint-utils: 3.0.0_eslint@8.33.0 jsonc-eslint-parser: 2.1.0 natural-compare: 1.4.0 dev: true - /eslint-plugin-markdown/3.0.0_eslint@8.31.0: + /eslint-plugin-markdown/3.0.0_eslint@8.33.0: resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.31.0 + eslint: 8.33.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color @@ -2541,14 +2526,14 @@ packages: is-proto-prop: 2.0.0 dev: true - /eslint-plugin-node/11.1.0_eslint@8.31.0: + /eslint-plugin-node/11.1.0_eslint@8.33.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.31.0 - eslint-plugin-es: 3.0.1_eslint@8.31.0 + eslint: 8.33.0 + eslint-plugin-es: 3.0.1_eslint@8.33.0 eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 @@ -2556,25 +2541,25 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-promise/6.1.1_eslint@8.31.0: + /eslint-plugin-promise/6.1.1_eslint@8.33.0: resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.31.0 + eslint: 8.33.0 dev: true - /eslint-plugin-react-hooks/4.6.0_eslint@8.31.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.33.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.31.0 + eslint: 8.33.0 dev: true - /eslint-plugin-react/7.32.0_eslint@8.31.0: + /eslint-plugin-react/7.32.0_eslint@8.33.0: resolution: {integrity: sha512-vSBi1+SrPiLZCGvxpiZIa28fMEUaMjXtCplrvxcIxGzmFiYdsXQDwInEjuv5/i/2CTTxbkS87tE8lsQ0Qxinbw==} engines: {node: '>=4'} peerDependencies: @@ -2584,7 +2569,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.31.0 + eslint: 8.33.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -2598,15 +2583,15 @@ packages: string.prototype.matchall: 4.0.8 dev: true - /eslint-plugin-regexp/1.12.0_eslint@8.31.0: + /eslint-plugin-regexp/1.12.0_eslint@8.33.0: resolution: {integrity: sha512-A1lnzOqHC22Ve8PZJgcw5pDHk5Sxp7J/pY86u027lVEGpUwe7dhZVVsy3SCm/cN438Zts8e9c09KGIVK4IixuA==} engines: {node: ^12 || >=14} peerDependencies: eslint: '>=6.0.0' dependencies: comment-parser: 1.3.1 - eslint: 8.31.0 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint: 8.33.0 + eslint-utils: 3.0.0_eslint@8.33.0 grapheme-splitter: 1.0.4 jsdoctypeparser: 9.0.0 refa: 0.9.1 @@ -2615,7 +2600,7 @@ packages: scslre: 0.1.6 dev: true - /eslint-plugin-unicorn/44.0.2_eslint@8.31.0: + /eslint-plugin-unicorn/44.0.2_eslint@8.33.0: resolution: {integrity: sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==} engines: {node: '>=14.18'} peerDependencies: @@ -2624,8 +2609,8 @@ packages: '@babel/helper-validator-identifier': 7.19.1 ci-info: 3.7.1 clean-regexp: 1.0.0 - eslint: 8.31.0 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint: 8.33.0 + eslint-utils: 3.0.0_eslint@8.33.0 esquery: 1.4.0 indent-string: 4.0.0 is-builtin-module: 3.2.0 @@ -2638,19 +2623,19 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-vue/9.8.0_eslint@8.31.0: + /eslint-plugin-vue/9.8.0_eslint@8.33.0: resolution: {integrity: sha512-E/AXwcTzunyzM83C2QqDHxepMzvI2y6x+mmeYHbVDQlKFqmKYvRrhaVixEeeG27uI44p9oKDFiyCRw4XxgtfHA==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.31.0 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint: 8.33.0 + eslint-utils: 3.0.0_eslint@8.33.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.11 semver: 7.3.8 - vue-eslint-parser: 9.1.0_eslint@8.31.0 + vue-eslint-parser: 9.1.0_eslint@8.33.0 xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -2687,13 +2672,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.31.0: + /eslint-utils/3.0.0_eslint@8.33.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.31.0 + eslint: 8.33.0 eslint-visitor-keys: 2.1.0 dev: true @@ -2712,8 +2697,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.31.0: - resolution: {integrity: sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==} + /eslint/8.33.0: + resolution: {integrity: sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -2728,7 +2713,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint-utils: 3.0.0_eslint@8.33.0 eslint-visitor-keys: 3.3.0 espree: 9.4.1 esquery: 1.4.0 @@ -2737,14 +2722,14 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.19.0 + globals: 13.20.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.2.0 + js-sdsl: 4.3.0 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -2764,8 +2749,8 @@ packages: resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.8.1 - acorn-jsx: 5.3.2_acorn@8.8.1 + acorn: 8.8.2 + acorn-jsx: 5.3.2_acorn@8.8.2 eslint-visitor-keys: 3.3.0 dev: true @@ -2848,15 +2833,15 @@ packages: - supports-color dev: true - /expect/29.3.1: - resolution: {integrity: sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA==} + /expect/29.4.1: + resolution: {integrity: sha512-OKrGESHOaMxK3b6zxIq9SOW8kEXztKff/Dvg88j4xIJxur1hspEbedVkR3GpHe5LO+WB2Qw7OWN0RMTdp6as5A==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.3.1 + '@jest/expect-utils': 29.4.1 jest-get-type: 29.2.0 - jest-matcher-utils: 29.3.1 - jest-message-util: 29.3.1 - jest-util: 29.3.1 + jest-matcher-utils: 29.4.1 + jest-message-util: 29.4.1 + jest-util: 29.4.1 dev: true /extend-shallow/2.0.1: @@ -3180,8 +3165,8 @@ packages: path-is-absolute: 1.0.1 dev: true - /globals/13.19.0: - resolution: {integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==} + /globals/13.20.0: + resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -3515,6 +3500,13 @@ packages: builtin-modules: 3.3.0 dev: true + /is-builtin-module/3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable/1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -3681,7 +3673,7 @@ packages: /is-reference/1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: - '@types/estree': 0.0.51 + '@types/estree': 1.0.0 dev: true /is-regex/1.1.4: @@ -3771,14 +3763,14 @@ packages: engines: {node: '>=0.10.0'} dev: true - /jest-diff/29.3.1: - resolution: {integrity: sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==} + /jest-diff/29.4.1: + resolution: {integrity: sha512-uazdl2g331iY56CEyfbNA0Ut7Mn2ulAG5vUaEHXycf1L6IPyuImIxSz4F0VYBKi7LYIuxOwTZzK3wh5jHzASMw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 diff-sequences: 29.3.1 jest-get-type: 29.2.0 - pretty-format: 29.3.1 + pretty-format: 29.4.1 dev: true /jest-get-type/29.2.0: @@ -3786,39 +3778,39 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-matcher-utils/29.3.1: - resolution: {integrity: sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==} + /jest-matcher-utils/29.4.1: + resolution: {integrity: sha512-k5h0u8V4nAEy6lSACepxL/rw78FLDkBnXhZVgFneVpnJONhb2DhZj/Gv4eNe+1XqQ5IhgUcqj745UwH0HJmMnA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.3.1 + jest-diff: 29.4.1 jest-get-type: 29.2.0 - pretty-format: 29.3.1 + pretty-format: 29.4.1 dev: true - /jest-message-util/29.3.1: - resolution: {integrity: sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA==} + /jest-message-util/29.4.1: + resolution: {integrity: sha512-H4/I0cXUaLeCw6FM+i4AwCnOwHRgitdaUFOdm49022YD5nfyr8C/DrbXOBEyJaj+w/y0gGJ57klssOaUiLLQGQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.16.0 - '@jest/types': 29.3.1 + '@babel/code-frame': 7.18.6 + '@jest/types': 29.4.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.10 micromatch: 4.0.5 - pretty-format: 29.3.1 + pretty-format: 29.4.1 slash: 3.0.0 - stack-utils: 2.0.5 + stack-utils: 2.0.6 dev: true - /jest-util/29.3.1: - resolution: {integrity: sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ==} + /jest-util/29.4.1: + resolution: {integrity: sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.3.1 + '@jest/types': 29.4.1 '@types/node': 18.11.18 chalk: 4.1.2 - ci-info: 3.3.2 + ci-info: 3.7.1 graceful-fs: 4.2.10 picomatch: 2.3.1 dev: true @@ -3832,8 +3824,8 @@ packages: supports-color: 8.1.1 dev: true - /js-sdsl/4.2.0: - resolution: {integrity: sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==} + /js-sdsl/4.3.0: + resolution: {integrity: sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==} dev: true /js-tokens/4.0.0: @@ -4045,10 +4037,10 @@ packages: semver: 5.7.1 dev: true - /manten/0.6.0: - resolution: {integrity: sha512-8OqNXWdPnP1xJ6F6wi1uY/T1pKFkZ+T0/BQxSkuTS5SKKyOPWj4yLWFsE9k0Z4CuyHz1DHB9/B/SOCGCRgQmMA==} + /manten/0.6.1: + resolution: {integrity: sha512-ZRWjgoZNl1NrjHvr2Aq78MhIousZu9sWKMy+vm858qMn4oHazyWNCdUvjKeHEFJ+SDjAMxtU8EL4ZKzDoOb1uQ==} dependencies: - expect: 29.3.1 + expect: 29.4.1 dev: true /map-cache/0.2.2: @@ -4343,8 +4335,8 @@ packages: vm-browserify: 1.1.2 dev: true - /node-releases/2.0.8: - resolution: {integrity: sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==} + /node-releases/2.0.9: + resolution: {integrity: sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==} dev: true /normalize-package-data/2.5.0: @@ -4688,8 +4680,8 @@ packages: find-up: 4.1.0 dev: true - /pkgroll/1.8.0_typescript@4.9.4: - resolution: {integrity: sha512-udmzTqrlFcUxHG+KU+bYZqb1Z/2LFFRGwLg4EuOCe6t52dIFJYrWE7iAqY3/sU9EmwDQqIVoLbxX5NKj1d1h6Q==} + /pkgroll/1.8.2_typescript@4.9.5: + resolution: {integrity: sha512-7lLaylmnGMr7xUl4DWEyWab2+SiBXZCVfmeDNL5+njaTeKgt5PMngqN9x9BZwZW7mGGG7aKrgqSWhXt0qCwRNA==} hasBin: true peerDependencies: typescript: ^4.1 @@ -4707,7 +4699,7 @@ packages: esbuild: 0.15.18 magic-string: 0.26.7 rollup: 2.79.1 - typescript: 4.9.4 + typescript: 4.9.5 dev: true /pluralize/8.0.0: @@ -4787,11 +4779,11 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /pretty-format/29.3.1: - resolution: {integrity: sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==} + /pretty-format/29.4.1: + resolution: {integrity: sha512-dt/Z761JUVsrIKaY215o1xQJBGlSmTx/h4cSqXqjHLnU1+Kt+mavVE7UgqJJO5ukx5HjSswHfmXz4LjS2oIJfg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.0.0 + '@jest/schemas': 29.4.0 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -5217,8 +5209,8 @@ packages: randombytes: 2.1.0 dev: true - /serialize-javascript/6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + /serialize-javascript/6.0.1: + resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} dependencies: randombytes: 2.1.0 dev: true @@ -5401,8 +5393,8 @@ packages: figgy-pudding: 3.5.2 dev: true - /stack-utils/2.0.5: - resolution: {integrity: sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==} + /stack-utils/2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} dependencies: escape-string-regexp: 2.0.0 @@ -5576,7 +5568,7 @@ packages: worker-farm: 1.7.0 dev: true - /terser-webpack-plugin/5.3.6_htvmhiqynazf46fjrszipnqp7a: + /terser-webpack-plugin/5.3.6_3uh7kx4cv3zeqb5i3youudagse: resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -5593,12 +5585,12 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.17 - esbuild: 0.16.17 + esbuild: 0.17.5 jest-worker: 27.5.1 schema-utils: 3.1.1 - serialize-javascript: 6.0.0 - terser: 5.16.1 - webpack: 5.75.0_frt44zp6b6ywsvanisas3d33qe + serialize-javascript: 6.0.1 + terser: 5.16.2 + webpack: 5.75.0_36zrqstrtvtlfjqucbku36jfyq dev: true /terser/4.8.1: @@ -5612,13 +5604,13 @@ packages: source-map-support: 0.5.21 dev: true - /terser/5.16.1: - resolution: {integrity: sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==} + /terser/5.16.2: + resolution: {integrity: sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg==} engines: {node: '>=10'} hasBin: true dependencies: '@jridgewell/source-map': 0.3.2 - acorn: 8.8.1 + acorn: 8.8.2 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -5701,14 +5693,14 @@ packages: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} dev: true - /tsutils/3.21.0_typescript@4.9.4: + /tsutils/3.21.0_typescript@4.9.5: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.9.4 + typescript: 4.9.5 dev: true /tty-browserify/0.0.0: @@ -5749,8 +5741,8 @@ packages: resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} dev: true - /typescript/4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} + /typescript/4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -5812,13 +5804,13 @@ packages: dev: true optional: true - /update-browserslist-db/1.0.10_browserslist@4.21.4: + /update-browserslist-db/1.0.10_browserslist@4.21.5: resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.4 + browserslist: 4.21.5 escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -5873,14 +5865,14 @@ packages: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} dev: true - /vue-eslint-parser/9.1.0_eslint@8.31.0: + /vue-eslint-parser/9.1.0_eslint@8.33.0: resolution: {integrity: sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.31.0 + eslint: 8.33.0 eslint-scope: 7.1.1 eslint-visitor-keys: 3.3.0 espree: 9.4.1 @@ -6027,7 +6019,7 @@ packages: - supports-color dev: true - /webpack/5.75.0_frt44zp6b6ywsvanisas3d33qe: + /webpack/5.75.0_36zrqstrtvtlfjqucbku36jfyq: resolution: {integrity: sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -6042,9 +6034,9 @@ packages: '@webassemblyjs/ast': 1.11.1 '@webassemblyjs/wasm-edit': 1.11.1 '@webassemblyjs/wasm-parser': 1.11.1 - acorn: 8.8.1 - acorn-import-assertions: 1.8.0_acorn@8.8.1 - browserslist: 4.21.4 + acorn: 8.8.2 + acorn-import-assertions: 1.8.0_acorn@8.8.2 + browserslist: 4.21.5 chrome-trace-event: 1.0.3 enhanced-resolve: 5.12.0 es-module-lexer: 0.9.3 @@ -6058,7 +6050,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 - terser-webpack-plugin: 5.3.6_htvmhiqynazf46fjrszipnqp7a + terser-webpack-plugin: 5.3.6_3uh7kx4cv3zeqb5i3youudagse watchpack: 2.4.0 webpack-cli: 4.10.0_webpack@4.46.0 webpack-sources: 3.2.3 diff --git a/tests/specs/plugin.ts b/tests/specs/plugin.ts index 1e188513..69a4ce89 100644 --- a/tests/specs/plugin.ts +++ b/tests/specs/plugin.ts @@ -426,6 +426,8 @@ export default testSuite(({ describe }, webpack: typeof webpack4 | typeof webpac code, map: '', warnings: [], + mangleCache: {}, + legalComments: '', }), }, }); From bd6310e0451085ff90ea84284f88caa9c5e76141 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 14:41:50 +0900 Subject: [PATCH 26/31] chore: upgrade dependencies --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index f463c022..2c2af09b 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "esbuild": "^0.17.5", "get-tsconfig": "github:privatenumber/get-tsconfig#npm/file-matcher", - "loader-utils": "^2.0.0", + "loader-utils": "^2.0.4", "webpack-sources": "^1.4.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f907c05..d0062458 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ specifiers: execa: ^6.1.0 fs-fixture: ^1.2.0 get-tsconfig: github:privatenumber/get-tsconfig#npm/file-matcher - loader-utils: ^2.0.0 + loader-utils: ^2.0.4 manten: ^0.6.1 memfs: ^3.4.13 mini-css-extract-plugin: ^1.6.2 @@ -30,7 +30,7 @@ specifiers: dependencies: esbuild: 0.17.5 get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d - loader-utils: 2.0.0 + loader-utils: 2.0.4 webpack-sources: 1.4.3 devDependencies: @@ -1829,7 +1829,7 @@ packages: webpack: ^4.27.0 || ^5.0.0 dependencies: icss-utils: 5.1.0_postcss@8.3.6 - loader-utils: 2.0.0 + loader-utils: 2.0.4 postcss: 8.3.6 postcss-modules-extract-imports: 3.0.0_postcss@8.3.6 postcss-modules-local-by-default: 4.0.0_postcss@8.3.6 @@ -3944,8 +3944,8 @@ packages: engines: {node: '>=6.11.5'} dev: true - /loader-utils/1.4.0: - resolution: {integrity: sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==} + /loader-utils/1.4.2: + resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} engines: {node: '>=4.0.0'} dependencies: big.js: 5.2.2 @@ -3953,8 +3953,8 @@ packages: json5: 1.0.1 dev: true - /loader-utils/2.0.0: - resolution: {integrity: sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==} + /loader-utils/2.0.4: + resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==} engines: {node: '>=8.9.0'} dependencies: big.js: 5.2.2 @@ -4184,7 +4184,7 @@ packages: peerDependencies: webpack: ^4.4.0 || ^5.0.0 dependencies: - loader-utils: 2.0.0 + loader-utils: 2.0.4 schema-utils: 3.1.1 webpack: 4.46.0_webpack-cli@4.10.0 webpack-sources: 1.4.3 @@ -6003,7 +6003,7 @@ packages: eslint-scope: 4.0.3 json-parse-better-errors: 1.0.2 loader-runner: 2.4.0 - loader-utils: 1.4.0 + loader-utils: 1.4.2 memory-fs: 0.4.1 micromatch: 3.1.10 mkdirp: 0.5.5 From d1ac67bcbc9580baed678d7d35492d507608621c Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 2 Feb 2023 15:51:40 +0900 Subject: [PATCH 27/31] test: handle tsconfig for first file --- src/loader.ts | 11 +++++-- tests/specs/tsconfig.ts | 64 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 7 deletions(-) diff --git a/src/loader.ts b/src/loader.ts index 324158c1..f2d1d378 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -49,9 +49,7 @@ async function ESBuildLoader( }; if (!('tsconfigRaw' in transformOptions)) { - if (fileMatcher) { - transformOptions.tsconfigRaw = fileMatcher(this.resourcePath) as TransformOptions['tsconfigRaw']; - } else { + if (!fileMatcher) { const tsconfigPath = tsconfig && path.resolve(tsconfig); foundTsconfig = ( tsconfigPath @@ -65,6 +63,13 @@ async function ESBuildLoader( fileMatcher = createFilesMatcher(foundTsconfig); } } + + if (fileMatcher) { + transformOptions.tsconfigRaw = fileMatcher( + // Doesn't include query + this.resourcePath, + ) as TransformOptions['tsconfigRaw']; + } } try { diff --git a/tests/specs/tsconfig.ts b/tests/specs/tsconfig.ts index 465a84ad..4328bdcd 100644 --- a/tests/specs/tsconfig.ts +++ b/tests/specs/tsconfig.ts @@ -20,8 +20,8 @@ export default testSuite(({ describe }) => { test('finds tsconfig.json and applies strict mode', async () => { const fixture = await createFixture({ src: { - 'index.ts': `module.exports = [${detectStrictMode}, require("./strict.ts")];`, - 'strict.ts': `module.exports = ${detectStrictMode}`, + 'index.ts': `module.exports = [${detectStrictMode}, require("./not-strict.ts")];`, + 'not-strict.ts': `module.exports = ${detectStrictMode}`, }, 'webpack.config.js': ` module.exports = { @@ -56,7 +56,7 @@ export default testSuite(({ describe }) => { strict: true, }, include: [ - 'src/strict.ts', + 'src/index.ts', ], }), }); @@ -68,7 +68,63 @@ export default testSuite(({ describe }) => { const require = createRequire(import.meta.url); expect( require(path.join(fixture.path, 'dist/main.js')), - ).toStrictEqual([false, true]); + ).toStrictEqual([true, false]); + + await fixture.rm(); + }); + + test('handles resource with query', async () => { + const fixture = await createFixture({ + src: { + 'index.ts': `module.exports = [${detectStrictMode}, require("./not-strict.ts?some-query")];`, + 'not-strict.ts': `module.exports = ${detectStrictMode}`, + }, + 'webpack.config.js': ` + module.exports = { + mode: 'production', + + optimization: { + minimize: false, + }, + + resolveLoader: { + alias: { + 'esbuild-loader': ${JSON.stringify(esbuildLoader)}, + }, + }, + + module: { + rules: [{ + test: /\\.ts$/, + loader: 'esbuild-loader', + }], + }, + + entry: './src/index.ts', + + output: { + libraryTarget: 'commonjs2', + }, + }; + `, + 'tsconfig.json': JSON.stringify({ + compilerOptions: { + strict: true, + }, + include: [ + 'src/index.ts', + ], + }), + }); + + await execa(webpackCli, { + cwd: fixture.path, + }); + + const require = createRequire(import.meta.url); + expect( + require(path.join(fixture.path, 'dist/main.js')), + ).toStrictEqual([true, false]); await fixture.rm(); }); From da5b5269f35eaaaac538afe18894e91e00cadfa0 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 8 Feb 2023 07:37:24 +0900 Subject: [PATCH 28/31] chore: use stable get-tsconfig --- package.json | 2 +- pnpm-lock.yaml | 46 +++++++++++++++++----------------------------- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 2c2af09b..93db53e8 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "esbuild": "^0.17.5", - "get-tsconfig": "github:privatenumber/get-tsconfig#npm/file-matcher", + "get-tsconfig": "^4.4.0", "loader-utils": "^2.0.4", "webpack-sources": "^1.4.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d0062458..716d9645 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ specifiers: eslint: ^8.33.0 execa: ^6.1.0 fs-fixture: ^1.2.0 - get-tsconfig: github:privatenumber/get-tsconfig#npm/file-matcher + get-tsconfig: ^4.4.0 loader-utils: ^2.0.4 manten: ^0.6.1 memfs: ^3.4.13 @@ -29,7 +29,7 @@ specifiers: dependencies: esbuild: 0.17.5 - get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d + get-tsconfig: 4.4.0 loader-utils: 2.0.4 webpack-sources: 1.4.3 @@ -545,13 +545,13 @@ packages: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: '@types/eslint': 8.4.10 - '@types/estree': 0.0.51 + '@types/estree': 1.0.0 dev: true /@types/eslint/8.4.10: resolution: {integrity: sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==} dependencies: - '@types/estree': 0.0.51 + '@types/estree': 1.0.0 '@types/json-schema': 7.0.11 dev: true @@ -1117,12 +1117,6 @@ packages: hasBin: true dev: true - /acorn/8.8.1: - resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /acorn/8.8.2: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} engines: {node: '>=0.4.0'} @@ -2398,7 +2392,7 @@ packages: enhanced-resolve: 5.12.0 eslint: 8.33.0 eslint-plugin-import: 2.27.4_i5n76ortidj3h7iqerugswgd3q - get-tsconfig: 4.3.0 + get-tsconfig: 4.4.0 globby: 13.1.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -3108,9 +3102,8 @@ packages: get-intrinsic: 1.1.3 dev: true - /get-tsconfig/4.3.0: - resolution: {integrity: sha512-YCcF28IqSay3fqpIu5y3Krg/utCBHBeoflkZyHj/QcqI2nrLPC3ZegS9CmIo+hJb8K7aiGsuUl7PwWVjNG2HQQ==} - dev: true + /get-tsconfig/4.4.0: + resolution: {integrity: sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ==} /get-value/2.0.6: resolution: {integrity: sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=} @@ -3884,7 +3877,7 @@ packages: resolution: {integrity: sha512-qCRJWlbP2v6HbmKW7R3lFbeiVWHo+oMJ0j+MizwvauqnCV/EvtAeEeuCgoc/ErtsuoKgYB8U4Ih8AxJbXoE6/g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.8.1 + acorn: 8.8.2 eslint-visitor-keys: 3.3.0 espree: 9.4.1 semver: 7.3.8 @@ -5598,7 +5591,7 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - acorn: 8.8.1 + acorn: 8.8.2 commander: 2.20.3 source-map: 0.6.1 source-map-support: 0.5.21 @@ -6136,22 +6129,22 @@ packages: engines: {node: '>=10'} dev: true - github.com/esbuild-kit/cjs-loader/592345ba978c64c98bd3f2797904335f17c7ec0c: - resolution: {tarball: https://codeload.github.com/esbuild-kit/cjs-loader/tar.gz/592345ba978c64c98bd3f2797904335f17c7ec0c} + github.com/esbuild-kit/cjs-loader/bd6cd2b5785abf86bb0912624a0c4c6c7a278fd6: + resolution: {tarball: https://codeload.github.com/esbuild-kit/cjs-loader/tar.gz/bd6cd2b5785abf86bb0912624a0c4c6c7a278fd6} name: '@esbuild-kit/cjs-loader' version: 0.0.0-semantic-release dependencies: '@esbuild-kit/core-utils': 3.0.0 - get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d + get-tsconfig: 4.4.0 dev: true - github.com/esbuild-kit/esm-loader/bba6380ec81039dd5e41b0e5be491a7149393f7f: - resolution: {tarball: https://codeload.github.com/esbuild-kit/esm-loader/tar.gz/bba6380ec81039dd5e41b0e5be491a7149393f7f} + github.com/esbuild-kit/esm-loader/975ebc01ae671bc282f82cdaa2bee557d8e59510: + resolution: {tarball: https://codeload.github.com/esbuild-kit/esm-loader/tar.gz/975ebc01ae671bc282f82cdaa2bee557d8e59510} name: '@esbuild-kit/esm-loader' version: 0.0.0-semantic-release dependencies: '@esbuild-kit/core-utils': 3.0.0 - get-tsconfig: github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d + get-tsconfig: 4.4.0 dev: true github.com/esbuild-kit/tsx/0276e1aefd83ecf151e43c74b5402c1b296af1f7: @@ -6160,14 +6153,9 @@ packages: version: 0.0.0-semantic-release hasBin: true dependencies: - '@esbuild-kit/cjs-loader': github.com/esbuild-kit/cjs-loader/592345ba978c64c98bd3f2797904335f17c7ec0c + '@esbuild-kit/cjs-loader': github.com/esbuild-kit/cjs-loader/bd6cd2b5785abf86bb0912624a0c4c6c7a278fd6 '@esbuild-kit/core-utils': 3.0.0 - '@esbuild-kit/esm-loader': github.com/esbuild-kit/esm-loader/bba6380ec81039dd5e41b0e5be491a7149393f7f + '@esbuild-kit/esm-loader': github.com/esbuild-kit/esm-loader/975ebc01ae671bc282f82cdaa2bee557d8e59510 optionalDependencies: fsevents: 2.3.2 dev: true - - github.com/privatenumber/get-tsconfig/2a9640126cbcea030c9d2e762f5b4411136b296d: - resolution: {tarball: https://codeload.github.com/privatenumber/get-tsconfig/tar.gz/2a9640126cbcea030c9d2e762f5b4411136b296d} - name: get-tsconfig - version: 0.0.0-semantic-release From a1b793d1b814c2c8df0a4bdc17f1b7e7582e6923 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 8 Feb 2023 07:39:37 +0900 Subject: [PATCH 29/31] chore: use stable tsx --- package.json | 2 +- pnpm-lock.yaml | 60 +++++++++++++++++++++++--------------------------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 93db53e8..5819a678 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "memfs": "^3.4.13", "mini-css-extract-plugin": "^1.6.2", "pkgroll": "^1.8.2", - "tsx": "github:esbuild-kit/tsx#npm/ts-file-matcher", + "tsx": "^3.12.3", "typescript": "^4.9.5", "webpack": "^4.44.2", "webpack-cli": "^4.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 716d9645..ebb5a933 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ specifiers: memfs: ^3.4.13 mini-css-extract-plugin: ^1.6.2 pkgroll: ^1.8.2 - tsx: github:esbuild-kit/tsx#npm/ts-file-matcher + tsx: ^3.12.3 typescript: ^4.9.5 webpack: ^4.44.2 webpack-cli: ^4.10.0 @@ -49,7 +49,7 @@ devDependencies: memfs: 3.4.13 mini-css-extract-plugin: 1.6.2_webpack@4.46.0 pkgroll: 1.8.2_typescript@4.9.5 - tsx: github.com/esbuild-kit/tsx/0276e1aefd83ecf151e43c74b5402c1b296af1f7 + tsx: 3.12.3 typescript: 4.9.5 webpack: 4.46.0_webpack-cli@4.10.0 webpack-cli: 4.10.0_webpack@4.46.0 @@ -84,6 +84,13 @@ packages: engines: {node: '>=10.0.0'} dev: true + /@esbuild-kit/cjs-loader/2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.0.0 + get-tsconfig: 4.4.0 + dev: true + /@esbuild-kit/core-utils/3.0.0: resolution: {integrity: sha512-TXmwH9EFS3DC2sI2YJWJBgHGhlteK0Xyu1VabwetMULfm3oYhbrsWV5yaSr2NTWZIgDGVLHbRf0inxbjXqAcmQ==} dependencies: @@ -91,6 +98,13 @@ packages: source-map-support: 0.5.21 dev: true + /@esbuild-kit/esm-loader/2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.0.0 + get-tsconfig: 4.4.0 + dev: true + /@esbuild/android-arm/0.15.18: resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==} engines: {node: '>=12'} @@ -5696,6 +5710,17 @@ packages: typescript: 4.9.5 dev: true + /tsx/3.12.3: + resolution: {integrity: sha512-Wc5BFH1xccYTXaQob+lEcimkcb/Pq+0en2s+ruiX0VEIC80nV7/0s7XRahx8NnsoCnpCVUPz8wrqVSPi760LkA==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.0.0 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /tty-browserify/0.0.0: resolution: {integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=} dev: true @@ -6128,34 +6153,3 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true - - github.com/esbuild-kit/cjs-loader/bd6cd2b5785abf86bb0912624a0c4c6c7a278fd6: - resolution: {tarball: https://codeload.github.com/esbuild-kit/cjs-loader/tar.gz/bd6cd2b5785abf86bb0912624a0c4c6c7a278fd6} - name: '@esbuild-kit/cjs-loader' - version: 0.0.0-semantic-release - dependencies: - '@esbuild-kit/core-utils': 3.0.0 - get-tsconfig: 4.4.0 - dev: true - - github.com/esbuild-kit/esm-loader/975ebc01ae671bc282f82cdaa2bee557d8e59510: - resolution: {tarball: https://codeload.github.com/esbuild-kit/esm-loader/tar.gz/975ebc01ae671bc282f82cdaa2bee557d8e59510} - name: '@esbuild-kit/esm-loader' - version: 0.0.0-semantic-release - dependencies: - '@esbuild-kit/core-utils': 3.0.0 - get-tsconfig: 4.4.0 - dev: true - - github.com/esbuild-kit/tsx/0276e1aefd83ecf151e43c74b5402c1b296af1f7: - resolution: {tarball: https://codeload.github.com/esbuild-kit/tsx/tar.gz/0276e1aefd83ecf151e43c74b5402c1b296af1f7} - name: tsx - version: 0.0.0-semantic-release - hasBin: true - dependencies: - '@esbuild-kit/cjs-loader': github.com/esbuild-kit/cjs-loader/bd6cd2b5785abf86bb0912624a0c4c6c7a278fd6 - '@esbuild-kit/core-utils': 3.0.0 - '@esbuild-kit/esm-loader': github.com/esbuild-kit/esm-loader/975ebc01ae671bc282f82cdaa2bee557d8e59510 - optionalDependencies: - fsevents: 2.3.2 - dev: true From e4441d167083e275b29c90b27a98a4a6022fedd5 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 8 Feb 2023 11:39:22 +0900 Subject: [PATCH 30/31] chore: update repository url --- .github/ISSUE_TEMPLATE/config.yml | 2 +- README.md | 8 ++++---- package.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 40add31d..a698dbe3 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: Help / Questions / Discussions - url: https://github.com/privatenumber/esbuild-loader/discussions + url: https://github.com/esbuild-kit/esbuild-loader/discussions about: Use GitHub Discussions for anything else diff --git a/README.md b/README.md index e4371ad9..135a1149 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ Speed up your Webpack build with [esbuild](https://github.com/evanw/esbuild)! [_esbuild_](https://github.com/evanw/esbuild) is a JavaScript bundler written in Go that supports blazing fast ESNext & TypeScript transpilation and [JS minification](https://github.com/privatenumber/minification-benchmarks/). -[_esbuild-loader_](https://github.com/privatenumber/esbuild-loader) lets you harness the speed of esbuild in your Webpack build by offering faster alternatives for transpilation (eg. babel-loader/ts-loader) and minification (eg. Terser)! +[_esbuild-loader_](https://github.com/esbuild-kit/esbuild-loader) lets you harness the speed of esbuild in your Webpack build by offering faster alternatives for transpilation (eg. babel-loader/ts-loader) and minification (eg. Terser)! -Curious how much faster your build will be? See [what users are saying](https://github.com/privatenumber/esbuild-loader/discussions/138). +Curious how much faster your build will be? See [what users are saying](https://github.com/esbuild-kit/esbuild-loader/discussions/138). --- @@ -191,7 +191,7 @@ In `webpack.config.js`: ``` ### Examples -If you'd like to see working Webpack builds that use esbuild-loader for basic JS, React, TypeScript, or Next.js, check out the [examples repo](https://github.com/privatenumber/esbuild-loader-examples). +If you'd like to see working Webpack builds that use esbuild-loader for basic JS, React, TypeScript, or Next.js, check out the [examples repo](https://github.com/esbuild-kit/esbuild-loader-examples). ### Bring your own esbuild (Advanced) @@ -389,7 +389,7 @@ No. The `inject` option is only available in the build API. And esbuild-loader u However, you can use the Webpack equivalent [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/) instead. -If you're using React, check out [this example](https://github.com/privatenumber/esbuild-loader-examples/blob/52ca91b8cb2080de5fc63cc6e9371abfefe1f823/examples/react/webpack.config.js#L39-L41) on how to auto-import React in your components. +If you're using React, check out [this example](https://github.com/esbuild-kit/esbuild-loader-examples/blob/52ca91b8cb2080de5fc63cc6e9371abfefe1f823/examples/react/webpack.config.js#L39-L41) on how to auto-import React in your components. ### Is it possible to use Babel plugins? No. If you really need them, consider porting them over to a Webpack loader. diff --git a/package.json b/package.json index 5819a678..aabdbd65 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "esnext" ], "license": "MIT", - "repository": "privatenumber/esbuild-loader", - "funding": "https://github.com/privatenumber/esbuild-loader?sponsor=1", + "repository": "esbuild-kit/esbuild-loader", + "funding": "https://github.com/esbuild-kit/esbuild-loader?sponsor=1", "author": { "name": "Hiroki Osame", "email": "hiroki.osame@gmail.com" From 6999a7fee76262434f1cdff4d79f2e4c10795392 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Wed, 8 Feb 2023 12:15:05 +0900 Subject: [PATCH 31/31] chore: upgrade esbuild --- package.json | 4 +- pnpm-lock.yaml | 218 ++++++++++++++++++++++++------------------------- 2 files changed, 111 insertions(+), 111 deletions(-) diff --git a/package.json b/package.json index aabdbd65..5da467f6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "webpack": "^4.40.0 || ^5.0.0" }, "dependencies": { - "esbuild": "^0.17.5", + "esbuild": "^0.17.6", "get-tsconfig": "^4.4.0", "loader-utils": "^2.0.4", "webpack-sources": "^1.4.3" @@ -57,7 +57,7 @@ "@pvtnbr/eslint-config": "^0.33.0", "@types/loader-utils": "^2.0.3", "@types/mini-css-extract-plugin": "2.4.0", - "@types/node": "^18.11.18", + "@types/node": "^18.13.0", "@types/webpack": "^4.41.33", "@types/webpack-sources": "^0.1.9", "clean-pkg-json": "^1.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ebb5a933..cd65dfbf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,12 +4,12 @@ specifiers: '@pvtnbr/eslint-config': ^0.33.0 '@types/loader-utils': ^2.0.3 '@types/mini-css-extract-plugin': 2.4.0 - '@types/node': ^18.11.18 + '@types/node': ^18.13.0 '@types/webpack': ^4.41.33 '@types/webpack-sources': ^0.1.9 clean-pkg-json: ^1.2.0 css-loader: ^5.2.7 - esbuild: ^0.17.5 + esbuild: ^0.17.6 eslint: ^8.33.0 execa: ^6.1.0 fs-fixture: ^1.2.0 @@ -28,7 +28,7 @@ specifiers: webpack5: npm:webpack@^5.0.0 dependencies: - esbuild: 0.17.5 + esbuild: 0.17.6 get-tsconfig: 4.4.0 loader-utils: 2.0.4 webpack-sources: 1.4.3 @@ -36,8 +36,8 @@ dependencies: devDependencies: '@pvtnbr/eslint-config': 0.33.0_4vsywjlpuriuw3tl5oq6zy5a64 '@types/loader-utils': 2.0.3 - '@types/mini-css-extract-plugin': 2.4.0_36zrqstrtvtlfjqucbku36jfyq - '@types/node': 18.11.18 + '@types/mini-css-extract-plugin': 2.4.0_ohclvk7ayfy3uyv3dke4wuc7uq + '@types/node': 18.13.0 '@types/webpack': 4.41.33 '@types/webpack-sources': 0.1.9 clean-pkg-json: 1.2.0 @@ -54,7 +54,7 @@ devDependencies: webpack: 4.46.0_webpack-cli@4.10.0 webpack-cli: 4.10.0_webpack@4.46.0 webpack-test-utils: 2.1.0_webpack@4.46.0 - webpack5: /webpack/5.75.0_36zrqstrtvtlfjqucbku36jfyq + webpack5: /webpack/5.75.0_ohclvk7ayfy3uyv3dke4wuc7uq packages: @@ -114,80 +114,80 @@ packages: dev: true optional: true - /@esbuild/android-arm/0.17.5: - resolution: {integrity: sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==} + /@esbuild/android-arm/0.17.6: + resolution: {integrity: sha512-bSC9YVUjADDy1gae8RrioINU6e1lCkg3VGVwm0QQ2E1CWcC4gnMce9+B6RpxuSsrsXsk1yojn7sp1fnG8erE2g==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true optional: true - /@esbuild/android-arm64/0.17.5: - resolution: {integrity: sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==} + /@esbuild/android-arm64/0.17.6: + resolution: {integrity: sha512-YnYSCceN/dUzUr5kdtUzB+wZprCafuD89Hs0Aqv9QSdwhYQybhXTaSTcrl6X/aWThn1a/j0eEpUBGOE7269REg==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@esbuild/android-x64/0.17.5: - resolution: {integrity: sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==} + /@esbuild/android-x64/0.17.6: + resolution: {integrity: sha512-MVcYcgSO7pfu/x34uX9u2QIZHmXAB7dEiLQC5bBl5Ryqtpj9lT2sg3gNDEsrPEmimSJW2FXIaxqSQ501YLDsZQ==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true optional: true - /@esbuild/darwin-arm64/0.17.5: - resolution: {integrity: sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==} + /@esbuild/darwin-arm64/0.17.6: + resolution: {integrity: sha512-bsDRvlbKMQMt6Wl08nHtFz++yoZHsyTOxnjfB2Q95gato+Yi4WnRl13oC2/PJJA9yLCoRv9gqT/EYX0/zDsyMA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@esbuild/darwin-x64/0.17.5: - resolution: {integrity: sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==} + /@esbuild/darwin-x64/0.17.6: + resolution: {integrity: sha512-xh2A5oPrYRfMFz74QXIQTQo8uA+hYzGWJFoeTE8EvoZGHb+idyV4ATaukaUvnnxJiauhs/fPx3vYhU4wiGfosg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@esbuild/freebsd-arm64/0.17.5: - resolution: {integrity: sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==} + /@esbuild/freebsd-arm64/0.17.6: + resolution: {integrity: sha512-EnUwjRc1inT4ccZh4pB3v1cIhohE2S4YXlt1OvI7sw/+pD+dIE4smwekZlEPIwY6PhU6oDWwITrQQm5S2/iZgg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true optional: true - /@esbuild/freebsd-x64/0.17.5: - resolution: {integrity: sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==} + /@esbuild/freebsd-x64/0.17.6: + resolution: {integrity: sha512-Uh3HLWGzH6FwpviUcLMKPCbZUAFzv67Wj5MTwK6jn89b576SR2IbEp+tqUHTr8DIl0iDmBAf51MVaP7pw6PY5Q==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true optional: true - /@esbuild/linux-arm/0.17.5: - resolution: {integrity: sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==} + /@esbuild/linux-arm/0.17.6: + resolution: {integrity: sha512-7YdGiurNt7lqO0Bf/U9/arrPWPqdPqcV6JCZda4LZgEn+PTQ5SMEI4MGR52Bfn3+d6bNEGcWFzlIxiQdS48YUw==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-arm64/0.17.5: - resolution: {integrity: sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==} + /@esbuild/linux-arm64/0.17.6: + resolution: {integrity: sha512-bUR58IFOMJX523aDVozswnlp5yry7+0cRLCXDsxnUeQYJik1DukMY+apBsLOZJblpH+K7ox7YrKrHmJoWqVR9w==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-ia32/0.17.5: - resolution: {integrity: sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==} + /@esbuild/linux-ia32/0.17.6: + resolution: {integrity: sha512-ujp8uoQCM9FRcbDfkqECoARsLnLfCUhKARTP56TFPog8ie9JG83D5GVKjQ6yVrEVdMie1djH86fm98eY3quQkQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -203,96 +203,96 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.17.5: - resolution: {integrity: sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==} + /@esbuild/linux-loong64/0.17.6: + resolution: {integrity: sha512-y2NX1+X/Nt+izj9bLoiaYB9YXT/LoaQFYvCkVD77G/4F+/yuVXYCWz4SE9yr5CBMbOxOfBcy/xFL4LlOeNlzYQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-mips64el/0.17.5: - resolution: {integrity: sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==} + /@esbuild/linux-mips64el/0.17.6: + resolution: {integrity: sha512-09AXKB1HDOzXD+j3FdXCiL/MWmZP0Ex9eR8DLMBVcHorrWJxWmY8Nms2Nm41iRM64WVx7bA/JVHMv081iP2kUA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-ppc64/0.17.5: - resolution: {integrity: sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==} + /@esbuild/linux-ppc64/0.17.6: + resolution: {integrity: sha512-AmLhMzkM8JuqTIOhxnX4ubh0XWJIznEynRnZAVdA2mMKE6FAfwT2TWKTwdqMG+qEaeyDPtfNoZRpJbD4ZBv0Tg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-riscv64/0.17.5: - resolution: {integrity: sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==} + /@esbuild/linux-riscv64/0.17.6: + resolution: {integrity: sha512-Y4Ri62PfavhLQhFbqucysHOmRamlTVK10zPWlqjNbj2XMea+BOs4w6ASKwQwAiqf9ZqcY9Ab7NOU4wIgpxwoSQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-s390x/0.17.5: - resolution: {integrity: sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==} + /@esbuild/linux-s390x/0.17.6: + resolution: {integrity: sha512-SPUiz4fDbnNEm3JSdUW8pBJ/vkop3M1YwZAVwvdwlFLoJwKEZ9L98l3tzeyMzq27CyepDQ3Qgoba44StgbiN5Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-x64/0.17.5: - resolution: {integrity: sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==} + /@esbuild/linux-x64/0.17.6: + resolution: {integrity: sha512-a3yHLmOodHrzuNgdpB7peFGPx1iJ2x6m+uDvhP2CKdr2CwOaqEFMeSqYAHU7hG+RjCq8r2NFujcd/YsEsFgTGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@esbuild/netbsd-x64/0.17.5: - resolution: {integrity: sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==} + /@esbuild/netbsd-x64/0.17.6: + resolution: {integrity: sha512-EanJqcU/4uZIBreTrnbnre2DXgXSa+Gjap7ifRfllpmyAU7YMvaXmljdArptTHmjrkkKm9BK6GH5D5Yo+p6y5A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true optional: true - /@esbuild/openbsd-x64/0.17.5: - resolution: {integrity: sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==} + /@esbuild/openbsd-x64/0.17.6: + resolution: {integrity: sha512-xaxeSunhQRsTNGFanoOkkLtnmMn5QbA0qBhNet/XLVsc+OVkpIWPHcr3zTW2gxVU5YOHFbIHR9ODuaUdNza2Vw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true optional: true - /@esbuild/sunos-x64/0.17.5: - resolution: {integrity: sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==} + /@esbuild/sunos-x64/0.17.6: + resolution: {integrity: sha512-gnMnMPg5pfMkZvhHee21KbKdc6W3GR8/JuE0Da1kjwpK6oiFU3nqfHuVPgUX2rsOx9N2SadSQTIYV1CIjYG+xw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true optional: true - /@esbuild/win32-arm64/0.17.5: - resolution: {integrity: sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==} + /@esbuild/win32-arm64/0.17.6: + resolution: {integrity: sha512-G95n7vP1UnGJPsVdKXllAJPtqjMvFYbN20e8RK8LVLhlTiSOH1sd7+Gt7rm70xiG+I5tM58nYgwWrLs6I1jHqg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@esbuild/win32-ia32/0.17.5: - resolution: {integrity: sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==} + /@esbuild/win32-ia32/0.17.6: + resolution: {integrity: sha512-96yEFzLhq5bv9jJo5JhTs1gI+1cKQ83cUpyxHuGqXVwQtY5Eq54ZEsKs8veKtiKwlrNimtckHEkj4mRh4pPjsg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@esbuild/win32-x64/0.17.5: - resolution: {integrity: sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==} + /@esbuild/win32-x64/0.17.6: + resolution: {integrity: sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -357,7 +357,7 @@ packages: '@jest/schemas': 29.4.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.11.18 + '@types/node': 18.13.0 '@types/yargs': 17.0.22 chalk: 4.1.2 dev: true @@ -558,14 +558,14 @@ packages: /@types/eslint-scope/3.7.4: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: - '@types/eslint': 8.4.10 - '@types/estree': 1.0.0 + '@types/eslint': 8.21.0 + '@types/estree': 0.0.51 dev: true - /@types/eslint/8.4.10: - resolution: {integrity: sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==} + /@types/eslint/8.21.0: + resolution: {integrity: sha512-35EhHNOXgxnUgh4XCJsGhE7zdlDhYDN/aMG6UbkByCFFNgQ7b3U+uVoqBpicFydR8JEfgdjCF7SJ7MiJfzuiTA==} dependencies: - '@types/estree': 1.0.0 + '@types/estree': 0.0.51 '@types/json-schema': 7.0.11 dev: true @@ -608,7 +608,7 @@ packages: /@types/loader-utils/2.0.3: resolution: {integrity: sha512-sDXXzZnTLXgdso54/iOpAFSDgqhVXabCvwGAt77Agadh/Xk0QYgOk520r3tpOouI098gyqGIFywx8Op1voc3vQ==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 '@types/webpack': 4.41.33 dev: true @@ -618,12 +618,12 @@ packages: '@types/unist': 2.0.6 dev: true - /@types/mini-css-extract-plugin/2.4.0_36zrqstrtvtlfjqucbku36jfyq: + /@types/mini-css-extract-plugin/2.4.0_ohclvk7ayfy3uyv3dke4wuc7uq: resolution: {integrity: sha512-1Pq4i+2+c8jncxfX5k7BzPIEoyrq+n7L319zMxiLUH4RlWTGcQJjemtMftLQnoTt21oHhZE0PjXd2W1xM1m4Hg==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 tapable: 2.2.1 - webpack: 5.75.0_36zrqstrtvtlfjqucbku36jfyq + webpack: 5.75.0_ohclvk7ayfy3uyv3dke4wuc7uq transitivePeerDependencies: - '@swc/core' - esbuild @@ -631,8 +631,8 @@ packages: - webpack-cli dev: true - /@types/node/18.11.18: - resolution: {integrity: sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==} + /@types/node/18.13.0: + resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==} dev: true /@types/normalize-package-data/2.4.1: @@ -642,7 +642,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 dev: true /@types/semver/7.3.13: @@ -674,7 +674,7 @@ packages: /@types/webpack-sources/0.1.9: resolution: {integrity: sha512-bvzMnzqoK16PQIC8AYHNdW45eREJQMd6WG/msQWX5V2+vZmODCOPb4TJcbgRljTZZTwTM4wUMcsI8FftNA7new==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 '@types/source-list-map': 0.1.2 source-map: 0.6.1 dev: true @@ -682,7 +682,7 @@ packages: /@types/webpack-sources/3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -690,7 +690,7 @@ packages: /@types/webpack/4.41.33: resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 '@types/tapable': 1.0.8 '@types/uglify-js': 3.13.1 '@types/webpack-sources': 3.2.0 @@ -1470,9 +1470,9 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001450 - electron-to-chromium: 1.4.284 - node-releases: 2.0.9 + caniuse-lite: 1.0.30001451 + electron-to-chromium: 1.4.289 + node-releases: 2.0.10 update-browserslist-db: 1.0.10_browserslist@4.21.5 dev: true @@ -1548,8 +1548,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite/1.0.30001450: - resolution: {integrity: sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==} + /caniuse-lite/1.0.30001451: + resolution: {integrity: sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==} dev: true /chalk/2.4.2: @@ -1997,8 +1997,8 @@ packages: stream-shift: 1.0.1 dev: true - /electron-to-chromium/1.4.284: - resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} + /electron-to-chromium/1.4.289: + resolution: {integrity: sha512-relLdMfPBxqGCxy7Gyfm1HcbRPcFUJdlgnCPVgQ23sr1TvUrRJz0/QPoGP0+x41wOVSTN/Wi3w6YDgHiHJGOzg==} dev: true /elliptic/6.5.4: @@ -2336,34 +2336,34 @@ packages: esbuild-windows-arm64: 0.15.18 dev: true - /esbuild/0.17.5: - resolution: {integrity: sha512-Bu6WLCc9NMsNoMJUjGl3yBzTjVLXdysMltxQWiLAypP+/vQrf+3L1Xe8fCXzxaECus2cEJ9M7pk4yKatEwQMqQ==} + /esbuild/0.17.6: + resolution: {integrity: sha512-TKFRp9TxrJDdRWfSsSERKEovm6v30iHnrjlcGhLBOtReE28Yp1VSBRfO3GTaOFMoxsNerx4TjrhzSuma9ha83Q==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.5 - '@esbuild/android-arm64': 0.17.5 - '@esbuild/android-x64': 0.17.5 - '@esbuild/darwin-arm64': 0.17.5 - '@esbuild/darwin-x64': 0.17.5 - '@esbuild/freebsd-arm64': 0.17.5 - '@esbuild/freebsd-x64': 0.17.5 - '@esbuild/linux-arm': 0.17.5 - '@esbuild/linux-arm64': 0.17.5 - '@esbuild/linux-ia32': 0.17.5 - '@esbuild/linux-loong64': 0.17.5 - '@esbuild/linux-mips64el': 0.17.5 - '@esbuild/linux-ppc64': 0.17.5 - '@esbuild/linux-riscv64': 0.17.5 - '@esbuild/linux-s390x': 0.17.5 - '@esbuild/linux-x64': 0.17.5 - '@esbuild/netbsd-x64': 0.17.5 - '@esbuild/openbsd-x64': 0.17.5 - '@esbuild/sunos-x64': 0.17.5 - '@esbuild/win32-arm64': 0.17.5 - '@esbuild/win32-ia32': 0.17.5 - '@esbuild/win32-x64': 0.17.5 + '@esbuild/android-arm': 0.17.6 + '@esbuild/android-arm64': 0.17.6 + '@esbuild/android-x64': 0.17.6 + '@esbuild/darwin-arm64': 0.17.6 + '@esbuild/darwin-x64': 0.17.6 + '@esbuild/freebsd-arm64': 0.17.6 + '@esbuild/freebsd-x64': 0.17.6 + '@esbuild/linux-arm': 0.17.6 + '@esbuild/linux-arm64': 0.17.6 + '@esbuild/linux-ia32': 0.17.6 + '@esbuild/linux-loong64': 0.17.6 + '@esbuild/linux-mips64el': 0.17.6 + '@esbuild/linux-ppc64': 0.17.6 + '@esbuild/linux-riscv64': 0.17.6 + '@esbuild/linux-s390x': 0.17.6 + '@esbuild/linux-x64': 0.17.6 + '@esbuild/netbsd-x64': 0.17.6 + '@esbuild/openbsd-x64': 0.17.6 + '@esbuild/sunos-x64': 0.17.6 + '@esbuild/win32-arm64': 0.17.6 + '@esbuild/win32-ia32': 0.17.6 + '@esbuild/win32-x64': 0.17.6 /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -3815,7 +3815,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.4.1 - '@types/node': 18.11.18 + '@types/node': 18.13.0 chalk: 4.1.2 ci-info: 3.7.1 graceful-fs: 4.2.10 @@ -3826,7 +3826,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.13.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -4342,8 +4342,8 @@ packages: vm-browserify: 1.1.2 dev: true - /node-releases/2.0.9: - resolution: {integrity: sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==} + /node-releases/2.0.10: + resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} dev: true /normalize-package-data/2.5.0: @@ -5575,7 +5575,7 @@ packages: worker-farm: 1.7.0 dev: true - /terser-webpack-plugin/5.3.6_3uh7kx4cv3zeqb5i3youudagse: + /terser-webpack-plugin/5.3.6_udn22o2mnsfwuon4ib23qoy3z4: resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -5592,12 +5592,12 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.17 - esbuild: 0.17.5 + esbuild: 0.17.6 jest-worker: 27.5.1 schema-utils: 3.1.1 serialize-javascript: 6.0.1 - terser: 5.16.2 - webpack: 5.75.0_36zrqstrtvtlfjqucbku36jfyq + terser: 5.16.3 + webpack: 5.75.0_ohclvk7ayfy3uyv3dke4wuc7uq dev: true /terser/4.8.1: @@ -5611,8 +5611,8 @@ packages: source-map-support: 0.5.21 dev: true - /terser/5.16.2: - resolution: {integrity: sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg==} + /terser/5.16.3: + resolution: {integrity: sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q==} engines: {node: '>=10'} hasBin: true dependencies: @@ -6037,7 +6037,7 @@ packages: - supports-color dev: true - /webpack/5.75.0_36zrqstrtvtlfjqucbku36jfyq: + /webpack/5.75.0_ohclvk7ayfy3uyv3dke4wuc7uq: resolution: {integrity: sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -6068,7 +6068,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 - terser-webpack-plugin: 5.3.6_3uh7kx4cv3zeqb5i3youudagse + terser-webpack-plugin: 5.3.6_udn22o2mnsfwuon4ib23qoy3z4 watchpack: 2.4.0 webpack-cli: 4.10.0_webpack@4.46.0 webpack-sources: 3.2.3