Skip to content

Commit b5ee77e

Browse files
committed
feat(scripts): improve optimizeDepsForDocker
1 parent b76586c commit b5ee77e

File tree

6 files changed

+46
-38
lines changed

6 files changed

+46
-38
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"@qiwi/multi-semantic-release": "6.5.1",
2828
"@types/eslint": "8.4.6",
2929
"@typescript-eslint/parser": "5.36.2",
30-
"@willbooster/prettier-config": "9.1.0",
31-
"@willbooster/renovate-config": "9.4.0",
30+
"@willbooster/prettier-config": "9.1.1",
31+
"@willbooster/renovate-config": "9.4.1",
3232
"conventional-changelog-conventionalcommits": "5.0.0",
3333
"eslint": "8.23.1",
3434
"husky": "8.0.1",

packages/lib/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = function (api) {
22
api.cache(true);
33

4-
return require('@willbooster/babel-configs/babel.config.js');
4+
return require('@willbooster/babel-configs/babel.config.cjs');
55
};

packages/lib/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
"@babel/preset-typescript": "7.18.6",
2727
"@rollup/plugin-babel": "5.3.1",
2828
"@rollup/plugin-commonjs": "22.0.2",
29-
"@rollup/plugin-node-resolve": "14.0.1",
29+
"@rollup/plugin-node-resolve": "14.1.0",
3030
"@types/babel__core": "7.1.19",
3131
"@types/babel__preset-env": "7.9.2",
3232
"@types/eslint": "8.4.6",
3333
"@types/micromatch": "4.0.2",
3434
"@types/prettier": "2.7.0",
3535
"@typescript-eslint/eslint-plugin": "5.36.2",
3636
"@typescript-eslint/parser": "5.36.2",
37-
"@willbooster/babel-configs": "1.0.0",
38-
"@willbooster/eslint-config-ts": "10.0.0",
39-
"@willbooster/prettier-config": "9.1.0",
37+
"@willbooster/babel-configs": "1.0.2",
38+
"@willbooster/eslint-config-ts": "10.0.4",
39+
"@willbooster/prettier-config": "9.1.1",
4040
"babel-plugin-transform-remove-console": "6.9.4",
4141
"eslint": "8.23.1",
4242
"eslint-config-prettier": "8.5.0",

packages/scripts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"@types/yargs": "17.0.12",
2828
"@typescript-eslint/eslint-plugin": "5.36.2",
2929
"@typescript-eslint/parser": "5.36.2",
30-
"@willbooster/eslint-config-ts": "10.0.0",
31-
"@willbooster/prettier-config": "9.1.0",
30+
"@willbooster/eslint-config-ts": "10.0.4",
31+
"@willbooster/prettier-config": "9.1.1",
3232
"esbuild": "0.15.7",
3333
"eslint": "8.23.1",
3434
"eslint-config-prettier": "8.5.0",

packages/scripts/src/commands/optimizeDepsForDocker.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@ export const optimizeDepsForDocker: CommandModule<unknown, InferredOptionTypes<t
2727
}
2828
}
2929
delete developmentDeps['conventional-changelog-conventionalcommits'];
30+
delete developmentDeps['husky'];
3031
delete developmentDeps['lint-staged'];
3132
delete developmentDeps['open-cli'];
3233
delete developmentDeps['pinst'];
3334
delete developmentDeps['sort-package-json'];
3435
delete developmentDeps['wait-on'];
3536

37+
const scripts = (packageJson.scripts || {}) as Record<string, string>;
38+
for (const [key, value] of Object.entries(scripts)) {
39+
if (value.startsWith('husky ') || value.startsWith('pinst ')) {
40+
delete scripts[key];
41+
}
42+
}
43+
3644
await fs.writeFile('package.json', JSON.stringify(packageJson));
3745
},
3846
};

yarn.lock

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,9 +1905,9 @@ __metadata:
19051905
languageName: node
19061906
linkType: hard
19071907

1908-
"@rollup/plugin-node-resolve@npm:14.0.1":
1909-
version: 14.0.1
1910-
resolution: "@rollup/plugin-node-resolve@npm:14.0.1"
1908+
"@rollup/plugin-node-resolve@npm:14.1.0":
1909+
version: 14.1.0
1910+
resolution: "@rollup/plugin-node-resolve@npm:14.1.0"
19111911
dependencies:
19121912
"@rollup/pluginutils": "npm:^3.1.0"
19131913
"@types/resolve": "npm:1.17.1"
@@ -1917,7 +1917,7 @@ __metadata:
19171917
resolve: "npm:^1.19.0"
19181918
peerDependencies:
19191919
rollup: ^2.78.0
1920-
checksum: 588f2f38c4a7f6afc6020a7258345e4e7ca2cbbf181d28327208cbd929b60049bc4bd3bb3345b097ce5cafdaa6d254ea31693991db0b11c7dc9aa64a3beaaea6
1920+
checksum: 48ed3c2c34c9be46b9b8bc4298fca1149069d7a814e8e13028e51fee3513002975ec3f330ffa916a802e359b463f0d941561e81d43a74d94df0d07d07c6b9d97
19211921
languageName: node
19221922
linkType: hard
19231923

@@ -2364,44 +2364,44 @@ __metadata:
23642364
languageName: node
23652365
linkType: hard
23662366

2367-
"@willbooster/babel-configs@npm:1.0.0":
2368-
version: 1.0.0
2369-
resolution: "@willbooster/babel-configs@npm:1.0.0"
2370-
checksum: a54c1b55eb9ea2b4d6f7a9a2c76814d9b899253ea3c871a4a34480b30d49020a3710766e0c0717ef56fb05c3aed08c05005a2eb06af0445cc0c2757c3fc28a06
2367+
"@willbooster/babel-configs@npm:1.0.2":
2368+
version: 1.0.2
2369+
resolution: "@willbooster/babel-configs@npm:1.0.2"
2370+
checksum: 7e9c238cfdcf8ebdd4eadde4f3c0db45114c7cbdd9a8a3e6c150d5a3da8035c0a0f11fb7bfc3c56fb2102822b42a986bf7d177714d3b974a0e9f3739eed0322b
23712371
languageName: node
23722372
linkType: hard
23732373

2374-
"@willbooster/eslint-config-ts@npm:10.0.0":
2375-
version: 10.0.0
2376-
resolution: "@willbooster/eslint-config-ts@npm:10.0.0"
2374+
"@willbooster/eslint-config-ts@npm:10.0.4":
2375+
version: 10.0.4
2376+
resolution: "@willbooster/eslint-config-ts@npm:10.0.4"
23772377
peerDependencies:
23782378
"@typescript-eslint/eslint-plugin": ">=5"
23792379
"@typescript-eslint/parser": ">=5"
2380-
"@willbooster/prettier-config": 9.1.0
2380+
"@willbooster/prettier-config": 9.1.1
23812381
eslint: ">=8"
23822382
eslint-config-prettier: ">=8"
23832383
eslint-import-resolver-typescript: ">=2"
23842384
eslint-plugin-import: ">=2"
23852385
eslint-plugin-sort-class-members: ">=1.14"
23862386
eslint-plugin-sort-destructure-keys: ">=1.4"
23872387
typescript: ">=4"
2388-
checksum: 2a66c8c3918f987dbfcf81e03e06b461190c9a302fe3ddab1376e38c19fd598442cdeb15734503821495c8afbbfc08d423fd4d504a83247e3d9a72356810b923
2388+
checksum: fc3179bde4a14a9728eb6ec14dfcc8cf73e4b118bddbaa89212ff2a3f476df4d0b4ebaba629538911dfa2e7e9b639afce1afee0c3d9c783aa94ff84107676aac
23892389
languageName: node
23902390
linkType: hard
23912391

2392-
"@willbooster/prettier-config@npm:9.1.0":
2393-
version: 9.1.0
2394-
resolution: "@willbooster/prettier-config@npm:9.1.0"
2392+
"@willbooster/prettier-config@npm:9.1.1":
2393+
version: 9.1.1
2394+
resolution: "@willbooster/prettier-config@npm:9.1.1"
23952395
peerDependencies:
23962396
prettier: ">=2"
2397-
checksum: 77b91bee3fe5f7a5b667d155f6921cafc1256eaeb5154ceb9c7c7e0c28a102d0eab6d9ccf63e4a3047b9eaf3d999755ac20ff858ec55939f756c852cd3da4b39
2397+
checksum: 4950e9e6a15d7fd2330f3a2036aa754b62bea72b0d9224c29de6d361955547591e9cab1f97713e5d60f8fa49a7474154e98b7dca461a60bd3cd6ac5eb5dd9d32
23982398
languageName: node
23992399
linkType: hard
24002400

2401-
"@willbooster/renovate-config@npm:9.4.0":
2402-
version: 9.4.0
2403-
resolution: "@willbooster/renovate-config@npm:9.4.0"
2404-
checksum: efeb700b9b536ac49a26c5f600da5c98da21f5415f12a2a1bbcfa1f9688c12dc17b1e14230435afcbb5da657a8b1bbd33c0271ed6e054fc5868a6fdf4f376655
2401+
"@willbooster/renovate-config@npm:9.4.1":
2402+
version: 9.4.1
2403+
resolution: "@willbooster/renovate-config@npm:9.4.1"
2404+
checksum: 34187806896dbafbd80374caac529b05aedd5e4cd1de87ae40067fff0f3e2d91da384ef2444bdc965ec01cdfd960500febac4d115c5f7fa7362f286c8ca23627
24052405
languageName: node
24062406
linkType: hard
24072407

@@ -2416,17 +2416,17 @@ __metadata:
24162416
"@babel/preset-typescript": "npm:7.18.6"
24172417
"@rollup/plugin-babel": "npm:5.3.1"
24182418
"@rollup/plugin-commonjs": "npm:22.0.2"
2419-
"@rollup/plugin-node-resolve": "npm:14.0.1"
2419+
"@rollup/plugin-node-resolve": "npm:14.1.0"
24202420
"@types/babel__core": "npm:7.1.19"
24212421
"@types/babel__preset-env": "npm:7.9.2"
24222422
"@types/eslint": "npm:8.4.6"
24232423
"@types/micromatch": "npm:4.0.2"
24242424
"@types/prettier": "npm:2.7.0"
24252425
"@typescript-eslint/eslint-plugin": "npm:5.36.2"
24262426
"@typescript-eslint/parser": "npm:5.36.2"
2427-
"@willbooster/babel-configs": "npm:1.0.0"
2428-
"@willbooster/eslint-config-ts": "npm:10.0.0"
2429-
"@willbooster/prettier-config": "npm:9.1.0"
2427+
"@willbooster/babel-configs": "npm:1.0.2"
2428+
"@willbooster/eslint-config-ts": "npm:10.0.4"
2429+
"@willbooster/prettier-config": "npm:9.1.1"
24302430
babel-plugin-transform-remove-console: "npm:6.9.4"
24312431
eslint: "npm:8.23.1"
24322432
eslint-config-prettier: "npm:8.5.0"
@@ -2456,8 +2456,8 @@ __metadata:
24562456
"@types/yargs": "npm:17.0.12"
24572457
"@typescript-eslint/eslint-plugin": "npm:5.36.2"
24582458
"@typescript-eslint/parser": "npm:5.36.2"
2459-
"@willbooster/eslint-config-ts": "npm:10.0.0"
2460-
"@willbooster/prettier-config": "npm:9.1.0"
2459+
"@willbooster/eslint-config-ts": "npm:10.0.4"
2460+
"@willbooster/prettier-config": "npm:9.1.1"
24612461
esbuild: "npm:0.15.7"
24622462
eslint: "npm:8.23.1"
24632463
eslint-config-prettier: "npm:8.5.0"
@@ -8752,8 +8752,8 @@ __metadata:
87528752
"@qiwi/multi-semantic-release": "npm:6.5.1"
87538753
"@types/eslint": "npm:8.4.6"
87548754
"@typescript-eslint/parser": "npm:5.36.2"
8755-
"@willbooster/prettier-config": "npm:9.1.0"
8756-
"@willbooster/renovate-config": "npm:9.4.0"
8755+
"@willbooster/prettier-config": "npm:9.1.1"
8756+
"@willbooster/renovate-config": "npm:9.4.1"
87578757
conventional-changelog-conventionalcommits: "npm:5.0.0"
87588758
eslint: "npm:8.23.1"
87598759
husky: "npm:8.0.1"

0 commit comments

Comments
 (0)