Skip to content

Commit

Permalink
build: replace deprecated "dependency-check" with knip
Browse files Browse the repository at this point in the history
depdendency-check started to fail with an error that does not even include
a stack trace.

knip does a little bit more than dependency-check did. We disable some of
the rules because they just generate noise for now.

A note about the knip.json: every file suffixed by "!" is one that is used
in prod mode (npm run knip:prod).
  • Loading branch information
Yogu committed Jul 25, 2024
1 parent f924b4b commit bd48d4b
Show file tree
Hide file tree
Showing 4 changed files with 608 additions and 2,417 deletions.
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ rimraf dist
tsc --skipLibCheck
cpy --flat src/schema/preparation/source-validation-modules/schema dist/src/schema/preparation/source-validation-modules/schema
node ./emit-cruddl-version.js
dependency-check ./package.json --no-dev --ignore-module @arangodb --ignore-module internal
# check e.g. for imports from modules that are not listed as dependencies
npm run knip
npm run knip:prod
13 changes: 13 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["index.ts!", "spec/**/*.spec.ts", "src/project/project-from-fs.ts!"],
"project": ["src/**/*.ts!", "spec/**/*.ts"],
"rules": {
"exports": "off",
"types": "off",
"enumMembers": "off",
"duplicates": "off"
},
"ignoreDependencies": ["@arangodb", "internal", "tslib"],
"ignoreBinaries": ["arangodb"]
}
Loading

0 comments on commit bd48d4b

Please sign in to comment.