Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the default output format from CommonJS to ES module format for Rstest. This is a breaking change that makes ES modules the default module system, aligning with modern JavaScript standards. Users can still opt-in to CommonJS format by explicitly setting output.module to false.
Key Changes:
- Changed default value of
output.modulefromfalsetotrue(ES module format is now the default) - Updated environment variable logic from
RSTEST_OUTPUT_MODULE === 'true'toRSTEST_OUTPUT_MODULE !== 'false'to enable by default - Updated all documentation and test files to reflect the new default behavior
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/en/config/build/output.mdx | Updated English documentation to reflect new default value of true and inverted example code |
| website/docs/zh/config/build/output.mdx | Updated Chinese documentation to reflect new default value of true and inverted example code |
| packages/core/src/core/rstest.ts | Changed environment variable check logic to enable ES modules by default (two occurrences) |
| e2e/watch/shortcuts.test.ts | Updated test fixture path logic to match new default behavior (two occurrences) |
| e2e/watch/restart.test.ts | Updated test fixture path logic to match new default behavior |
| e2e/watch/index.test.ts | Updated test fixture path logic to match new default behavior |
| e2e/mock/tests/mock.test.ts | Updated conditional test logic to match new default behavior |
| e2e/externals/interop.test.ts | Updated test arguments logic to match new default behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Change the default output format from CommonJS to ES module format for Rstest.
This change makes ES modules the default module system, aligning with modern JavaScript standards.
Users can still opt-in to CommonJS format by explicitly setting
output.moduleto false.This change will make Rstest run more stably and avoid test failures due to issues with externalizing CommonJS modules.
close: #638
Checklist