From aa9817a205e003ec3bc993bbeeb2384dcaa9eb8a Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Thu, 29 Aug 2024 23:50:25 -0700 Subject: [PATCH 1/7] fix: Port publish pipeline changes from 0.74 and 0.75 stable branches (#2180) --- .ado/publish.yml | 6 +++--- .ado/templates/apple-steps-publish.yml | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.ado/publish.yml b/.ado/publish.yml index b1ff1fea73e895..7ea3c4373a8031 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -1,5 +1,3 @@ -# It is expected that a `latestStableBranch` variable is set in the pipeline's settings: - # This file defines the build steps to publish a release name: $(Date:yyyyMMdd).$(Rev:.r) @@ -21,6 +19,9 @@ variables: - group: InfoSec-SecurityResults - name: tags value: production,externalfacing + # Remember to update this in previous stable branches when creating a new stable branch + - name : latestStableBranch + value: '0.75-stable' resources: repositories: @@ -137,7 +138,6 @@ extends: os: linux timeoutInMinutes: 90 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them - condition: eq(variables['Build.SourceBranchName'], 'main') templateContext: outputs: - output: pipelineArtifact diff --git a/.ado/templates/apple-steps-publish.yml b/.ado/templates/apple-steps-publish.yml index 2af3b77e343637..a5bffdd37e646c 100644 --- a/.ado/templates/apple-steps-publish.yml +++ b/.ado/templates/apple-steps-publish.yml @@ -29,13 +29,11 @@ steps: # Note, This won't do the actual `git tag` and `git push` as we're doing a dry run. # We do that as a separate step in `.ado/publish.yml`. - task: CmdLine@2 - displayName: Prepare package for release + displayName: Prepare React Native macOS release inputs: script: | - node ./scripts/prepare-package-for-release.js -v "$RNM_PACKAGE_VERSION" --dry-run - env: - # Map the corresponding CircleCI variable since `prepare-package-for-release.js` depends on it. - CIRCLE_BRANCH: $(Build.SourceBranchName) + set -eox pipefail + node scripts/releases/set-rn-version.js -v $RNM_PACKAGE_VERSION --build-type "release" # Note: This won't actually publish to NPM as we've commented that bit out. # We do that as a separate step in `.ado/publish.yml`. From 6d757396cfb896ee07e2b8ab6a0192e90730012b Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:21:46 +0200 Subject: [PATCH 2/7] fix: `local-cli` is missing from published package (#2182) --- packages/react-native/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index a0f64037c1a4a4..34624fc7250589 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -44,6 +44,7 @@ "jest", "Libraries", "LICENSE", + "local-cli", "React-Core.podspec", "react-native.config.js", "React.podspec", From b732623bb52295d791c0fb4b1277235cf6287b8d Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 30 Aug 2024 14:38:17 -0700 Subject: [PATCH 3/7] [react-native-macos-init] Push change files for a new version #2177 --- ...ve-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json diff --git a/change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json b/change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json new file mode 100644 index 00000000000000..0e16b789592906 --- /dev/null +++ b/change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update for Yarn 3+", + "packageName": "react-native-macos-init", + "email": "sanajmi@microsoft.com", + "dependentChangeType": "patch" +} From b86ac5239832d7d72e22cb84b1878ce2f73138fe Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 30 Aug 2024 16:46:24 -0700 Subject: [PATCH 4/7] fix: Properly import `npm-registry-fetch` in `react-native-macos-init` (#2186) * fix: Properly import `npm-registry-fetch` in `react-native-macos-init` * Change files --- ...ative-macos-init-f8ea158b-582a-420c-8fb7-8a1f75eb2cbe.json} | 2 +- packages/react-native-macos-init/src/cli.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) rename change/{react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json => react-native-macos-init-f8ea158b-582a-420c-8fb7-8a1f75eb2cbe.json} (60%) diff --git a/change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json b/change/react-native-macos-init-f8ea158b-582a-420c-8fb7-8a1f75eb2cbe.json similarity index 60% rename from change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json rename to change/react-native-macos-init-f8ea158b-582a-420c-8fb7-8a1f75eb2cbe.json index 0e16b789592906..bd1fdf8776a767 100644 --- a/change/react-native-macos-init-27af1077-e8dd-498f-9813-622bd400487c.json +++ b/change/react-native-macos-init-f8ea158b-582a-420c-8fb7-8a1f75eb2cbe.json @@ -1,6 +1,6 @@ { "type": "patch", - "comment": "Update for Yarn 3+", + "comment": "fix: Properly import `npm-registry-fetch` in `react-native-macos-init`", "packageName": "react-native-macos-init", "email": "sanajmi@microsoft.com", "dependentChangeType": "patch" diff --git a/packages/react-native-macos-init/src/cli.ts b/packages/react-native-macos-init/src/cli.ts index ee62a8a80c80c3..7ff3717322af56 100644 --- a/packages/react-native-macos-init/src/cli.ts +++ b/packages/react-native-macos-init/src/cli.ts @@ -13,8 +13,7 @@ import * as validUrl from 'valid-url'; import * as prompts from 'prompts'; import * as findUp from 'find-up'; import * as chalk from 'chalk'; -// @ts-ignore -import npmFetch from 'npm-registry'; +import * as npmFetch from 'npm-registry-fetch'; const npmConfReg = execSync('npm config get registry').toString().trim(); const NPM_REGISTRY_URL = validUrl.isUri(npmConfReg) From db3f8e7f8758d823b2cbfb812e7a5c6d50e8ce7b Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 30 Aug 2024 17:02:16 -0700 Subject: [PATCH 5/7] Sync `react-native-macos-init` vesrion with NPM registry using beachball (#2187) --- packages/react-native-macos-init/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-macos-init/package.json b/packages/react-native-macos-init/package.json index f9c073c24b0f07..8d45c1883c5a75 100644 --- a/packages/react-native-macos-init/package.json +++ b/packages/react-native-macos-init/package.json @@ -1,6 +1,6 @@ { "name": "react-native-macos-init", - "version": "2.1.0", + "version": "2.1.1", "description": "CLI to add react-native-macos to an existing react-native project", "main": "index.js", "repository": "https://github.com/microsoft/react-native-macos", From b0111c0d3cc6aeb852d6bfa8776ba73411fe3226 Mon Sep 17 00:00:00 2001 From: Nahuel Veron Date: Fri, 20 Sep 2024 12:20:27 -0300 Subject: [PATCH 6/7] fix: Remove flipper config from the Podfile template (#2195) --- .../local-cli/generator-macos/templates/macos/Podfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/react-native/local-cli/generator-macos/templates/macos/Podfile b/packages/react-native/local-cli/generator-macos/templates/macos/Podfile index b246e1e283dce2..cc3684c055c0a8 100644 --- a/packages/react-native/local-cli/generator-macos/templates/macos/Podfile +++ b/packages/react-native/local-cli/generator-macos/templates/macos/Podfile @@ -14,8 +14,6 @@ target 'HelloWorld-macOS' do :path => '../node_modules/react-native-macos', :hermes_enabled => false, :fabric_enabled => ENV['RCT_NEW_ARCH_ENABLED'] == '1', - # Flipper is not compatible w/ macOS - :flipper_configuration => FlipperConfiguration.disabled, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) From a87ddb59533d990593b04bab3ad8b7dc553b34e1 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 20 Sep 2024 08:21:31 -0700 Subject: [PATCH 7/7] fix: Allow viewRegistry to accept subclasses of NSView (#2196) --- packages/react-native/React/Views/RCTShadowView.h | 2 +- packages/react-native/React/Views/RCTViewManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/Views/RCTShadowView.h b/packages/react-native/React/Views/RCTShadowView.h index bb979ec592ae24..7009685257f22a 100644 --- a/packages/react-native/React/Views/RCTShadowView.h +++ b/packages/react-native/React/Views/RCTShadowView.h @@ -17,7 +17,7 @@ @class RCTRootShadowView; @class RCTSparseArray; -typedef void (^RCTApplierBlock)(NSDictionary *viewRegistry); // [macOS] +typedef void (^RCTApplierBlock)(NSDictionary *viewRegistry); // [macOS] /** * ShadowView tree mirrors RCT view tree. Every node is highly stateful. diff --git a/packages/react-native/React/Views/RCTViewManager.h b/packages/react-native/React/Views/RCTViewManager.h index be6c6baf53cdf8..56a80f9830fb8e 100644 --- a/packages/react-native/React/Views/RCTViewManager.h +++ b/packages/react-native/React/Views/RCTViewManager.h @@ -19,7 +19,7 @@ @class RCTSparseArray; @class RCTUIManager; -typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary *viewRegistry); // [macOS] +typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary *viewRegistry); // [macOS] @interface RCTViewManager : NSObject