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: yarn.lock is missing when compiling the package as a dependency #24

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

D4ryl00
Copy link
Contributor

@D4ryl00 D4ryl00 commented Nov 22, 2024

fixes #23

Like package-lock.json, yarn.lock will be ignore if not present to the root folder:
One key detail about package-lock.json is that it cannot be published, and it will be ignored if found in any place other than the toplevel package.
https://docs.npmjs.com/cli/v6/configuring-npm/package-lock-json

So just make it optional from the Makefile.

@D4ryl00 D4ryl00 self-assigned this Nov 22, 2024
@D4ryl00 D4ryl00 changed the title fix: change semantic release plugin for yarn fix: yarn.lock is missing when compiling the package as a library Nov 25, 2024
@D4ryl00 D4ryl00 changed the title fix: yarn.lock is missing when compiling the package as a library fix: yarn.lock is missing when compiling the package as a dependency Nov 25, 2024
jefft0
jefft0 previously approved these changes Nov 25, 2024
@jefft0 jefft0 self-requested a review November 25, 2024 11:05
@jefft0 jefft0 dismissed their stale review November 25, 2024 11:05

Approved by mistake too early

Copy link
Collaborator

@jefft0 jefft0 left a comment

Choose a reason for hiding this comment

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

To reproduce the bug in issue #23, I did:

npx create-expo-app@latest testexpo
cd testexpo
npx expo install @berty/weshnet-expo
npx expo prebuild --clean -p ios

It prints the error No rule to make target yarn.lock', needed by node_modules' .

To test the fix in the PR, I did:

cd
git clone https://github.com/D4ryl00/weshnet-expo --branch fix/yarnlock
cd weshnet-expo
make
npm pack
cd ..
rm -rf testexpo
npx create-expo-app@latest testexpo
cd testexpo
npm install ../weshnet-expo/berty-weshnet-expo-0.0.2.tgz
npx expo prebuild --clean -p ios

It builds without error.

@D4ryl00 D4ryl00 merged commit 431e747 into berty:main Nov 25, 2024
1 check passed
@D4ryl00 D4ryl00 deleted the fix/yarnlock branch November 25, 2024 12:37
Copy link

🎉 This PR is included in version 1.0.3 🎉

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.

Installing in a new react-native project: missing yarn.lock
2 participants