-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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): pnpm npmrc #2561
fix(cli): pnpm npmrc #2561
Conversation
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.
LGTM 👍
const npmrcPath = path(targetPath, ".npmrc") | ||
const npmrcContents = read(npmrcPath) | ||
write(npmrcPath, `${npmrcContents}${EOL}node-linker=hoisted${EOL}`) |
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.
FYI, gluegun has a built-in patching library that makes this a little simpler.
To keep the style elsewhere in this file don't use this, but as an (untested) example:
const npmrcPath = path(targetPath, ".npmrc") | |
const npmrcContents = read(npmrcPath) | |
write(npmrcPath, `${npmrcContents}${EOL}node-linker=hoisted${EOL}`) | |
const npmrcPath = path(targetPath, ".npmrc") | |
await patching.append(npmrcPath, `${EOL}node-linker=hoisted${EOL}`) |
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.
lgtm!
## [9.0.1](v9.0.0...v9.0.1) (2023-11-20) ### Bug Fixes * **cli:** pnpm npmrc ([#2561](#2561) by [@frankcalise](https://github.com/frankcalise) [@morganick](https://github.com/morganick)) ([4ae5c0b](4ae5c0b)) * **cli:** remove demo when spaces in path ([#2563](#2563) by [@frankcalise](https://github.com/frankcalise)) ([b5133a3](b5133a3))
🎉 This PR is included in version 9.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe your PR
pnpm
had some troubles and requires additional config