Skip to content

fix: proxy from env v2 fix#7499

Merged
jasonsaayman merged 6 commits intov1.xfrom
fix/proxy-from-env-v2-fix
Mar 14, 2026
Merged

fix: proxy from env v2 fix#7499
jasonsaayman merged 6 commits intov1.xfrom
fix/proxy-from-env-v2-fix

Conversation

@jasonsaayman
Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman commented Mar 13, 2026

Summary by cubic

Fixes env-based proxy detection and ESM/CJS packaging by upgrading proxy-from-env to v2, switching to getProxyForUrl, and bundling it in the Node CJS build. Also stabilizes smoke tests by pinning vitest and bumping esbuild, and cleans up build configs.

Description

  • Summary of changes
    • Use named getProxyForUrl in lib/adapters/http.js.
    • Upgrade proxy-from-env to ^2.0.0.
    • Rollup: replace rollup-plugin-auto-external with a custom external to bundle proxy-from-env in the Node CJS build.
    • Bump build deps (@babel/core, @babel/preset-env, @rollup/plugin-babel); remove istanbul-instrumenter-loader.
    • Pin vitest to 4.0.18 in ESM smoke tests; bump esbuild; refresh root and smoke test lockfiles.
    • Remove mise.toml.
  • Reasoning
    • proxy-from-env v2 is ESM with named exports; bundling it avoids CJS runtime errors.
    • Pinning vitest and updating esbuild stabilize ESM/CJS smoke tests and reduce lock churn.
  • Additional context
    • No API changes; behavior is unchanged aside from the fix.

Docs

No docs updates needed.

Testing

No new unit tests. Updated ESM and CJS smoke test fixtures and lockfiles; verified both builds load and run. Optional: add a test asserting env-based proxy resolution when config.proxy is undefined.

Written for commit c1ad448. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files

Confidence score: 4/5

  • This PR is likely safe to merge, with minimal risk driven by a single medium-severity dependency consistency issue rather than a runtime breakage.
  • The main concern is in package.json: the ESM smoke fixture lockfile was not updated, so CI may continue validating proxy-from-env@^1.1.0 instead of the newly bumped v2, which can mask integration differences.
  • Because confidence is high on this finding, it’s worth fixing before or immediately after merge to keep test coverage aligned with the actual dependency graph.
  • Pay close attention to package.json - ensure the ESM smoke fixture lockfile is updated so CI exercises the v2 dependency path.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="package.json">

<violation number="1" location="package.json:167">
P2: Update the ESM smoke fixture lockfile too, or CI will keep testing `proxy-from-env@^1.1.0` instead of the v2 dependency you just bumped.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@jasonsaayman jasonsaayman merged commit e943f6c into v1.x Mar 14, 2026
13 checks passed
@jasonsaayman jasonsaayman deleted the fix/proxy-from-env-v2-fix branch March 14, 2026 17:10
@JamesHenry
Copy link
Copy Markdown

Hi @jasonsaayman, please can you publish a new version with this in?

@jasonsaayman
Copy link
Copy Markdown
Member Author

will do soon have one or two items to wrap up then i will release, should be this week still

@JamesHenry
Copy link
Copy Markdown

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::fix The PR is related to a bugfix priority::high A high priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants