ci: introduce knip for checking unused packages
fixes #21948 Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | 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 (63)
|
||||
|
||||
| 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-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 (8)
|
||||
|
||||
| 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/jest-dom | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# 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/plugin-azure-sites | package.json |
|
||||
| @backstage/plugin-search-common | package.json |
|
||||
| @backstage/plugin-stack-overflow | package.json |
|
||||
| @backstage/plugin-linguist-common | 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 |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | 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,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| wait-for-expect | package.json |
|
||||
| @backstage/backend-test-utils | 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-backend | 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,78 @@
|
||||
# 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 (13)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------------------|:-------------|
|
||||
| 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/core-app-api | package.json |
|
||||
| @backstage/core-components | package.json |
|
||||
| @types/terser-webpack-plugin | 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 (11)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------------|:-------------------------------------------------------------------------------------------------|
|
||||
| prettier | src/commands/migrate/packageLintConfigs.ts |
|
||||
| react-dom/client | src/lib/bundler/hasReactDomClient.ts |
|
||||
| react/package.json | src/lib/bundler/server.ts |
|
||||
| supertest | templates/default-backend-plugin/src/service/router.test.ts |
|
||||
| winston | templates/default-backend-plugin/src/service/router.ts |
|
||||
| express-promise-router | templates/default-backend-plugin/src/service/router.ts |
|
||||
| react | templates/default-react-plugin-package/src/components/ExampleComponent/ExampleComponent.test.tsx |
|
||||
| @testing-library/react | templates/default-react-plugin-package/src/components/ExampleComponent/ExampleComponent.test.tsx |
|
||||
| react | templates/default-react-plugin-package/src/components/ExampleComponent/ExampleComponent.tsx |
|
||||
| @material-ui/core | templates/default-react-plugin-package/src/components/ExampleComponent/ExampleComponent.tsx |
|
||||
| @backstage/plugin-scaffolder-node | templates/scaffolder-module/src/actions/example/example.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,25 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:--------|:-------------|
|
||||
| history | package.json |
|
||||
|
||||
## Unused devDependencies (12)
|
||||
|
||||
| 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/jest-dom | 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 |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
| @backstage/plugin-catalog | package.json |
|
||||
| @backstage/plugin-puppetdb | package.json |
|
||||
| @backstage/plugin-stackstorm | package.json |
|
||||
| @backstage/frontend-test-utils | package.json |
|
||||
| @oriflame/backstage-plugin-score-card | package.json |
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# 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 (11)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| cross-fetch | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @types/zen-observable | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @types/google-protobuf | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @backstage/core-app-api | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
## Unlisted dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:--------|:---------------------------------------|
|
||||
| csstype | src/components/Lifecycle/Lifecycle.tsx |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:--------|:-------------|
|
||||
| history | package.json |
|
||||
|
||||
## Unused devDependencies (7)
|
||||
|
||||
| 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/jest-dom | package.json |
|
||||
| @testing-library/user-event | package.json |
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (5)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------------------|:-------------|
|
||||
| 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,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:-----------------|:-------------|
|
||||
| @backstage/theme | package.json |
|
||||
|
||||
## Unused devDependencies (7)
|
||||
|
||||
| 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/jest-dom | 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,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unlisted dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------------------------|
|
||||
| @typescript-eslint/parser | .eslintrc.js |
|
||||
| estree | lib/visitImports.js |
|
||||
| estree | rules/no-undeclared-imports.js |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------------|:-------------|
|
||||
| lodash | package.json |
|
||||
| @material-ui/core | package.json |
|
||||
| @backstage/core-components | package.json |
|
||||
|
||||
## Unused devDependencies (7)
|
||||
|
||||
| Name | Location |
|
||||
|:-------------------------------|:-------------|
|
||||
| history | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
| @backstage/frontend-app-api | package.json |
|
||||
| @backstage/frontend-test-utils | package.json |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/jest-dom | 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,20 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------|:-------------|
|
||||
| @material-ui/core | package.json |
|
||||
|
||||
## Unused devDependencies (7)
|
||||
|
||||
| Name | Location |
|
||||
|:---------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/dom | package.json |
|
||||
| @backstage/dev-utils | package.json |
|
||||
| @backstage/test-utils | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
| @backstage/core-components | 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 |
|
||||
|
||||
@@ -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,37 @@
|
||||
|
||||
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,
|
||||
@@ -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(
|
||||
'*************************************************************************************',
|
||||
@@ -1443,3 +1443,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,12 @@
|
||||
|
||||
import { OptionValues } from 'commander';
|
||||
import {
|
||||
createTemporaryTsConfig,
|
||||
buildDocs,
|
||||
categorizePackageDirs,
|
||||
createTemporaryTsConfig,
|
||||
runApiExtraction,
|
||||
runCliExtraction,
|
||||
buildDocs,
|
||||
runKnipReports,
|
||||
} from './api-extractor';
|
||||
import { paths as cliPaths, resolvePackagePaths } from '../../lib/paths';
|
||||
import { generateTypeDeclarations } from './generateTypeDeclarations';
|
||||
@@ -94,6 +95,7 @@ export const buildApiReports = async (paths: string[] = [], opts: Options) => {
|
||||
validateReleaseTags: opts.validateReleaseTags,
|
||||
});
|
||||
}
|
||||
|
||||
if (cliPackageDirs.length > 0) {
|
||||
console.log('# Generating package CLI reports');
|
||||
await runCliExtraction({
|
||||
@@ -102,6 +104,14 @@ export const buildApiReports = async (paths: string[] = [], opts: Options) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (selectedPackageDirs.length > 0) {
|
||||
console.log('# Generating package knip reports');
|
||||
await runKnipReports({
|
||||
packageDirs: selectedPackageDirs,
|
||||
isLocalBuild: !isCiBuild,
|
||||
});
|
||||
}
|
||||
|
||||
if (isDocsBuild) {
|
||||
console.log('# Generating package documentation');
|
||||
await buildDocs({
|
||||
|
||||
@@ -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,16 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (1)
|
||||
|
||||
| Name | Location |
|
||||
|:------------------|:-------------|
|
||||
| @material-ui/core | package.json |
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| msw | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Knip report
|
||||
|
||||
## Unused dependencies (2)
|
||||
|
||||
| Name | Location |
|
||||
|:----------------|:-------------|
|
||||
| @emotion/react | package.json |
|
||||
| @emotion/styled | package.json |
|
||||
|
||||
## Unused devDependencies (4)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| @mui/styles | package.json |
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | 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,10 @@
|
||||
# Knip report
|
||||
|
||||
## Unused devDependencies (3)
|
||||
|
||||
| Name | Location |
|
||||
|:--------------------------|:-------------|
|
||||
| @backstage/cli | package.json |
|
||||
| @testing-library/react | package.json |
|
||||
| @testing-library/jest-dom | package.json |
|
||||
|
||||
Reference in New Issue
Block a user