-
Notifications
You must be signed in to change notification settings - Fork 135
fix(cli): auto-generate .yarnrc.yml to disable pnp for tsx support #2003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): auto-generate .yarnrc.yml to disable pnp for tsx support #2003
Conversation
Merge activity
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds automatic generation of a .yarnrc.yml file during project initialization to disable Yarn's Plug'n'Play feature, addressing compatibility issues with TSX and older Node versions.
- Added
.yarnrc.ymlfile generation in/packages/toolchain/cli/src/commands/init.rswithnodeLinker: node-modulesconfiguration - Included explanatory comment linking to TSX compatibility issue (privatenumber/tsx#166)
- Implemented file generation before README.md creation for TypeScript/JavaScript projects
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
| fs::write(project_path.join(test_name), test_body).await?; | ||
|
|
||
| // Yarn P'n'P doesn't play nice with TSX and older Node versions (https://github.com/privatenumber/tsx/issues/166) | ||
| let yarnrc_body = "nodeLinker: node-modules\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding a version field to the .yarnrc.yml file to ensure compatibility with future Yarn versions
…2003) <!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->

Changes