-
Notifications
You must be signed in to change notification settings - Fork 9
fix: remove unused dependencies #2578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes unused dependencies identified by the Knip tool and adds Knip configuration files to document false positives. The changes help reduce bundle size and clarify which dependencies are intentionally kept despite appearing unused.
Changes:
- Removed 3 unused dependencies from frontend:
@faker-js/faker,@tanstack/react-router-devtools, andhistory - Removed 4 unused dependencies from backend:
source-map-support,ts-loader,ts-node, andtsconfig-paths - Added Knip configuration files to both frontend and backend to document intentionally kept dependencies
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/package.json | Removed three unused dev dependencies that are not imported or used in the codebase |
| frontend/knip.config.ts | Added configuration to whitelist @testing-library/user-event which is exported from test-utils.tsx |
| backend/package.json | Removed four unused dev dependencies related to TypeScript compilation and source mapping |
| backend/knip.config.ts | Added empty configuration file with comment indicating no false positives |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unused frontend dependencies: @faker-js/faker, @tanstack/react-router-devtools, history - Remove unused backend dependencies: source-map-support, ts-loader, ts-node, tsconfig-paths - Add documentation for reporting Knip false positives upstream - Remove team-specific knip.config.ts files (config is managed upstream)
8753840 to
b8c3861
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mishraomp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This PR removes unused dependencies identified by Knip and adds documentation for reporting false positives upstream.
Changes
Removed Dependencies
Frontend:
@faker-js/faker- Not used in codebase@tanstack/react-router-devtools- Not imported or usedhistory- Not used (TanStack Router has its own history implementation)Backend:
source-map-support- Not imported or usedts-loader- Not used (project uses SWC via nest-cli.json)ts-node- Not used in scriptstsconfig-paths- Not used (using NodeNext module resolution)Documentation Added
Added a new "Dependency Scanning with Knip" section to the README that includes:
bcgov/action-test-and-analyseConfiguration
Note: Team-specific
knip.config.tsfiles are not used. All Knip configuration is managed centrally in the upstreambcgov/action-test-and-analyserepository. Teams should report false positives upstream rather than maintaining local config files.False Positive: @testing-library/user-event
@testing-library/user-eventwas flagged but is a false positive. It's exported fromtest-utils.tsxfor use in tests but not directly imported yet. This should be reported upstream tobcgov/action-test-and-analysefor addition to.knip.jsonif needed (see README for process).Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: