-
Notifications
You must be signed in to change notification settings - Fork 130
fix: remove unused dependencies from package.json
#1953
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
fix: remove unused dependencies from package.json
#1953
Conversation
Co-authored-by: B4nan <615580+B4nan@users.noreply.github.com>
Preview for this PR was built for commit |
1 similar comment
Preview for this PR was built for commit |
package.json
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.
I hand-checked and removed few more unused dependencies.
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: PR Mismatch: Critical Dependencies Removed
The PR description states only globby
is removed, but the changes actually remove 12 other dependencies, including critical Docusaurus core, MDX, and ESLint packages. This mismatch misrepresents the PR's scope, making it difficult to review and likely breaking build and functionality.
package.json#L45-L88
Lines 45 to 88 in 68bd577
}, | |
"devDependencies": { | |
"@apify/eslint-config": "^1.0.0", | |
"@apify/tsconfig": "^0.1.0", | |
"@types/react": "^19.0.0", | |
"babel-plugin-styled-components": "^2.1.4", | |
"cross-env": "^7.0.3", | |
"eslint": "^9.32.0", | |
"eslint-plugin-react": "^7.37.5", | |
"globals": "^16.0.0", | |
"markdownlint": "^0.38.0", | |
"markdownlint-cli": "^0.45.0", | |
"patch-package": "^8.0.0", | |
"path-browserify": "^1.0.1", | |
"rimraf": "^6.0.0", | |
"typescript": "5.9.2", | |
"typescript-eslint": "^8.38.0" | |
}, | |
"dependencies": { | |
"@apify/ui-library": "^1.0.0", | |
"@docusaurus/core": "^3.8.1", | |
"@docusaurus/faster": "^3.8.1", | |
"@docusaurus/plugin-client-redirects": "^3.8.1", | |
"@docusaurus/plugin-content-docs": "^3.8.1", | |
"@docusaurus/preset-classic": "^3.8.1", | |
"@docusaurus/theme-common": "^3.8.1", | |
"@docusaurus/theme-mermaid": "^3.8.1", | |
"@giscus/react": "^3.0.0", | |
"@redocly/cli": "^1.27.1", | |
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.1", | |
"clsx": "^2.0.0", | |
"docusaurus-plugin-image-zoom": "^3.0.1", | |
"docusaurus-plugin-openapi-docs": "^4.3.7", | |
"docusaurus-theme-openapi-docs": "^4.3.7", | |
"github-buttons": "^2.28.0", | |
"postcss-preset-env": "^10.0.0", | |
"prism-react-renderer": "^2.4.0", | |
"prop-types": "^15.8.1", | |
"raw-loader": "^4.0.2", | |
"react": "^19.1.0", | |
"react-dom": "^19.1.0", | |
"react-github-btn": "^1.4.0", | |
"styled-components": "6.1.19", | |
"unist-util-visit": "^5.0.0" |
Comment @cursor review
or bugbot run
to trigger another review on this PR
Preview for this PR was built for commit |
The `globby` package was listed as a direct dependency in `devDependencies` but is not actually used anywhere in the codebase. This dependency is only needed as a transitive dependency through existing packages. ## Analysis A comprehensive search of the codebase revealed: - No direct imports or usage of `globby` in any source files - `globby` is available as a transitive dependency through: - `@docusaurus/core` → `@docusaurus/bundler` → `copy-webpack-plugin` → `globby@13.2.2` - `@docusaurus/utils` → `globby@11.1.0` ## Changes - Removed `"globby": "^14.0.0"` from `devDependencies` in `package.json` - Updated `package-lock.json` to reflect the removal of the extraneous package ## Testing All functionality remains intact after the removal: - ✅ ESLint and code linting work correctly - ✅ Markdown linting works correctly - ✅ API documentation build (`redoc:test`) succeeds - ✅ Docusaurus core functionality is unaffected - ✅ Transitive dependencies continue to provide needed functionality This change follows best practices by only listing packages as direct dependencies when they are actually imported or used directly in the project code. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `otel.cloud.redocly.com` > - Triggering command: `node /home/REDACTED/work/apify-docs/apify-docs/node_modules/.bin/redocly lint` (dns block) > - Triggering command: `node /home/REDACTED/work/apify-docs/apify-docs/node_modules/.bin/redocly bundle apify-api/openapi/openapi.yaml -o apify-api` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/apify/apify-docs/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > remove dependency on globby from package.json, it is not used directly, only as part of our dependencies </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes several unused dependencies/devDependencies from `package.json` and updates `package-lock.json` accordingly. > > - **Dependencies cleanup**: > - Remove unused `@docusaurus/utils`, `@mdx-js/react`, `ajv`, `form-data`, `proxy-from-env`, `search-insights`. > - **DevDependencies cleanup**: > - Remove unused `@rsbuild/plugin-styled-components`, `eslint-plugin-json`, `eslint-plugin-markdown`, `eslint-plugin-react-hooks`, `fs-extra`, `globby`. > - **Lockfile**: > - Prunes corresponding entries from `package-lock.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 68bd577. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: B4nan <615580+B4nan@users.noreply.github.com> Co-authored-by: Jindřich Bär <jindrichbar@gmail.com>
The
globby
package was listed as a direct dependency indevDependencies
but is not actually used anywhere in the codebase. This dependency is only needed as a transitive dependency through existing packages.Analysis
A comprehensive search of the codebase revealed:
globby
in any source filesglobby
is available as a transitive dependency through:@docusaurus/core
→@docusaurus/bundler
→copy-webpack-plugin
→globby@13.2.2
@docusaurus/utils
→globby@11.1.0
Changes
"globby": "^14.0.0"
fromdevDependencies
inpackage.json
package-lock.json
to reflect the removal of the extraneous packageTesting
All functionality remains intact after the removal:
redoc:test
) succeedsThis change follows best practices by only listing packages as direct dependencies when they are actually imported or used directly in the project code.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
otel.cloud.redocly.com
node /home/REDACTED/work/apify-docs/apify-docs/node_modules/.bin/redocly lint
(dns block)node /home/REDACTED/work/apify-docs/apify-docs/node_modules/.bin/redocly bundle apify-api/openapi/openapi.yaml -o apify-api
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Removes several unused dependencies/devDependencies from
package.json
and updatespackage-lock.json
accordingly.@docusaurus/utils
,@mdx-js/react
,ajv
,form-data
,proxy-from-env
,search-insights
.@rsbuild/plugin-styled-components
,eslint-plugin-json
,eslint-plugin-markdown
,eslint-plugin-react-hooks
,fs-extra
,globby
.package-lock.json
.Written by Cursor Bugbot for commit 68bd577. This will update automatically on new commits. Configure here.