Closed szymonrybczak closed 7 months ago
cc @Saadnajmi @tido64
cc @Saadnajmi @tido64
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?
Do either of you see any issue with that?
Just make sure to properly set nodeLinker
value in the Yarn config file, I think that's the most important thing.
So this PR is ready to go, but to release a new version of react-native-macos-init
, we use beachball, which works by generating a change file (aka, running yarn change
). For some reason, that is not working, so if I merge this as is, we won't get a new package. Bear with me while I sort that out!
@szymonrybczak Could you run yarn change --type patch --message 'fix(cli): initialising in projects using Yarn v3'
in packages/react-native-macos-init
to hopefully force a change file to show up and get added as a commit?
hey @Saadnajmi, so the command that you sent is not working with current setup. I checked why, and it's because the root package.json
has:
https://github.com/microsoft/react-native-macos/blob/740732e06c6597e20e9a6824d3cca1f9e99d8bed/package.json#L111-L113 and 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?
hey @Saadnajmi, so the command that you sent is not working with current setup. I checked why, and it's because the root
package.json
has:and
packages/react-native-macos-init
has the same value, so:beachball.shouldPublish=false
. After tweaking this value inpackages/react-native-macos-init/package.json
totrue
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 :)
derp, I missed that in the react-native-macos-init package.json.
The thing is that it wasn't specified! I assume that is getting value from the root's package.json
π
@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 react-native-macos-init
since it was created really, so I'm realizing now the CI to publish stuff as issues π
. I'll try to make that fix and then update back here. Meanwhile, I think you can undo your last commit and I'll merge the PR as is.
@Saadnajmi ah, okay. I've removed the last commit. Should be good to merge.
@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
Has the the NPM package been updated for this script? If not could someone publish an update please π
cc @szymonrybczak @Saadnajmi
@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
I've replaced usage of
-s
doesn't exists anymore, so thereact-native-macos-init
tool won't work.-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