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

chore: migrate to npm #529

Closed
wants to merge 4 commits into from
Closed

Conversation

TheKohan
Copy link
Contributor

This PR changes package manager from yarn to npm to align with the rest of the Expensify repos.

Details

  • adjusted run scripts
  • went through all the dependencies and removed some that were unnecessary (only types).
  • adjusted ci
  • adjusted docs
  • modified node_modules resolution across the project, because npm cannot be blocked from hoisting packages (RFC)

Related Issues

Manual Tests

  • tried to

Linked PRs

@TheKohan TheKohan changed the title feat: migrate to npm chore: migrate to npm Oct 28, 2024
@@ -56,7 +56,7 @@ jobs:
example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: build-ios-pods-${{ matrix.react-native-architecture }}-${{ hashFiles('example/node_modules/react-native/package.json') }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

react-native is now hoisted to the root

@@ -11,9 +11,9 @@ react {
// The root of your project, i.e. where "package.json" lives. Default is '../..'
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
reactNativeDir = file("../../../node_modules/react-native")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly don't know if that could be inferred somehow it was commented out by default, but RN was resolved in /example/node_modules with yarn.


// We need to make sure that only one version is loaded for peerDependencies
// So we block them at the root, and alias them to the versions in example's node_modules
resolver: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was no longer necessary i suppose, since we didn't need to substitute react-native from example/node_modules

@tomekzaw
Copy link
Collaborator

Closing this PR in favor of #539

@tomekzaw tomekzaw closed this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants