Skip to content

migrate tests from node-fetch to fetch directly#15233

Closed
LukeSheard wants to merge 4 commits intomainfrom
02-24-migrate_tests_from_node-fetch_to_fetch_directly
Closed

migrate tests from node-fetch to fetch directly#15233
LukeSheard wants to merge 4 commits intomainfrom
02-24-migrate_tests_from_node-fetch_to_fetch_directly

Conversation

@LukeSheard
Copy link
Copy Markdown
Contributor

@LukeSheard LukeSheard commented Feb 24, 2026

Overview

Replace usage of node-fetch with fetch

Note

Low Risk Change

This PR migrates test files from node-fetch to native fetch API, containing only import removals, test utility updates, and minor type casting changes with no security or business logic impact.

  • Removes node-fetch imports and replaces with native fetch across test files
  • Adds zod schema validation for JSON response parsing in tests
  • Removes node-fetch workaround hack for redirect handling

Risk assessment for commit 660e603.

@LukeSheard LukeSheard requested review from a team as code owners February 24, 2026 17:07
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: 660e603

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor Author

LukeSheard commented Feb 24, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 24, 2026

📦 CLI Tarball Ready

The Vercel CLI tarball for this PR is now available!

Quick Test

You can test this PR's CLI directly by running:

npx https://vercel-qnwhdgtz0.vercel.sh/tarballs/vercel.tgz --help

Use in vercel.json

To use this CLI version in your project builds, add to your vercel.json:

{
  "build": {
    "env": {
      "VERCEL_CLI_VERSION": "vercel@https://vercel-qnwhdgtz0.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

Python Runtime Wheel

A vercel-runtime wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_RUNTIME_PYTHON="vercel-runtime @ https://vercel-qnwhdgtz0.vercel.sh/tarballs/vercel_runtime-0.6.0.dev1772122998+660e603-py3-none-any.whl"

Python Workers Wheel

A vercel-workers wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_WORKERS_PYTHON="vercel-workers @ https://vercel-qnwhdgtz0.vercel.sh/tarballs/vercel_workers-0.1.0.dev1772122998+660e603-py3-none-any.whl"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 24, 2026

🧪 Unit Test Strategy

Comparing: 3d87269660e603 (view diff)

Strategy: Code changed outside of a package - running all unit tests

⚠️ All unit tests will run because global code changes could impact all packages.

Affected packages - 15 (38%)
  1. vercel
  2. @vercel/build-utils
  3. @vercel/client
  4. @vercel/firewall
  5. @vercel/fs-detectors
  6. @vercel/go
  7. @vercel/hydrogen
  8. @vercel/next
  9. @vercel/node
  10. @vercel/python
  11. @vercel/remix-builder
  12. @vercel/ruby
  13. @vercel/rust
  14. @vercel/static-build
  15. examples
Unaffected packages - 25 (63%)
  1. @vercel-internals/get-package-json
  2. @vercel/backends
  3. @vercel/cervel
  4. @vercel/cli-auth
  5. @vercel/config
  6. @vercel/detect-agent
  7. @vercel/edge
  8. @vercel/elysia
  9. @vercel/error-utils
  10. @vercel/express
  11. @vercel/fastify
  12. @vercel/frameworks
  13. @vercel/functions
  14. @vercel/gatsby-plugin-vercel-builder
  15. @vercel/h3
  16. @vercel/hono
  17. @vercel/koa
  18. @vercel/nestjs
  19. @vercel/oidc
  20. @vercel/oidc-aws-credentials-provider
  21. @vercel/python-analysis
  22. @vercel/redwood
  23. @vercel/related-projects
  24. @vercel/routing-utils
  25. @vercel/static-config

Results

  • Unit tests: All affected packages will run unit tests
  • E2E tests: Running in parallel via E2E Tests workflow
  • Type checks: All affected packages will run type checks

This comment is automatically generated based on the affected testing strategy

@LukeSheard LukeSheard force-pushed the 02-24-migrate_tests_to_node-fetch_as_nodefetch_instead_of_fetch branch from 02d0e3f to 577ec30 Compare February 25, 2026 15:56
@LukeSheard LukeSheard force-pushed the 02-24-migrate_tests_from_node-fetch_to_fetch_directly branch 2 times, most recently from 2fe8f35 to 1092c73 Compare February 25, 2026 15:57
Base automatically changed from 02-24-migrate_tests_to_node-fetch_as_nodefetch_instead_of_fetch to main February 26, 2026 11:03
@LukeSheard LukeSheard force-pushed the 02-24-migrate_tests_from_node-fetch_to_fetch_directly branch from 1092c73 to 6e7bf78 Compare February 26, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant