Skip to content

Conversation

@hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Nov 25, 2025

Description

I was digging #9002 and just realizes the latest Node allows package without explicit type to have .js files with esm syntax (which was the case of react-datepicker). So, for this case, we don't need to force inlining it and keep it as external.

I thought I would just try it here, but apparently it broke something related jsdom and I am looking into it. (EDIT: it looks like this is due to existing tests being weak/incorrect.) I also haven't fully thought about pros and cons of this change.

It looks like this is originally --experimental-detect-module and got unflagged at the same time as require(esm) https://nodejs.org/en/blog/release/v20.19.0 https://nodejs.org/en/blog/release/v22.7.0

TODO

  • test

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:.

@hi-ogawa hi-ogawa changed the title fix: don't fallback to inlineing faux esm when node supports syntax detection fix: don't fallback to inlining faux esm when node supports syntax detection Nov 25, 2025
@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d500d86
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69256c2a6e7d9a00082e8b60
😎 Deploy Preview https://deploy-preview-9100--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.

@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c4b1509
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/692d30a26763490008821297
😎 Deploy Preview https://deploy-preview-9100--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.

…neing_faux_esm_when_node_supports_syntax_detection' into 11-25-fix_don_t_fallback_to_inlineing_faux_esm_when_node_supports_syntax_detection
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 1, 2025

@vitest/browser

npm i https://pkg.pr.new/@vitest/browser@9100

@vitest/browser-playwright

npm i https://pkg.pr.new/@vitest/browser-playwright@9100

@vitest/browser-preview

npm i https://pkg.pr.new/@vitest/browser-preview@9100

@vitest/browser-webdriverio

npm i https://pkg.pr.new/@vitest/browser-webdriverio@9100

@vitest/coverage-istanbul

npm i https://pkg.pr.new/@vitest/coverage-istanbul@9100

@vitest/coverage-v8

npm i https://pkg.pr.new/@vitest/coverage-v8@9100

@vitest/expect

npm i https://pkg.pr.new/@vitest/expect@9100

@vitest/mocker

npm i https://pkg.pr.new/@vitest/mocker@9100

@vitest/pretty-format

npm i https://pkg.pr.new/@vitest/pretty-format@9100

@vitest/runner

npm i https://pkg.pr.new/@vitest/runner@9100

@vitest/snapshot

npm i https://pkg.pr.new/@vitest/snapshot@9100

@vitest/spy

npm i https://pkg.pr.new/@vitest/spy@9100

@vitest/ui

npm i https://pkg.pr.new/@vitest/ui@9100

@vitest/utils

npm i https://pkg.pr.new/@vitest/utils@9100

vitest

npm i https://pkg.pr.new/vitest@9100

@vitest/web-worker

npm i https://pkg.pr.new/@vitest/web-worker@9100

@vitest/ws-client

npm i https://pkg.pr.new/@vitest/ws-client@9100

commit: c4b1509

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant