Skip to content
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

Merged
merged 2 commits into from
Nov 20, 2023
Merged

fix(cli): pnpm npmrc #2561

merged 2 commits into from
Nov 20, 2023

Conversation

frankcalise
Copy link
Contributor

Describe your PR

Copy link
Contributor

@morganick morganick left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Comment on lines +581 to +583
const npmrcPath = path(targetPath, ".npmrc")
const npmrcContents = read(npmrcPath)
write(npmrcPath, `${npmrcContents}${EOL}node-linker=hoisted${EOL}`)
Copy link
Member

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:

Suggested change
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}`)

Copy link
Member

@jamonholmgren jamonholmgren left a comment

Choose a reason for hiding this comment

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

lgtm!

@frankcalise frankcalise merged commit 4ae5c0b into master Nov 20, 2023
1 check was pending
@frankcalise frankcalise deleted the fix/2559 branch November 20, 2023 16:36
infinitered-circleci pushed a commit that referenced this pull request Nov 20, 2023
## [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))
@infinitered-circleci
Copy link

🎉 This PR is included in version 9.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v9 (pnpm): new Expo Prebuild project missing expo-modules-core
4 participants