From 5c58015f24ab75fb573de0004a10e0253ba1e41e Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Sun, 15 May 2022 12:57:25 -0400 Subject: [PATCH 1/3] build(tsconfig): skipLibCheck --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 84ced428..1e84caf7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,8 @@ "declaration": true, "noUnusedLocals": true, "noUnusedParameters": true, - "esModuleInterop": true + "esModuleInterop": true, + "skipLibCheck": true }, "include": ["src"] } From ae3ddcc361e342490defcbff55cab5ce46e7fe53 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Sun, 15 May 2022 13:00:46 -0400 Subject: [PATCH 2/3] test: test built --- .github/workflows/release.yml | 4 +--- package.json | 1 + test/loader.test.ts | 2 +- test/minify.test.ts | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd202de2..09804904 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,9 +19,7 @@ jobs: - name: Install dependencies run: npx ci - name: Test - run: npm run test --if-present - - name: Build - run: npm run build --if-present + run: npm run test - name: Release env: GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/package.json b/package.json index 3155d2d7..9ed51d22 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "main": "dist/index.js", "scripts": { "build": "tsc", + "pretest": "npm run build", "test": "jest --coverage", "lint": "eslint ." }, diff --git a/test/loader.test.ts b/test/loader.test.ts index 600c3a58..34812670 100644 --- a/test/loader.test.ts +++ b/test/loader.test.ts @@ -1,7 +1,7 @@ import webpack4 from 'webpack'; import webpack5 from 'webpack5'; import { build } from 'webpack-test-utils'; -import { MinifyPluginOptions } from '../src/interfaces'; +import { MinifyPluginOptions } from '../dist/interfaces'; import * as fixtures from './fixtures'; import { configureEsbuildLoader } from './utils'; diff --git a/test/minify.test.ts b/test/minify.test.ts index 4e472d03..0d35ba85 100644 --- a/test/minify.test.ts +++ b/test/minify.test.ts @@ -4,8 +4,8 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { RawSource } from 'webpack-sources'; import * as esbuild from 'esbuild'; import { build } from 'webpack-test-utils'; -import { MinifyPluginOptions } from '../src/interfaces'; -import { ESBuildMinifyPlugin } from '../src/index'; +import { MinifyPluginOptions } from '../dist/interfaces'; +import { ESBuildMinifyPlugin } from '../dist/index'; // import { build, getFile } from './utils'; import * as fixtures from './fixtures'; import { configureEsbuildLoader } from './utils'; From 077efbde9ed985a3e60535e6ecd5db8fe2756e1b Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Sun, 15 May 2022 13:01:34 -0400 Subject: [PATCH 3/3] build: upgrade typescript --- package.json | 2 +- pnpm-lock.yaml | 60 +++++++++++++++++++++++++------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 9ed51d22..18d0eb80 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "lint-staged": "^12.1.2", "memfs": "^3.4.0", "mini-css-extract-plugin": "^1.4.0", - "typescript": "^4.5.4", + "typescript": "^4.6.4", "unionfs": "^4.4.0", "webpack": "^4.44.2", "webpack-test-utils": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 477a4cca..5ad996b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,7 +17,7 @@ specifiers: memfs: ^3.4.0 mini-css-extract-plugin: ^1.4.0 tapable: ^2.2.0 - typescript: ^4.5.4 + typescript: ^4.6.4 unionfs: ^4.4.0 webpack: ^4.44.2 webpack-sources: ^2.2.0 @@ -33,7 +33,7 @@ dependencies: webpack-sources: 2.3.1 devDependencies: - '@pvtnbr/eslint-config': 0.22.0_gvlnzj7fcypfemxddb7m5xtmju + '@pvtnbr/eslint-config': 0.22.0_hcfsmds2fshutdssjqluwm76uu '@types/jest': 27.0.3 '@types/loader-utils': 2.0.3 '@types/webpack': 4.41.32 @@ -44,7 +44,7 @@ devDependencies: lint-staged: 12.1.2 memfs: 3.4.0 mini-css-extract-plugin: 1.6.2_webpack@4.46.0 - typescript: 4.5.4 + typescript: 4.6.4 unionfs: 4.4.0 webpack: 4.46.0 webpack-test-utils: 1.1.0_webpack@4.46.0 @@ -668,13 +668,13 @@ packages: fastq: 1.13.0 dev: true - /@pvtnbr/eslint-config/0.22.0_gvlnzj7fcypfemxddb7m5xtmju: + /@pvtnbr/eslint-config/0.22.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-aUHaCE4yImGQ9zp2Jm8gjDLLK+X8tPXqykf49Y+6elhnvipUMbYyJEMVyQMLuv86WGFj4Vlo9l9qAsnfzrjahQ==} peerDependencies: eslint: ^7.15.0 || ^8.0.0 dependencies: - '@typescript-eslint/eslint-plugin': 5.23.0_z6pjn25k6rmh5soq2vqkvejohq - '@typescript-eslint/parser': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju + '@typescript-eslint/eslint-plugin': 5.23.0_c63nfttrfhylg3zmgcxfslaw44 + '@typescript-eslint/parser': 5.23.0_hcfsmds2fshutdssjqluwm76uu confusing-browser-globals: 1.0.11 eslint: 8.15.0 eslint-import-resolver-typescript: 2.7.1_gwd37gqv3vjv3xlpl7ju3ag2qu @@ -889,7 +889,7 @@ packages: '@types/yargs-parser': 20.2.1 dev: true - /@typescript-eslint/eslint-plugin/5.23.0_z6pjn25k6rmh5soq2vqkvejohq: + /@typescript-eslint/eslint-plugin/5.23.0_c63nfttrfhylg3zmgcxfslaw44: resolution: {integrity: sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -900,23 +900,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju + '@typescript-eslint/parser': 5.23.0_hcfsmds2fshutdssjqluwm76uu '@typescript-eslint/scope-manager': 5.23.0 - '@typescript-eslint/type-utils': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju - '@typescript-eslint/utils': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju + '@typescript-eslint/type-utils': 5.23.0_hcfsmds2fshutdssjqluwm76uu + '@typescript-eslint/utils': 5.23.0_hcfsmds2fshutdssjqluwm76uu debug: 4.3.4 eslint: 8.15.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.5.4 - typescript: 4.5.4 + tsutils: 3.21.0_typescript@4.6.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.23.0_gvlnzj7fcypfemxddb7m5xtmju: + /@typescript-eslint/parser/5.23.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-V06cYUkqcGqpFjb8ttVgzNF53tgbB/KoQT/iB++DOIExKmzI9vBJKjZKt/6FuV9c+zrDsvJKbJ2DOCYwX91cbw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -928,10 +928,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.23.0 '@typescript-eslint/types': 5.23.0 - '@typescript-eslint/typescript-estree': 5.23.0_typescript@4.5.4 + '@typescript-eslint/typescript-estree': 5.23.0_typescript@4.6.4 debug: 4.3.4 eslint: 8.15.0 - typescript: 4.5.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true @@ -944,7 +944,7 @@ packages: '@typescript-eslint/visitor-keys': 5.23.0 dev: true - /@typescript-eslint/type-utils/5.23.0_gvlnzj7fcypfemxddb7m5xtmju: + /@typescript-eslint/type-utils/5.23.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -954,11 +954,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju + '@typescript-eslint/utils': 5.23.0_hcfsmds2fshutdssjqluwm76uu debug: 4.3.4 eslint: 8.15.0 - tsutils: 3.21.0_typescript@4.5.4 - typescript: 4.5.4 + tsutils: 3.21.0_typescript@4.6.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true @@ -968,7 +968,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.23.0_typescript@4.5.4: + /@typescript-eslint/typescript-estree/5.23.0_typescript@4.6.4: resolution: {integrity: sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -983,13 +983,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.5.4 - typescript: 4.5.4 + tsutils: 3.21.0_typescript@4.6.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.23.0_gvlnzj7fcypfemxddb7m5xtmju: + /@typescript-eslint/utils/5.23.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -998,7 +998,7 @@ packages: '@types/json-schema': 7.0.11 '@typescript-eslint/scope-manager': 5.23.0 '@typescript-eslint/types': 5.23.0 - '@typescript-eslint/typescript-estree': 5.23.0_typescript@4.5.4 + '@typescript-eslint/typescript-estree': 5.23.0_typescript@4.6.4 eslint: 8.15.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.15.0 @@ -2859,7 +2859,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju + '@typescript-eslint/parser': 5.23.0_hcfsmds2fshutdssjqluwm76uu debug: 3.2.7 eslint-import-resolver-node: 0.3.6 eslint-import-resolver-typescript: 2.7.1_gwd37gqv3vjv3xlpl7ju3ag2qu @@ -2900,7 +2900,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.23.0_gvlnzj7fcypfemxddb7m5xtmju + '@typescript-eslint/parser': 5.23.0_hcfsmds2fshutdssjqluwm76uu array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 @@ -7021,14 +7021,14 @@ packages: resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} dev: true - /tsutils/3.21.0_typescript@4.5.4: + /tsutils/3.21.0_typescript@4.6.4: 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.5.4 + typescript: 4.6.4 dev: true /tty-browserify/0.0.0: @@ -7084,8 +7084,8 @@ packages: resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} dev: true - /typescript/4.5.4: - resolution: {integrity: sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==} + /typescript/4.6.4: + resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} engines: {node: '>=4.2.0'} hasBin: true dev: true