Skip to content

Commit 4a3969d

Browse files
committed
ci: Improve knip unused dependency check
1 parent 82e2fad commit 4a3969d

4 files changed

Lines changed: 9 additions & 17 deletions

File tree

packages/middleware-code-coverage/knip.config.js renamed to knip.config.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,15 @@ const config = {
1616
},
1717

1818
ignoreDependencies: [
19-
"body-parser",
20-
"istanbul-lib-coverage",
21-
"istanbul-lib-instrument",
22-
"istanbul-lib-report",
23-
"istanbul-reports",
24-
"router",
25-
"serve-static",
26-
"eslint",
27-
"execa",
28-
"get-port",
29-
"nyc",
30-
"supertest",
19+
"@ui5/cli",
3120
"@istanbuljs/esm-loader-hook"
3221
],
22+
23+
workspaces: {
24+
"packages/middleware-code-coverage": {
25+
entry: ["lib/*.js", "test/**/*.js"]
26+
}
27+
}
3328
};
3429

3530
export default config;

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"scripts": {
3939
"check-licenses": "licensee --errors-only",
40-
"knip": "npm run knip --workspaces --if-present",
40+
"knip": "knip --config knip.config.js",
4141
"hooks:pre-push": "npm run lint:commit",
4242
"lint": "npm run lint --workspaces --if-present",
4343
"lint:commit": "commitlint -e",

packages/middleware-code-coverage/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@
5454
"execa": "^9.6.1",
5555
"get-port": "^7.1.0",
5656
"globals": "^17.1.0",
57-
"knip": "^5.83.1",
5857
"nyc": "^17.1.0",
5958
"sinon": "^21.0.1",
6059
"supertest": "^7.2.2"
6160
},
6261
"scripts": {
63-
"knip": "knip --config knip.config.js",
6462
"lint": "eslint ./",
65-
"test": "npm run lint && npm run knip && npm run test:unit:coverage && npm run test:integration",
63+
"test": "npm run lint && npm run test:unit:coverage && npm run test:integration",
6664
"test:unit": "ava",
6765
"test:unit:coverage": "nyc ava --node-arguments=\"--experimental-loader=@istanbuljs/esm-loader-hook\"",
6866
"test:unit:verbose": "cross-env UI5_LOG_LVL=verbose ava --verbose --serial",

0 commit comments

Comments
 (0)