Merge pull request #21963 from drodil/introduce_knip
ci: introduce knip for checking unused packages
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/repo-tools': patch
|
||||
---
|
||||
|
||||
Introduced `knip` to the `knip-reports` command, which generates a `knip-report.md` file for your packages with dependency warnings, if any.
|
||||
@@ -185,6 +185,7 @@ Kaswell
|
||||
keepalive
|
||||
Keyv
|
||||
Knex
|
||||
knip
|
||||
Koyeb
|
||||
KPIs
|
||||
Kuang
|
||||
|
||||
+4
-1
@@ -162,4 +162,7 @@ e2e-test-report/
|
||||
*svg.dtmp
|
||||
|
||||
# Scripts
|
||||
plugins-report.csv
|
||||
plugins-report.csv
|
||||
|
||||
# Temporary knip configs
|
||||
knip.json
|
||||
|
||||
@@ -6,6 +6,7 @@ coverage
|
||||
templates
|
||||
api-report.md
|
||||
api-report-*.md
|
||||
knip-report.md
|
||||
cli-report.md
|
||||
plugins/scaffolder-backend/sample-templates
|
||||
.vscode
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"build:all": "backstage-cli repo build --all",
|
||||
"build:api-reports": "yarn build:api-reports:only --tsc",
|
||||
"build:api-reports:only": "backstage-repo-tools api-reports --allow-warnings 'packages/core-components,plugins/+(catalog|catalog-import|git-release-manager|jenkins|kubernetes)' -o ae-wrong-input-file-type --validate-release-tags",
|
||||
"build:knip-reports": "backstage-repo-tools knip-reports",
|
||||
"build:api-docs": "LANG=en_EN yarn build:api-reports --docs --exclude 'plugins/@(adr|adr-backend|adr-common|airbrake|airbrake-backend|allure|analytics-module-ga|analytics-module-ga4|analytics-module-newrelic-browser|apache-airflow|api-docs|api-docs-module-protoc-gen-doc|apollo-explorer|app-visualizer|azure-devops|azure-devops-backend|azure-devops-common|azure-sites|azure-sites-backend|azure-sites-common|badges|badges-backend|bazaar|bazaar-backend|bitbucket-cloud-common|bitrise|catalog-graph|catalog-graphql|catalog-import|catalog-unprocessed-entities|cicd-statistics|cicd-statistics-module-gitlab|circleci|cloudbuild|code-climate|code-coverage|code-coverage-backend|codescene|config-schema|cost-insights|cost-insights-common|dynatrace|entity-feedback|entity-feedback-backend|entity-feedback-common|entity-validation|example-todo-list|example-todo-list-backend|example-todo-list-common|firehydrant|fossa|gcalendar|gcp-projects|git-release-manager|github-actions|github-deployments|github-issues|github-pull-requests-board|gitops-profiles|gocd|graphiql|graphql-backend|graphql-voyager|ilert|jenkins|jenkins-backend|jenkins-common|kafka|kafka-backend|lighthouse|lighthouse-backend|lighthouse-common|linguist|linguist-backend|linguist-common|microsoft-calendar|newrelic|newrelic-dashboard|nomad|nomad-backend|octopus-deploy|opencost|pagerduty|periskop|periskop-backend|playlist|playlist-backend|playlist-common|proxy-backend|puppetdb|rollbar|rollbar-backend|sentry|shortcuts|splunk-on-call|stack-overflow|stack-overflow-backend|stackstorm|tech-radar|tech-radar-2|todo|todo-backend|xcmetrics)'",
|
||||
"build:plugins-report": "node ./scripts/build-plugins-report",
|
||||
"tsc": "tsc",
|
||||
@@ -91,6 +92,7 @@
|
||||
"eslint-plugin-testing-library": "^6.0.0",
|
||||
"fs-extra": "10.1.0",
|
||||
"husky": "^9.0.0",
|
||||
"knip": "^4.3.1",
|
||||
"lint-staged": "^15.0.0",
|
||||
"minimist": "^1.2.5",
|
||||
"node-gyp": "^10.0.0",
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| msw | package.json |
|
||||
| cross-fetch | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (64)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------------------------|:-------------|
|
||||
| lodash | package.json |
|
||||
| history | package.json |
|
||||
| react-use | package.json |
|
||||
| @octokit/rest | package.json |
|
||||
| zen-observable | package.json |
|
||||
| @material-ui/lab | package.json |
|
||||
| @backstage/theme | package.json |
|
||||
| @backstage/plugin-org | package.json |
|
||||
| @backstage/plugin-adr | package.json |
|
||||
| @backstage/plugin-todo | package.json |
|
||||
| @backstage/plugin-gocd | package.json |
|
||||
| app-next-example-plugin | package.json |
|
||||
| @backstage/plugin-kafka | package.json |
|
||||
| @backstage/app-defaults | package.json |
|
||||
| @backstage/plugin-sentry | package.json |
|
||||
| @backstage/plugin-search | package.json |
|
||||
| @backstage/plugin-badges | package.json |
|
||||
| @backstage/catalog-model | package.json |
|
||||
| @backstage/plugin-rollbar | package.json |
|
||||
| @backstage/plugin-jenkins | package.json |
|
||||
| @backstage/plugin-explore | package.json |
|
||||
| @backstage/plugin-catalog | package.json |
|
||||
| @circleci/backstage-plugin | package.json |
|
||||
| @backstage/plugin-puppetdb | package.json |
|
||||
| @backstage/plugin-playlist | package.json |
|
||||
| @backstage/plugin-newrelic | package.json |
|
||||
| @backstage/plugin-linguist | package.json |
|
||||
| @backstage/plugin-devtools | package.json |
|
||||
| @backstage/plugin-api-docs | package.json |
|
||||
| @backstage/plugin-airbrake | package.json |
|
||||
| @backstage/plugin-shortcuts | package.json |
|
||||
| @backstage/plugin-dynatrace | package.json |
|
||||
| @backstage/plugin-stackstorm | package.json |
|
||||
| @backstage/plugin-scaffolder | package.json |
|
||||
| @backstage/plugin-lighthouse | package.json |
|
||||
| @backstage/plugin-kubernetes | package.json |
|
||||
| @backstage/plugin-cloudbuild | package.json |
|
||||
| @backstage/plugin-azure-sites | package.json |
|
||||
| @backstage/plugin-search-react | package.json |
|
||||
| @backstage/plugin-gcp-projects | package.json |
|
||||
| @backstage/plugin-azure-devops | package.json |
|
||||
| @backstage/plugin-tech-insights | package.json |
|
||||
| @backstage/plugin-search-common | package.json |
|
||||
| @backstage/plugin-cost-insights | package.json |
|
||||
| @backstage/plugin-code-coverage | package.json |
|
||||
| @backstage/plugin-catalog-react | package.json |
|
||||
| @backstage/plugin-catalog-graph | package.json |
|
||||
| @backstage/plugin-techdocs-react | package.json |
|
||||
| @backstage/plugin-octopus-deploy | package.json |
|
||||
| @backstage/plugin-github-actions | package.json |
|
||||
| @backstage/plugin-catalog-common | package.json |
|
||||
| @backstage/plugin-apache-airflow | package.json |
|
||||
| @backstage/plugin-linguist-common | package.json |
|
||||
| @backstage/plugin-entity-feedback | package.json |
|
||||
| @backstage/plugin-scaffolder-react | package.json |
|
||||
| @backstage/plugin-permission-react | package.json |
|
||||
| @roadiehq/backstage-plugin-travis-ci | package.json |
|
||||
| @roadiehq/backstage-plugin-buildkite | package.json |
|
||||
| @backstage/plugin-newrelic-dashboard | package.json |
|
||||
| @oriflame/backstage-plugin-score-card | package.json |
|
||||
| @roadiehq/backstage-plugin-github-insights | package.json |
|
||||
| @backstage/plugin-catalog-unprocessed-entities | package.json |
|
||||
| @roadiehq/backstage-plugin-github-pull-requests | package.json |
|
||||
| @backstage/plugin-techdocs-module-addons-contrib | package.json |
|
||||
|
||||
## Unused devDependencies (7)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| cross-env | package.json |
|
||||
| @types/jquery | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @types/zen-observable | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (15)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------------|:-------------|
|
||||
| vite | package.json |
|
||||
| history | package.json |
|
||||
| react-router | package.json |
|
||||
| @octokit/rest | package.json |
|
||||
| zen-observable | package.json |
|
||||
| vite-plugin-html | package.json |
|
||||
| @material-ui/lab | package.json |
|
||||
| @backstage/theme | package.json |
|
||||
| @vitejs/plugin-react | package.json |
|
||||
| vite-plugin-node-polyfills | package.json |
|
||||
| @backstage/plugin-airbrake | package.json |
|
||||
| @backstage/frontend-app-api | package.json |
|
||||
| @backstage/plugin-azure-sites | package.json |
|
||||
| @backstage/plugin-search-common | package.json |
|
||||
| @backstage/plugin-linguist-common | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| cross-env | package.json |
|
||||
| @types/jquery | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @types/zen-observable | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
## Unlisted dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------|:---------------------------------------------------------|
|
||||
| @rjsf/utils | src/components/scaffolder/customScaffolderExtensions.tsx |
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------|:-------------|
|
||||
| winston-transport | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| http-errors | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/http-errors | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| mysql2 | package.json |
|
||||
| @types/webpack-env | package.json |
|
||||
| @manypkg/get-packages | package.json |
|
||||
|
||||
## Unused devDependencies (12)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| mysql2 | package.json |
|
||||
| supertest | package.json |
|
||||
| http-errors | package.json |
|
||||
| better-sqlite3 | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
| @types/webpack-env | package.json |
|
||||
| @types/http-errors | package.json |
|
||||
| aws-sdk-client-mock | package.json |
|
||||
| @aws-sdk/util-stream-node | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
## Referenced optional peerDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------|:-------------|
|
||||
| pg-connection-string | package.json |
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/backend-plugin-api | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------------|:-------------|
|
||||
| @backstage/types | package.json |
|
||||
| @backstage/errors | package.json |
|
||||
| @backstage/plugin-search-common | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| wait-for-expect | package.json |
|
||||
| @backstage/config-loader | package.json |
|
||||
| @backstage/backend-app-api | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (7)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------------------------|:-------------|
|
||||
| @backstage/backend-tasks | package.json |
|
||||
| @backstage/plugin-auth-node | package.json |
|
||||
| @backstage/backend-plugin-api | package.json |
|
||||
| @backstage/plugin-permission-node | package.json |
|
||||
| @backstage/plugin-permission-common | package.json |
|
||||
| @backstage/plugin-search-backend-node | package.json |
|
||||
| @backstage/plugin-catalog-backend-module-openapi | package.json |
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| lodash | package.json |
|
||||
| @backstage/backend-plugin-api | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| wait-for-expect | package.json |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------|:-------------|
|
||||
| pg | package.json |
|
||||
| msw | package.json |
|
||||
| mysql2 | package.json |
|
||||
| better-sqlite3 | package.json |
|
||||
| @backstage/errors | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (12)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------------------------------|:-------------|
|
||||
| pg | package.json |
|
||||
| luxon | package.json |
|
||||
| mysql2 | package.json |
|
||||
| example-app | package.json |
|
||||
| @octokit/rest | package.json |
|
||||
| better-sqlite3 | package.json |
|
||||
| @gitbeaker/node | package.json |
|
||||
| pg-connection-string | package.json |
|
||||
| azure-devops-node-api | package.json |
|
||||
| @backstage/plugin-tech-insights-node | package.json |
|
||||
| @backstage/plugin-azure-sites-common | package.json |
|
||||
| @backstage/plugin-scaffolder-backend-module-rails | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------------------|:-------------|
|
||||
| @types/luxon | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/express-serve-static-core | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------|:-------------|
|
||||
| yaml | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/json-schema | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:-------|:-------------|
|
||||
| semver | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (28)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------------------|:-------------|
|
||||
| util | package.json |
|
||||
| glob | package.json |
|
||||
| buffer | package.json |
|
||||
| sucrase | package.json |
|
||||
| process | package.json |
|
||||
| postcss | package.json |
|
||||
| esbuild | package.json |
|
||||
| @swc/jest | package.json |
|
||||
| @swc/core | package.json |
|
||||
| @svgr/core | package.json |
|
||||
| cross-fetch | package.json |
|
||||
| jest-runtime | package.json |
|
||||
| @swc/helpers | package.json |
|
||||
| replace-in-file | package.json |
|
||||
| jest-css-modules | package.json |
|
||||
| @svgr/plugin-jsx | package.json |
|
||||
| @svgr/plugin-svgo | package.json |
|
||||
| @types/webpack-env | package.json |
|
||||
| eslint-plugin-react | package.json |
|
||||
| terser-webpack-plugin | package.json |
|
||||
| jest-environment-jsdom | package.json |
|
||||
| eslint-plugin-jsx-a11y | package.json |
|
||||
| @sucrase/webpack-loader | package.json |
|
||||
| eslint-plugin-react-hooks | package.json |
|
||||
| eslint-plugin-deprecation | package.json |
|
||||
| eslint-formatter-friendly | package.json |
|
||||
| @spotify/eslint-config-react | package.json |
|
||||
| @typescript-eslint/eslint-plugin | package.json |
|
||||
|
||||
## Unused devDependencies (18)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| del | package.json |
|
||||
| ts-node | package.json |
|
||||
| nodemon | package.json |
|
||||
| @types/ejs | package.json |
|
||||
| @types/svgo | package.json |
|
||||
| @backstage/theme | package.json |
|
||||
| @types/http-proxy | package.json |
|
||||
| @backstage/dev-utils | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @backstage/core-app-api | package.json |
|
||||
| @backstage/backend-common | package.json |
|
||||
| @backstage/core-plugin-api | package.json |
|
||||
| @backstage/core-components | package.json |
|
||||
| @types/terser-webpack-plugin | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
| @backstage/backend-plugin-api | package.json |
|
||||
| @types/rollup-plugin-peer-deps-external | package.json |
|
||||
|
||||
## Referenced optional peerDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------------|:-------------|
|
||||
| vite | package.json |
|
||||
| vite-plugin-html | package.json |
|
||||
| @vitejs/plugin-react | package.json |
|
||||
| vite-plugin-node-polyfills | package.json |
|
||||
|
||||
## Unlisted dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------|:-------------------------------------------|
|
||||
| prettier | src/commands/migrate/packageLintConfigs.ts |
|
||||
| react-dom/client | src/lib/bundler/hasReactDomClient.ts |
|
||||
| react/package.json | src/lib/bundler/server.ts |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------|:-------------|
|
||||
| jscodeshift | package.json |
|
||||
| jscodeshift-add-imports | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------|:-------------|
|
||||
| ts-node | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/jscodeshift | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| zen-observable | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:--------|:-------------|
|
||||
| history | package.json |
|
||||
|
||||
## Unused devDependencies (11)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| react-router-beta | package.json |
|
||||
| react-router-stable | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| react-router-dom-beta | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| react-router-dom-stable | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
| @testing-library/react-hooks | package.json |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------|:-------------|
|
||||
| @backstage/core-app-api | package.json |
|
||||
|
||||
## Unused devDependencies (8)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/plugin-catalog | package.json |
|
||||
| @backstage/plugin-puppetdb | package.json |
|
||||
| @backstage/frontend-app-api | package.json |
|
||||
| @backstage/plugin-stackstorm | package.json |
|
||||
| @backstage/frontend-test-utils | package.json |
|
||||
| @oriflame/backstage-plugin-score-card | package.json |
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------|:-------------|
|
||||
| linkifyjs | package.json |
|
||||
| @date-io/core | package.json |
|
||||
| zen-observable | package.json |
|
||||
| @backstage/config | package.json |
|
||||
|
||||
## Unused devDependencies (9)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| cross-fetch | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @types/zen-observable | package.json |
|
||||
| @types/google-protobuf | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/app-defaults | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
## Unlisted dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:--------|:---------------------------------------|
|
||||
| csstype | src/components/Lifecycle/Lifecycle.tsx |
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:--------|:-------------|
|
||||
| history | package.json |
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/core-app-api | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| ts-node | package.json |
|
||||
| nodemon | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/command-exists | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| @backstage/theme | package.json |
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| zen-observable | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
## Referenced optional peerDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| @playwright/test | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| ts-node | package.json |
|
||||
| nodemon | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/puppeteer | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unlisted dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-------|:-------------------------------|
|
||||
| estree | lib/visitImports.js |
|
||||
| estree | rules/no-undeclared-imports.js |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------------|:-------------|
|
||||
| lodash | package.json |
|
||||
| @material-ui/core | package.json |
|
||||
| @backstage/core-components | package.json |
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------|:-------------|
|
||||
| history | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/frontend-app-api | package.json |
|
||||
| @backstage/frontend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------------|:-------------|
|
||||
| @backstage/errors | package.json |
|
||||
| @aws-sdk/credential-provider-node | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| aws-sdk-client-mock | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| aws-sdk-client-mock-jest | package.json |
|
||||
| @backstage/config-loader | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/config-loader | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
|
||||
@@ -15,6 +15,7 @@ Commands:
|
||||
api-reports [options] [paths...]
|
||||
type-deps
|
||||
generate-catalog-info [options]
|
||||
knip-reports [options] [paths...]
|
||||
package [command]
|
||||
repo [command]
|
||||
help [command]
|
||||
@@ -49,6 +50,16 @@ Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-repo-tools knip-reports`
|
||||
|
||||
```
|
||||
Usage: backstage-repo-tools knip-reports [options] [paths...]
|
||||
|
||||
Options:
|
||||
--ci
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-repo-tools package`
|
||||
|
||||
```
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------------|:-------------|
|
||||
| glob | package.json |
|
||||
| ts-node | package.json |
|
||||
| is-glob | package.json |
|
||||
| @stoplight/spectral-runtime | package.json |
|
||||
| @stoplight/spectral-functions | package.json |
|
||||
| @openapitools/openapi-generator-cli | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @types/is-glob | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
## Referenced optional peerDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------|:-------------|
|
||||
| prettier | package.json |
|
||||
|
||||
@@ -16,37 +16,36 @@
|
||||
|
||||
import { groupBy } from 'lodash';
|
||||
import {
|
||||
resolve as resolvePath,
|
||||
relative as relativePath,
|
||||
basename,
|
||||
join,
|
||||
relative as relativePath,
|
||||
resolve as resolvePath,
|
||||
} from 'path';
|
||||
import { execFile } from 'child_process';
|
||||
import fs from 'fs-extra';
|
||||
import {
|
||||
CompilerState,
|
||||
Extractor,
|
||||
ExtractorConfig,
|
||||
CompilerState,
|
||||
ExtractorLogLevel,
|
||||
ExtractorMessage,
|
||||
} from '@microsoft/api-extractor';
|
||||
import { Program } from 'typescript';
|
||||
import {
|
||||
DocNode,
|
||||
IDocNodeContainerParameters,
|
||||
TSDocTagSyntaxKind,
|
||||
TSDocConfiguration,
|
||||
Standardization,
|
||||
DocBlockTag,
|
||||
DocPlainText,
|
||||
DocLinkTag,
|
||||
DocNode,
|
||||
DocPlainText,
|
||||
IDocNodeContainerParameters,
|
||||
Standardization,
|
||||
TSDocConfiguration,
|
||||
TSDocTagSyntaxKind,
|
||||
} from '@microsoft/tsdoc';
|
||||
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
|
||||
import {
|
||||
ApiPackage,
|
||||
ApiModel,
|
||||
ApiItem,
|
||||
ApiItemKind,
|
||||
ApiModel,
|
||||
ApiPackage,
|
||||
} from '@microsoft/api-extractor-model';
|
||||
import {
|
||||
IMarkdownDocumenterOptions,
|
||||
@@ -64,6 +63,7 @@ import { AstDeclaration } from '@microsoft/api-extractor/lib/analyzer/AstDeclara
|
||||
import { paths as cliPaths } from '../../lib/paths';
|
||||
import minimatch from 'minimatch';
|
||||
import { getPackageExportNames } from '../../lib/entryPoints';
|
||||
import { createBinRunner } from '../util';
|
||||
|
||||
const tmpDir = cliPaths.resolveTargetRoot(
|
||||
'./node_modules/.cache/api-extractor',
|
||||
@@ -290,10 +290,10 @@ function logApiReportInstructions() {
|
||||
'*************************************************************************************',
|
||||
);
|
||||
console.log(
|
||||
'* You have uncommitted changes to the public API of a package. *',
|
||||
'* You have uncommitted changes to the public API or reports of a package. *',
|
||||
);
|
||||
console.log(
|
||||
'* To solve this, run `yarn build:api-reports` and commit all api-report.md changes. *',
|
||||
'* To solve this, run `yarn build:api-reports` and commit all md file changes. *',
|
||||
);
|
||||
console.log(
|
||||
'*************************************************************************************',
|
||||
@@ -1227,31 +1227,6 @@ export async function categorizePackageDirs(packageDirs: string[]) {
|
||||
return { tsPackageDirs, cliPackageDirs };
|
||||
}
|
||||
|
||||
function createBinRunner(cwd: string, path: string) {
|
||||
return async (...command: string[]) =>
|
||||
new Promise<string>((resolve, reject) => {
|
||||
execFile(
|
||||
'node',
|
||||
[path, ...command],
|
||||
{
|
||||
cwd,
|
||||
shell: true,
|
||||
timeout: 60000,
|
||||
maxBuffer: 1024 * 1024,
|
||||
},
|
||||
(err, stdout, stderr) => {
|
||||
if (err) {
|
||||
reject(new Error(`${err.message}\n${stderr}`));
|
||||
} else if (stderr) {
|
||||
reject(new Error(`Command printed error output: ${stderr}`));
|
||||
} else {
|
||||
resolve(stdout);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function parseHelpPage(helpPageContent: string) {
|
||||
const [, usage] = helpPageContent.match(/^\s*Usage: (.*)$/im) ?? [];
|
||||
const lines = helpPageContent.split(/\r?\n/);
|
||||
@@ -1443,3 +1418,66 @@ export async function runCliExtraction({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface KnipExtractionOptions {
|
||||
packageDirs: string[];
|
||||
isLocalBuild: boolean;
|
||||
}
|
||||
|
||||
export async function runKnipReports({
|
||||
packageDirs,
|
||||
isLocalBuild,
|
||||
}: KnipExtractionOptions) {
|
||||
const knipDir = cliPaths.resolveTargetRoot('./node_modules/knip/bin/');
|
||||
|
||||
for (const packageDir of packageDirs) {
|
||||
console.log(`## Processing ${packageDir}`);
|
||||
const fullDir = cliPaths.resolveTargetRoot(packageDir);
|
||||
const reportPath = resolvePath(fullDir, 'knip-report.md');
|
||||
const run = createBinRunner(fullDir, '');
|
||||
|
||||
const report = await run(
|
||||
`${knipDir}/knip.js`,
|
||||
`--directory ${fullDir}`, // Run in the package directory
|
||||
'--no-exit-code', // Removing this will end the process in case there are findings by knip
|
||||
'--no-progress', // Remove unnecessary debugging from output
|
||||
// TODO: Add more checks when dependencies start to look ok, see https://knip.dev/reference/cli#--include
|
||||
'--include dependencies,unlisted',
|
||||
'--reporter markdown',
|
||||
);
|
||||
|
||||
const existingReport = await fs
|
||||
.readFile(reportPath, 'utf8')
|
||||
.catch(error => {
|
||||
if (error.code === 'ENOENT') {
|
||||
return undefined;
|
||||
}
|
||||
throw error;
|
||||
});
|
||||
|
||||
if (existingReport !== report) {
|
||||
if (isLocalBuild) {
|
||||
console.warn(`Knip report changed for ${packageDir}`);
|
||||
await fs.writeFile(reportPath, report);
|
||||
} else {
|
||||
logApiReportInstructions();
|
||||
|
||||
if (existingReport) {
|
||||
console.log('');
|
||||
console.log(
|
||||
`The conflicting file is ${relativePath(
|
||||
cliPaths.targetRoot,
|
||||
reportPath,
|
||||
)}, expecting the following content:`,
|
||||
);
|
||||
console.log('');
|
||||
|
||||
console.log(report);
|
||||
|
||||
logApiReportInstructions();
|
||||
}
|
||||
throw new Error(`Knip report changed for ${packageDir}, `);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ import * as pathsLib from '../../lib/paths';
|
||||
|
||||
import {
|
||||
buildDocs,
|
||||
runCliExtraction,
|
||||
runApiExtraction,
|
||||
categorizePackageDirs,
|
||||
runApiExtraction,
|
||||
runCliExtraction,
|
||||
} from './api-extractor';
|
||||
|
||||
import { buildApiReports } from './api-reports';
|
||||
@@ -43,6 +43,7 @@ jest.mock('./api-extractor', () => ({
|
||||
runApiExtraction: jest.fn(),
|
||||
runCliExtraction: jest.fn(),
|
||||
buildDocs: jest.fn(),
|
||||
runKnipReports: jest.fn(),
|
||||
}));
|
||||
|
||||
const projectPaths = pathsLib.paths;
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
import { OptionValues } from 'commander';
|
||||
import {
|
||||
createTemporaryTsConfig,
|
||||
buildDocs,
|
||||
categorizePackageDirs,
|
||||
createTemporaryTsConfig,
|
||||
runApiExtraction,
|
||||
runCliExtraction,
|
||||
buildDocs,
|
||||
} from './api-extractor';
|
||||
import { paths as cliPaths, resolvePackagePaths } from '../../lib/paths';
|
||||
import { generateTypeDeclarations } from './generateTypeDeclarations';
|
||||
@@ -94,6 +94,7 @@ export const buildApiReports = async (paths: string[] = [], opts: Options) => {
|
||||
validateReleaseTags: opts.validateReleaseTags,
|
||||
});
|
||||
}
|
||||
|
||||
if (cliPackageDirs.length > 0) {
|
||||
console.log('# Generating package CLI reports');
|
||||
await runCliExtraction({
|
||||
|
||||
@@ -168,6 +168,17 @@ export function registerCommands(program: Command) {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
program
|
||||
.command('knip-reports [paths...]')
|
||||
.option('--ci', 'CI run checks that there is no changes on knip reports')
|
||||
.description('Generate a knip report for selected packages')
|
||||
.action(
|
||||
lazy(() =>
|
||||
import('./knip-reports/knip-reports').then(m => m.buildKnipReports),
|
||||
),
|
||||
);
|
||||
|
||||
registerPackageCommand(program);
|
||||
registerRepoCommand(program);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { paths as cliPaths } from '../../lib/paths';
|
||||
import pLimit from 'p-limit';
|
||||
import os from 'os';
|
||||
import { relative as relativePath, resolve as resolvePath } from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import { createBinRunner } from '../util';
|
||||
|
||||
// Ignore this due to Knip error: Error: ENAMETOOLONG: name too long, scandir
|
||||
const ignoredPackages = ['packages/techdocs-cli-embedded-app'];
|
||||
|
||||
interface KnipExtractionOptions {
|
||||
packageDirs: string[];
|
||||
isLocalBuild: boolean;
|
||||
}
|
||||
|
||||
interface KnipConfigOptions {
|
||||
packageDir: string;
|
||||
}
|
||||
|
||||
interface KnipPackageOptions {
|
||||
packageDir: string;
|
||||
knipDir: string;
|
||||
isLocalBuild: boolean;
|
||||
}
|
||||
|
||||
function logKnipReportInstructions() {
|
||||
console.log('');
|
||||
console.log(
|
||||
'*************************************************************************************',
|
||||
);
|
||||
console.log(
|
||||
'* You have uncommitted changes to the knip reports of a package. *',
|
||||
);
|
||||
console.log(
|
||||
'* To solve this, run `yarn build:knip-reports` and commit all md file changes. *',
|
||||
);
|
||||
console.log(
|
||||
'*************************************************************************************',
|
||||
);
|
||||
console.log('');
|
||||
}
|
||||
|
||||
async function generateKnipConfig({ packageDir }: KnipConfigOptions) {
|
||||
const knipConfig = {
|
||||
entry: [
|
||||
'dev/index.{ts,tsx}',
|
||||
'src/index.{ts,tsx}',
|
||||
'src/routes.ts',
|
||||
'src/run.ts',
|
||||
],
|
||||
jest: { entry: 'src/setupTests.ts' },
|
||||
storybook: { entry: 'src/components/**/*.stories.tsx' },
|
||||
ignore: [
|
||||
'.eslintrc.js',
|
||||
'config.d.ts',
|
||||
'knexfile.js',
|
||||
'node_modules/**',
|
||||
'dist/**',
|
||||
'{fixtures,migrations,templates}/**',
|
||||
],
|
||||
};
|
||||
await fs.writeFile(
|
||||
`${packageDir}/knip.json`,
|
||||
JSON.stringify(knipConfig, null, 2),
|
||||
);
|
||||
}
|
||||
|
||||
function cleanKnipConfig({ packageDir }: KnipConfigOptions) {
|
||||
if (fs.existsSync(`${packageDir}/knip.json`)) {
|
||||
fs.rmSync(`${packageDir}/knip.json`);
|
||||
}
|
||||
}
|
||||
|
||||
async function handlePackage({
|
||||
packageDir,
|
||||
knipDir,
|
||||
isLocalBuild,
|
||||
}: KnipPackageOptions) {
|
||||
console.log(`## Processing ${packageDir}`);
|
||||
if (ignoredPackages.includes(packageDir)) {
|
||||
console.log(`Skipping ${packageDir}`);
|
||||
return;
|
||||
}
|
||||
const fullDir = cliPaths.resolveTargetRoot(packageDir);
|
||||
const reportPath = resolvePath(fullDir, 'knip-report.md');
|
||||
const run = createBinRunner(fullDir, '');
|
||||
|
||||
await generateKnipConfig({ packageDir: fullDir });
|
||||
|
||||
const report = await run(
|
||||
`${knipDir}/knip.js`,
|
||||
`--directory ${fullDir}`, // Run in the package directory
|
||||
'--config knip.json',
|
||||
'--no-exit-code', // Removing this will end the process in case there are findings by knip
|
||||
'--no-progress', // Remove unnecessary debugging from output
|
||||
// TODO: Add more checks when dependencies start to look ok, see https://knip.dev/reference/cli#--include
|
||||
'--include dependencies,unlisted',
|
||||
'--reporter markdown',
|
||||
);
|
||||
|
||||
cleanKnipConfig({ packageDir: fullDir });
|
||||
|
||||
const existingReport = await fs.readFile(reportPath, 'utf8').catch(error => {
|
||||
if (error.code === 'ENOENT') {
|
||||
return undefined;
|
||||
}
|
||||
throw error;
|
||||
});
|
||||
|
||||
if (existingReport !== report) {
|
||||
if (isLocalBuild) {
|
||||
console.warn(`Knip report changed for ${packageDir}`);
|
||||
await fs.writeFile(reportPath, report);
|
||||
} else {
|
||||
logKnipReportInstructions();
|
||||
|
||||
if (existingReport) {
|
||||
console.log('');
|
||||
console.log(
|
||||
`The conflicting file is ${relativePath(
|
||||
cliPaths.targetRoot,
|
||||
reportPath,
|
||||
)}, expecting the following content:`,
|
||||
);
|
||||
console.log('');
|
||||
|
||||
console.log(report);
|
||||
|
||||
logKnipReportInstructions();
|
||||
}
|
||||
throw new Error(`Knip report changed for ${packageDir}, `);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function runKnipReports({
|
||||
packageDirs,
|
||||
isLocalBuild,
|
||||
}: KnipExtractionOptions) {
|
||||
const knipDir = cliPaths.resolveTargetRoot('./node_modules/knip/bin/');
|
||||
const limiter = pLimit(os.cpus().length);
|
||||
|
||||
try {
|
||||
await Promise.all(
|
||||
packageDirs.map(packageDir =>
|
||||
limiter(async () =>
|
||||
handlePackage({ packageDir, knipDir, isLocalBuild }),
|
||||
),
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(
|
||||
`Error occurred during knip reporting: ${e}, cleaning knip configs`,
|
||||
);
|
||||
packageDirs.map(packageDir => {
|
||||
const fullDir = cliPaths.resolveTargetRoot(packageDir);
|
||||
cleanKnipConfig({ packageDir: fullDir });
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { OptionValues } from 'commander';
|
||||
import { runKnipReports } from './knip-extractor';
|
||||
import { resolvePackagePaths } from '../../lib/paths';
|
||||
|
||||
type Options = {
|
||||
ci?: boolean;
|
||||
} & OptionValues;
|
||||
|
||||
export const buildKnipReports = async (paths: string[] = [], opts: Options) => {
|
||||
const isCiBuild = opts.ci;
|
||||
|
||||
const isAllPackages = !paths?.length;
|
||||
const selectedPackageDirs = await resolvePackagePaths({
|
||||
paths,
|
||||
include: opts.include,
|
||||
exclude: opts.exclude,
|
||||
});
|
||||
|
||||
if (isAllPackages && !isCiBuild) {
|
||||
console.log('');
|
||||
console.log(
|
||||
'TIP: You can generate knip-reports for select packages by passing package paths:',
|
||||
);
|
||||
console.log('');
|
||||
console.log(
|
||||
' yarn build:knip-reports packages/config packages/core-plugin-api plugins/*',
|
||||
);
|
||||
console.log('');
|
||||
}
|
||||
|
||||
if (selectedPackageDirs.length > 0) {
|
||||
console.log('# Generating package knip reports');
|
||||
await runKnipReports({
|
||||
packageDirs: selectedPackageDirs,
|
||||
isLocalBuild: !isCiBuild,
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { execFile } from 'child_process';
|
||||
|
||||
export function createBinRunner(cwd: string, path: string) {
|
||||
return async (...command: string[]) =>
|
||||
new Promise<string>((resolve, reject) => {
|
||||
execFile(
|
||||
'node',
|
||||
[path, ...command],
|
||||
{
|
||||
cwd,
|
||||
shell: true,
|
||||
timeout: 60000,
|
||||
maxBuffer: 1024 * 1024,
|
||||
},
|
||||
(err, stdout, stderr) => {
|
||||
if (err) {
|
||||
reject(new Error(`${err.message}\n${stderr}`));
|
||||
} else if (stderr) {
|
||||
reject(new Error(`Command printed error output: ${stderr}`));
|
||||
} else {
|
||||
resolve(stdout);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| history | package.json |
|
||||
| react-use | package.json |
|
||||
| @backstage/theme | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| cross-env | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------|:-------------|
|
||||
| global-agent | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------|:-------------|
|
||||
| ts-node | package.json |
|
||||
| nodemon | package.json |
|
||||
| find-process | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/webpack-env | package.json |
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------|:-------------|
|
||||
| @material-ui/core | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------|:-------------|
|
||||
| @emotion/react | package.json |
|
||||
| @emotion/styled | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @mui/styles | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| luxon | package.json |
|
||||
| zen-observable | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/zen-observable | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------|:-------------|
|
||||
| yn | package.json |
|
||||
| node-fetch | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| remark-gfm | package.json |
|
||||
| react-markdown | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/app-defaults | package.json |
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @types/jest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/core-app-api | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------|:-------------|
|
||||
| graphql-ws | package.json |
|
||||
| graphql-config | package.json |
|
||||
| isomorphic-form-data | package.json |
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/core-app-api | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------|:-------------|
|
||||
| use-deep-compare-effect | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---|:-------------|
|
||||
| yn | package.json |
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| node-fetch | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
| @backstage/backend-app-api | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------|:-------------|
|
||||
| express | package.json |
|
||||
| passport | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------|:-------------|
|
||||
| @backstage/backend-common | package.json |
|
||||
| @backstage/plugin-auth-backend | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| express | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/config | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| express | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------|:-------------|
|
||||
| express | package.json |
|
||||
| passport | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
| @backstage/plugin-auth-backend | package.json |
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------|:-------------|
|
||||
| express | package.json |
|
||||
| passport | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/config | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------|:-------------|
|
||||
| passport | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| express | package.json |
|
||||
| passport | package.json |
|
||||
| @backstage/backend-common | package.json |
|
||||
|
||||
## Unused devDependencies (9)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| jose | package.json |
|
||||
| supertest | package.json |
|
||||
| cookie-parser | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| express-session | package.json |
|
||||
| @backstage/config | package.json |
|
||||
| express-promise-router | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:---------|:-------------|
|
||||
| express | package.json |
|
||||
| passport | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (9)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| jose | package.json |
|
||||
| express | package.json |
|
||||
| passport | package.json |
|
||||
| supertest | package.json |
|
||||
| cookie-parser | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| express-session | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (6)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/errors | package.json |
|
||||
| @backstage/config | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (12)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------|:-------------|
|
||||
| yn | package.json |
|
||||
| cors | package.json |
|
||||
| morgan | package.json |
|
||||
| winston | package.json |
|
||||
| fs-extra | package.json |
|
||||
| node-cache | package.json |
|
||||
| compression | package.json |
|
||||
| openid-client | package.json |
|
||||
| passport-github2 | package.json |
|
||||
| passport-microsoft | package.json |
|
||||
| google-auth-library | package.json |
|
||||
| passport-google-oauth20 | package.json |
|
||||
|
||||
## Unused devDependencies (10)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| supertest | package.json |
|
||||
| @types/xml2js | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/body-parser | package.json |
|
||||
| @types/passport-saml | package.json |
|
||||
| @types/passport-github2 | package.json |
|
||||
| @types/passport-strategy | package.json |
|
||||
| @types/passport-microsoft | package.json |
|
||||
| @types/passport-google-oauth20 | package.json |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------|:-------------|
|
||||
| winston | package.json |
|
||||
| node-fetch | package.json |
|
||||
|
||||
## Unused devDependencies (7)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| uuid | package.json |
|
||||
| supertest | package.json |
|
||||
| cookie-parser | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| express-promise-router | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| supertest | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------|:-------------|
|
||||
| node-fetch | package.json |
|
||||
| @backstage/catalog-model | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @types/supertest | package.json |
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------|:-------------|
|
||||
| @backstage/catalog-model | package.json |
|
||||
|
||||
## Unused devDependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------------|:-------------|
|
||||
| @backstage/theme | package.json |
|
||||
| @backstage/plugin-permission-react | package.json |
|
||||
| @backstage/plugin-permission-common | package.json |
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------|:-------------|
|
||||
| cors | package.json |
|
||||
| supertest | package.json |
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/backend-test-utils | package.json |
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user