Skip to content

Conversation

@sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Oct 29, 2025

Description

This PR fixes this ecosystem-ci failure: https://github.com/vitejs/vite-ecosystem-ci/actions/runs/18900807449/job/53947420616

It seems #8746 was wrong. It seems it was returning modules that should not be treated as builtin in some environments.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link

netlify bot commented Oct 29, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 73d41ce
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6901fff3506d0f000867d658
😎 Deploy Preview https://deploy-preview-8863--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sapphi-red sapphi-red changed the title chore: try Vite 7.2 fix(module-runner): don't return node builtins for getBuiltins unconditionally Oct 29, 2025
@sapphi-red
Copy link
Contributor Author

The test failure is caused by nodejs/node#60336

@sapphi-red sapphi-red marked this pull request as ready for review October 29, 2025 12:02
@sheremet-va
Copy link
Member

This PR fixes this ecosystem-ci failure: vitejs/vite-ecosystem-ci/actions/runs/18900807449/job/53947420616

I doubt that it has any effect, because we do the builtin check ourselves:

if (isBuiltin(rawId) || rawId.startsWith(browserExternalId)) {

The getBuiltin here is just so it doesn't fail in VIte 7.2

@sapphi-red
Copy link
Contributor Author

I didn't trace down the implementation, but it does actually fix the test failure.
The tests failed with Vite 7.2 beta without the change (83ebae5) and passed with the change (09da758).

@sheremet-va
Copy link
Member

sheremet-va commented Oct 29, 2025

I didn't trace down the implementation, but it does actually fix the test failure. The tests failed with Vite 7.2 beta without the change (83ebae5) and passed with the change (09da758).

Hm, I guess for mocking it does matter that we go into fetchModule. Then we should always ignore it. I think the comment should mention that we have to go inside the fetchModule function, and that's why we don't return anything - "we don't know the builtins beforehand" doesn't make much sense because we do know them

@sapphi-red
Copy link
Contributor Author

I've updated the comment, does this make sense?

@sheremet-va
Copy link
Member

sheremet-va commented Oct 29, 2025

I don't think it matters much for the server runner because it doesn't have a mocker and is just a light wrapper, but the comment makes sense in the runtime module runner 👍

Copy link
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

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

Thank you!

@sheremet-va sheremet-va merged commit 0e858ba into vitest-dev:main Oct 29, 2025
11 of 14 checks passed
@sapphi-red sapphi-red deleted the chore/try-vite-7.2 branch October 29, 2025 12:51
Copilot AI pushed a commit that referenced this pull request Nov 6, 2025
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.

2 participants