-
Notifications
You must be signed in to change notification settings - Fork 135
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): initialising in projects using Yarn v3 #2025
fix(cli): initialising in projects using Yarn v3 #2025
Conversation
I was actually thinking of moving the repo to yarn v4 (I guess 3 for the template project works though). Do either of you see any issue with that? |
Just make sure to properly set |
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.
Approved, might take a bit to merge as we have some CI issues to fix.
So this PR is ready to go, but to release a new version of |
@szymonrybczak Could you run |
bc367f9
to
5a742f2
Compare
hey @Saadnajmi, so the command that you sent is not working with current setup. I checked why, and it's because the root react-native-macos/package.json Lines 111 to 113 in 740732e
packages/react-native-macos-init has the same value, so: beachball.shouldPublish=false . After tweaking this value in packages/react-native-macos-init/package.json to true the change file is correctly added and generated.
diff --git a/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json b/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json
new file mode 100644
index 0000000000..1ee6fb29f3
--- /dev/null
+++ b/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json
@@ -0,0 +1,7 @@
+{
+ "type": "patch",
+ "comment": "fix(cli): initialising in projects using Yarn v3",
+ "packageName": "react-native-macos-init",
+ "email": "szymon.rybczak@gmail.com",
+ "dependentChangeType": "patch"
+} Do you think we can change this value for this package? and should we do it in under this PR or in the separate? |
derp, I missed that in the react-native-macos-init package.json. Yes, please set it to true in this PR and then I'll merge :) |
The thing is that it wasn't specified! I assume that is getting value from the root's |
@microsoft-github-policy-service agree company="Callstack" |
@microsoft-github-policy-service agree |
@szymonrybczak Looks like there are other issues I'll still have to investigate. We haven't had to release a new version of |
21c537c
to
8f67e63
Compare
@Saadnajmi ah, okay. I've removed the last commit. Should be good to merge. |
Sorry, last two commits. Looks like adding the change file is what causes the break |
8f67e63
to
5a742f2
Compare
Has the the NPM package been updated for this script? |
@seanstrom I think not, I can look into it |
Please select one of the following
Summary:
Recently in React Native Community CLI we added bumping Yarn version in every new project created to Yarn v3 (PR for more context). And In Yarn v3 flag
-s
doesn't exists anymore, so thereact-native-macos-init
tool won't work.I've replaced usage of
-s
with--silent
flag. Also this change is backward compatible, since Yarn v1 support--silent
flag.Changelog:
[GENERAL] [FIXED] - Initialising
react-native-macos
in project using Yarn v3 withreact-native-macos-init
Test Plan:
npx react-native@latest init
and bump Yarn version to 3 (we didn't released changes with bumping version by default yet.react-native-macos-init