Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '0.74-stable' into user/yicyao/cg-0.74
Browse files Browse the repository at this point in the history
Saadnajmi authored Nov 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 46ff494 + 0ca2e22 commit 125addc
Showing 43 changed files with 431 additions and 170 deletions.
101 changes: 55 additions & 46 deletions .ado/jobs/test-react-native-macos-init.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jobs:
- job: CliInit
displayName: Verify react-native-macos-init
displayName: Verify react-native-macos in a new project
pool:
vmImage: $(VmImageApple)
steps:
@@ -13,50 +13,59 @@ jobs:

- template: /.ado/templates/apple-tools-setup.yml@self

- script: |
set -eox pipefail
yarn install
displayName: Install npm dependencies
- script: |
set -eox pipefail
yarn build
displayName: Build @react-native/community-cli-plugin
- script: |
set -eox pipefail
yarn build
workingDirectory: packages/react-native-macos-init
displayName: Build react-native-macos-init
- template: /.ado/templates/verdaccio-init.yml@self

- template: /.ado/templates/verdaccio-publish.yml@self

# First do a build of the local package, since we point the cli at the local files, it needs to be pre-built
- task: CmdLine@2
displayName: yarn install (local react-native-macos)
inputs:
script: yarn install --immutable

- task: CmdLine@2
displayName: yarn install (local react-native-macos-init)
inputs:
script: |
cd packages/react-native-macos-init
yarn install --immutable
- task: CmdLine@2
displayName: yarn build (local react-native-macos-init)
inputs:
script: |
cd packages/react-native-macos-init
yarn build
- task: CmdLine@2
displayName: Init new project
inputs:
script: npx --yes [email protected] init testcli --template [email protected] --skip-install
workingDirectory: $(Agent.BuildDirectory)

- task: CmdLine@2
displayName: yarn install (local react-native-macos-init)
inputs:
script: yarn install --immutable
workingDirectory: $(Agent.BuildDirectory)/testcli

- task: CmdLine@2
displayName: Apply macos template
inputs:
script: npx react-native-macos-init --version latest --overwrite --prerelease
workingDirectory: $(Agent.BuildDirectory)/testcli

- task: CmdLine@2
displayName: Run macos [test]
inputs:
script: npx react-native run-macos
workingDirectory: $(Agent.BuildDirectory)/testcli
- script: |
.ado/scripts/verdaccio.sh publish --branch origin/$(System.PullRequest.TargetBranch)
displayName: Publish react-native-macos to Verdaccio
- script: |
set -eox pipefail
npx --yes @react-native-community/cli init testcli --version 0.75 --skip-install
workingDirectory: $(Agent.BuildDirectory)
displayName: Initialize a new project
- script: |
set -eox pipefail
yarn install --mode=update-lockfile
# `update-lockfile` skips the linking step, so we need to run `yarn install` again
yarn install
workingDirectory: $(Agent.BuildDirectory)/testcli
displayName: Install npm dependencies (new project)
- script: |
set -eox pipefail
# We need to set the npm registry here otherwise it won't stick
$(Build.Repository.LocalPath)/.ado/scripts/verdaccio.sh configure
node $(Build.Repository.LocalPath)/packages/react-native-macos-init/bin.js --verbose --version latest --overwrite --prerelease
yarn why react-native-macos
workingDirectory: $(Agent.BuildDirectory)/testcli
displayName: Apply macOS template (new project)
- script: |
set -eox pipefail
npx react-native build-macos
workingDirectory: $(Agent.BuildDirectory)/testcli
displayName: Build macOS app (new project)
- script: |
set -eox pipefail
npx react-native run-macos
workingDirectory: $(Agent.BuildDirectory)/testcli
displayName: Run macOS app (new project)
34 changes: 34 additions & 0 deletions .ado/scripts/verdaccio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

NPM_REGISTRY=http://localhost:4873

project_root=$(cd -P "$(dirname $0)" && pwd)

set -eox pipefail

case ${1-} in
"configure")
yarn config set npmRegistryServer $NPM_REGISTRY
yarn config set unsafeHttpWhitelist --json '["localhost"]'
;;

"init")
npm set registry $NPM_REGISTRY
npx verdaccio --config $project_root/.ado/verdaccio/config.yaml &
node $project_root/.ado/waitForVerdaccio.js
node $project_root/.ado/npmAddUser.js user pass [email protected] $NPM_REGISTRY
;;

"publish")
checkpoint=$(git rev-parse HEAD)
yarn set-version 1000.0.0-pr
git commit --all --message 'bump' --no-verify
packages=()
for json in $(yarn workspaces list --no-private --json); do
packages+=(--package $(node --print "JSON.parse('$json').name"))
done
npx beachball change --no-fetch --type patch --message 'bump for testing purposes' ${packages[@]}
npx beachball $* --no-push --registry $NPM_REGISTRY --yes --access public --no-generate-changelog
git reset --hard $checkpoint
;;
esac
6 changes: 0 additions & 6 deletions .ado/templates/verdaccio-publish.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -171,4 +171,8 @@ vendor/
# Ccache
.ccache

# macOS]
# ADO
.ado/Brewfile.lock.json
.ado/verdaccio/htpasswd
.ado/verdaccio/storage/.verdaccio-db.json
# macOS]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -58,8 +58,8 @@
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@pkgjs/parseargs": "^0.11.0",
"@react-native/metro-babel-transformer": "0.74.87",
"@react-native/metro-config": "0.74.87",
"@react-native/metro-babel-transformer": "0.74.88",
"@react-native/metro-config": "0.74.88",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.2.6",
"@typescript-eslint/parser": "^7.1.1",
2 changes: 1 addition & 1 deletion packages/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.74.87",
"version": "0.74.88",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.74.87",
"version": "0.74.88",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -25,7 +25,7 @@
"index.js"
],
"dependencies": {
"@react-native/codegen": "0.74.87"
"@react-native/codegen": "0.74.88"
},
"devDependencies": {
"@babel/core": "^7.20.0"
6 changes: 3 additions & 3 deletions packages/community-cli-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.74.87",
"version": "0.74.88",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -24,8 +24,8 @@
"dependencies": {
"@react-native-community/cli-server-api": "13.6.9",
"@react-native-community/cli-tools": "13.6.9",
"@react-native/dev-middleware": "0.74.87",
"@react-native/metro-babel-transformer": "0.74.87",
"@react-native/dev-middleware": "0.74.88",
"@react-native/metro-babel-transformer": "0.74.88",
"chalk": "^4.0.0",
"execa": "^5.1.1",
"metro": "^0.80.3",
2 changes: 1 addition & 1 deletion packages/debugger-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.74.87",
"version": "0.74.88",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
4 changes: 2 additions & 2 deletions packages/dev-middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.74.87",
"version": "0.74.88",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.74.87",
"@react-native/debugger-frontend": "0.74.88",
"@rnx-kit/chromium-edge-launcher": "^1.0.0",
"chrome-launcher": "^0.15.2",
"connect": "^3.6.5",
4 changes: 2 additions & 2 deletions packages/eslint-config-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.74.87",
"version": "0.74.88",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.20.0",
"@react-native/eslint-plugin": "0.74.87",
"@react-native/eslint-plugin": "0.74.88",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.74.87",
"version": "0.74.88",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/eslint-plugin-specs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.74.87",
"version": "0.74.88",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -31,7 +31,7 @@
"@babel/eslint-parser": "^7.20.0",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/preset-flow": "^7.20.0",
"@react-native/codegen": "0.74.87",
"@react-native/codegen": "0.74.88",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
2 changes: 1 addition & 1 deletion packages/hermes-inspector-msggen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/hermes-inspector-msggen",
"version": "0.74.87",
"version": "0.74.88",
"private": true,
"description": "Hermes Inspector Message Generator for React Native",
"license": "MIT",
6 changes: 3 additions & 3 deletions packages/metro-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.74.87",
"version": "0.74.88",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,8 +26,8 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.74.87",
"@react-native/metro-babel-transformer": "0.74.87",
"@react-native/js-polyfills": "0.74.88",
"@react-native/metro-babel-transformer": "0.74.88",
"metro-config": "^0.80.3",
"metro-runtime": "^0.80.3"
}
2 changes: 1 addition & 1 deletion packages/normalize-color/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.74.87",
"version": "0.74.88",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
2 changes: 1 addition & 1 deletion packages/polyfills/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.74.87",
"version": "0.74.88",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/react-native-babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.74.87",
"version": "0.74.88",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -54,7 +54,7 @@
"@babel/plugin-transform-typescript": "^7.5.0",
"@babel/plugin-transform-unicode-regex": "^7.0.0",
"@babel/template": "^7.0.0",
"@react-native/babel-plugin-codegen": "0.74.87",
"@react-native/babel-plugin-codegen": "0.74.88",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
},
4 changes: 2 additions & 2 deletions packages/react-native-babel-transformer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.74.87",
"version": "0.74.88",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@react-native/babel-preset": "0.74.87",
"@react-native/babel-preset": "0.74.88",
"hermes-parser": "0.19.1",
"nullthrows": "^1.1.1"
},
2 changes: 1 addition & 1 deletion packages/react-native-bots/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.74.87",
"version": "0.74.88",
"private": true,
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/react-native-codegen-typescript-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.74.87",
"version": "0.74.88",
"private": true,
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
@@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "0.74.87"
"@react-native/codegen": "0.74.88"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Loading

0 comments on commit 125addc

Please sign in to comment.