fix: bump global-agent to 4.1.3 to drop deprecated boolean dep#6905
Draft
danskmt wants to merge 1 commit into
Draft
fix: bump global-agent to 4.1.3 to drop deprecated boolean dep#6905danskmt wants to merge 1 commit into
danskmt wants to merge 1 commit into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
|
653e303 to
c843efb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Submission Checklist
What does this PR do?
Bumps
global-agentfrom2.2.0/3.0.0to4.1.3in both the root CLI and thets-binary-wrapper, removing the deprecatedbooleantransitive dependency that triggerednpm WARN deprecated boolean@3.2.0: Package no longer supportedonnpm i -g snyk.boolean(androarr) were only fully dropped starting atglobal-agent@4.1.x, and4.1.3is the only4.1.xwith a working publisheddist.Changes:
package.json:global-agent^2.1.12->^4.1.3, add@types/global-agentdevDependency (v4.1.3'stypingsfield points to a non-existent path).ts-binary-wrapper/package.json:global-agent^3.0.0->^4.1.3, add@types/global-agentdevDependency.ts-binary-wrapper/src/common.ts: v4 removed theglobal-agent/bootstrapsubpath, so swapimport 'global-agent/bootstrap'forimport { bootstrap } from 'global-agent'+ an explicitbootstrap()call (proxy env vars are still set first).patches/global-agent+2.2.0.patch: thesocketPathbypass it added is now upstream in 4.1.3 (keeping it failspatch-packagedue to the version mismatch).package-lock.jsonfiles.The process-wide proxy injection in
src/lib/requestandsrc/lib/plugins/sastis unchanged — samebootstrap({ environmentVariableNamespace: '' })behavior, just on aboolean-free version.Why bump instead of removing
global-agent?Removing
global-agententirely (the CLI-859 axios approach) was deliberately kept out of scope because of its impact:global-agent.bootstrap()monkey-patches Node's globalhttp/https, giving process-wide proxy coverage. Many components rely on this indirectly —needleAPI calls,@snyk/code-client(a third-party lib you cannot pass an agent to), Sentry, analytics, etc.NO_PROXY,ignoreUnknownCA, Snyk Code, broker/LCE).^22 || ^24, but the proxy-architecture risk above remains.Bumping to
4.1.3clears the deprecation warning with zero proxy-behavior change, and full removal can be tackled separately under CLI-859 with dedicated proxy testing.Where should the reviewer start?
ts-binary-wrapper/src/common.ts- the v4 bootstrap import changepackage.json/ts-binary-wrapper/package.json- version bumps +@types/global-agentpatches/global-agent+2.2.0.patch(socketPath fix now upstream)How should this be manually tested?
npm i -g ./snyk.tgzand confirm there is noboolean@3.xdeprecation warning.npm ls booleanreturns nothing in both the root andts-binary-wrapper.HTTPS_PROXY/NO_PROXY) and confirm requests + Snyk Code still route through the proxy.Automated coverage (existing):
test/tap/proxy.test.js(10/10 pass) exercises therequest.tsglobal-agent path, andts-binary-wrapper/test/unit/common.spec.ts(26/26 pass) covers the binary-download path afterbootstrap().What's the product update that needs to be communicated to CLI users?
None directly user-facing beyond removing the deprecation warning shown during
npm i -g snyk.Risk assessment (Low | Medium | High)?
Low. Dependency bump with an unchanged public proxy API; the custom socketPath patch is now upstream. Proxy and binary-download behavior verified by existing test suites.
Any background context you want to provide?
global-agent@3.0.0still depends onbooleandirectly and viaroarr;4.0.0still pullsbooleanviaroarr@7;4.1.0-4.1.2are broken publishes shipping nodist.4.1.3is the first installable release withoutboolean. Fully removingglobal-agentfrom the main CLI (CLI-859, axios-based) remains separate, larger follow-up work that needs full proxy regression testing.What are the relevant tickets?
CLI-1417
Screenshots (if appropriate)
N/A