diff --git a/.ado/npmOfficePack.js b/.ado/npmOfficePack.js index 7f383ce3c7afd4..b1d549ed9ba0bb 100644 --- a/.ado/npmOfficePack.js +++ b/.ado/npmOfficePack.js @@ -28,7 +28,7 @@ function doPublish(fakeMode) { if (!onlyTagSource) { // -------- Generating Android Artifacts with JavaDoc const depsEnvPrefix = "REACT_NATIVE_BOOST_PATH=" + path.join(process.env.BUILD_SOURCESDIRECTORY, "build_deps"); - const gradleCommand = path.join(process.env.BUILD_SOURCESDIRECTORY, "gradlew") + " installArchives"; + const gradleCommand = path.join(process.env.BUILD_SOURCESDIRECTORY, "gradlew") + " installArchives -Pparam=\"excludeLibs\""; exec( depsEnvPrefix + " " + gradleCommand ); // undo uncommenting javadoc setting diff --git a/.ado/publish.yml b/.ado/publish.yml index 410840614be5ce..a0cb8d1ec65eb0 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -64,9 +64,21 @@ jobs: script: node scripts/bump-oss-version.js --nightly condition: eq(variables['Build.SourceBranchName'], 'master') + # Publish will fail if package.json is marked as private + - task: CmdLine@2 + displayName: Remove workspace config from package.json + inputs: + script: node .ado/removeWorkspaceConfig.js + - script: npm publish --tag $(npmDistTag) --registry https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=$(npmAuthToken) displayName: Publish react-native-macos to npmjs.org + # Put the private flag back so that the removal does not get committed by the tag release step + - task: CmdLine@2 + displayName: Restore package.json workspace config + inputs: + script: node .ado/restoreWorkspaceConfig.js + - task: CmdLine@2 displayName: 'Tag published release' inputs: @@ -137,6 +149,12 @@ jobs: inputs: script: node .ado/bumpOfficeFileVersions.js + # Publish will fail if package.json is marked as private + - task: CmdLine@2 + displayName: Remove workspace config from package.json + inputs: + script: node .ado/removeWorkspaceConfig.js + - task: CmdLine@2 displayName: gradlew installArchives inputs: diff --git a/.ado/removeWorkspaceConfig.js b/.ado/removeWorkspaceConfig.js new file mode 100644 index 00000000000000..afdbdbd4a54119 --- /dev/null +++ b/.ado/removeWorkspaceConfig.js @@ -0,0 +1,3 @@ +// @ts-check +const {removeWorkspaceConfig} = require('./versionUtils'); +removeWorkspaceConfig(); \ No newline at end of file diff --git a/.ado/restoreWorkspaceConfig.js b/.ado/restoreWorkspaceConfig.js new file mode 100644 index 00000000000000..c61987828d0873 --- /dev/null +++ b/.ado/restoreWorkspaceConfig.js @@ -0,0 +1,3 @@ +// @ts-check +const {restoreWorkspaceConfig} = require('./versionUtils'); +restoreWorkspaceConfig(); \ No newline at end of file diff --git a/.ado/versionUtils.js b/.ado/versionUtils.js index a70c00bcb020be..9dae8233ac6f5f 100644 --- a/.ado/versionUtils.js +++ b/.ado/versionUtils.js @@ -2,6 +2,7 @@ const fs = require("fs"); const path = require("path"); const semver = require('semver'); +const {execSync} = require('child_process'); const pkgJsonPath = path.resolve(__dirname, "../package.json"); let publishBranchName = ''; @@ -41,15 +42,35 @@ function updateVersionsInFiles(patchVersionPrefix) { } pkgJson.version = releaseVersion; - fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2)); - console.log(`Updating package.json to version ${releaseVersion}`); + console.log(`Bumping files to version ${releaseVersion}`); + execSync(`node ./scripts/bump-oss-version.js --rnmpublish ${releaseVersion}`, {stdio: 'inherit'}); return {releaseVersion, branchVersionSuffix}; } + +const workspaceJsonPath = path.resolve(require('os').tmpdir(), 'rnpkg.json'); + +function removeWorkspaceConfig() { + let {pkgJson} = gatherVersionInfo(); + fs.writeFileSync(workspaceJsonPath, JSON.stringify(pkgJson, null, 2)); + delete pkgJson.private; + delete pkgJson.workspaces; + fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2)); + console.log(`Removing workspace config from package.json to prepare to publish.`); +} + +function restoreWorkspaceConfig() { + let pkgJson = JSON.parse(fs.readFileSync(workspaceJsonPath, "utf8")); + fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2)); + console.log(`Restoring workspace config from package.json`); +} + module.exports = { gatherVersionInfo, publishBranchName, pkgJsonPath, + removeWorkspaceConfig, + restoreWorkspaceConfig, updateVersionsInFiles } \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 45a3dcb2a20316..7c973903433b65 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ +# Ensure scripts always have Unix newlines, even on Windows. +*.command text eol=lf +*.sh text eol=lf # Windows files should use crlf line endings # https://help.github.com/articles/dealing-with-line-endings/ *.bat text eol=crlf diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 1125336c1582b6..7168567b4ca318 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost-for-react-native (1.63.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.64.0) - - FBReactNativeSpec (0.64.0): - - RCT-Folly (= 2020.01.13.00) - - RCTRequired (= 0.64.0) - - RCTTypeSafety (= 0.64.0) - - React-Core (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) + - FBLazyVector (0.64.1) + - FBReactNativeSpec (0.64.1): + - RCT-Folly (= 2020.01.13.00) + - RCTRequired (= 0.64.1) + - RCTTypeSafety (= 0.64.1) + - React-Core (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) - Flipper (0.75.1): - Flipper-Folly (~> 2.5) - Flipper-RSocket (~> 1.3) @@ -68,298 +68,298 @@ PODS: - boost-for-react-native - DoubleConversion - glog - - RCTRequired (0.64.0) - - RCTTypeSafety (0.64.0): - - FBLazyVector (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - RCTRequired (= 0.64.0) - - React-Core (= 0.64.0) - - React (0.64.0): - - React-Core (= 0.64.0) - - React-Core/DevSupport (= 0.64.0) - - React-Core/RCTWebSocket (= 0.64.0) - - React-RCTActionSheet (= 0.64.0) - - React-RCTAnimation (= 0.64.0) - - React-RCTBlob (= 0.64.0) - - React-RCTImage (= 0.64.0) - - React-RCTLinking (= 0.64.0) - - React-RCTNetwork (= 0.64.0) - - React-RCTSettings (= 0.64.0) - - React-RCTText (= 0.64.0) - - React-RCTVibration (= 0.64.0) - - React-callinvoker (0.64.0) - - React-Core (0.64.0): + - RCTRequired (0.64.1) + - RCTTypeSafety (0.64.1): + - FBLazyVector (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - RCTRequired (= 0.64.1) + - React-Core (= 0.64.1) + - React (0.64.1): + - React-Core (= 0.64.1) + - React-Core/DevSupport (= 0.64.1) + - React-Core/RCTWebSocket (= 0.64.1) + - React-RCTActionSheet (= 0.64.1) + - React-RCTAnimation (= 0.64.1) + - React-RCTBlob (= 0.64.1) + - React-RCTImage (= 0.64.1) + - React-RCTLinking (= 0.64.1) + - React-RCTNetwork (= 0.64.1) + - React-RCTSettings (= 0.64.1) + - React-RCTText (= 0.64.1) + - React-RCTVibration (= 0.64.1) + - React-callinvoker (0.64.1) + - React-Core (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - - React-Core/Default (= 0.64.0) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-Core/Default (= 0.64.1) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/CoreModulesHeaders (0.64.0): + - React-Core/CoreModulesHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/Default (0.64.0): + - React-Core/Default (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/DevSupport (0.64.0): + - React-Core/DevSupport (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - - React-Core/Default (= 0.64.0) - - React-Core/RCTWebSocket (= 0.64.0) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-jsinspector (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-Core/Default (= 0.64.1) + - React-Core/RCTWebSocket (= 0.64.1) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-jsinspector (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.64.0): + - React-Core/RCTActionSheetHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTAnimationHeaders (0.64.0): + - React-Core/RCTAnimationHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTBlobHeaders (0.64.0): + - React-Core/RCTBlobHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTImageHeaders (0.64.0): + - React-Core/RCTImageHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTLinkingHeaders (0.64.0): + - React-Core/RCTLinkingHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTNetworkHeaders (0.64.0): + - React-Core/RCTNetworkHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTPushNotificationHeaders (0.64.0): + - React-Core/RCTPushNotificationHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTSettingsHeaders (0.64.0): + - React-Core/RCTSettingsHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTTextHeaders (0.64.0): + - React-Core/RCTTextHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTVibrationHeaders (0.64.0): + - React-Core/RCTVibrationHeaders (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - React-Core/Default - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-Core/RCTWebSocket (0.64.0): + - React-Core/RCTWebSocket (0.64.1): - glog - RCT-Folly (= 2020.01.13.00) - - React-Core/Default (= 0.64.0) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsiexecutor (= 0.64.0) - - React-perflogger (= 0.64.0) + - React-Core/Default (= 0.64.1) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsiexecutor (= 0.64.1) + - React-perflogger (= 0.64.1) - Yoga - - React-CoreModules (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.64.0) - - React-Core/CoreModulesHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - React-RCTImage (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-cxxreact (0.64.0): + - React-CoreModules (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.64.1) + - React-Core/CoreModulesHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - React-RCTImage (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-cxxreact (0.64.1): - boost-for-react-native (= 1.63.0) - DoubleConversion - glog - RCT-Folly (= 2020.01.13.00) - - React-callinvoker (= 0.64.0) - - React-jsi (= 0.64.0) - - React-jsinspector (= 0.64.0) - - React-perflogger (= 0.64.0) - - React-runtimeexecutor (= 0.64.0) - - React-jsi (0.64.0): + - React-callinvoker (= 0.64.1) + - React-jsi (= 0.64.1) + - React-jsinspector (= 0.64.1) + - React-perflogger (= 0.64.1) + - React-runtimeexecutor (= 0.64.1) + - React-jsi (0.64.1): - boost-for-react-native (= 1.63.0) - DoubleConversion - glog - RCT-Folly (= 2020.01.13.00) - - React-jsi/Default (= 0.64.0) - - React-jsi/Default (0.64.0): + - React-jsi/Default (= 0.64.1) + - React-jsi/Default (0.64.1): - boost-for-react-native (= 1.63.0) - DoubleConversion - glog - RCT-Folly (= 2020.01.13.00) - - React-jsiexecutor (0.64.0): + - React-jsiexecutor (0.64.1): - DoubleConversion - glog - RCT-Folly (= 2020.01.13.00) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-perflogger (= 0.64.0) - - React-jsinspector (0.64.0) - - React-perflogger (0.64.0) - - React-RCTActionSheet (0.64.0): - - React-Core/RCTActionSheetHeaders (= 0.64.0) - - React-RCTAnimation (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.64.0) - - React-Core/RCTAnimationHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTBlob (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - React-Core/RCTBlobHeaders (= 0.64.0) - - React-Core/RCTWebSocket (= 0.64.0) - - React-jsi (= 0.64.0) - - React-RCTNetwork (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTImage (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.64.0) - - React-Core/RCTImageHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - React-RCTNetwork (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTLinking (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - React-Core/RCTLinkingHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTNetwork (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.64.0) - - React-Core/RCTNetworkHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTPushNotification (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCTTypeSafety (= 0.64.0) - - React-Core/RCTPushNotificationHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTSettings (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.64.0) - - React-Core/RCTSettingsHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTTest (0.64.0): - - RCT-Folly (= 2020.01.13.00) - - React-Core (= 0.64.0) - - React-CoreModules (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-RCTText (0.64.0): - - React-Core/RCTTextHeaders (= 0.64.0) - - React-RCTVibration (0.64.0): - - FBReactNativeSpec (= 0.64.0) - - RCT-Folly (= 2020.01.13.00) - - React-Core/RCTVibrationHeaders (= 0.64.0) - - React-jsi (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-runtimeexecutor (0.64.0): - - React-jsi (= 0.64.0) - - React-TurboModuleCxx-RNW (0.64.0): - - RCT-Folly (= 2020.01.13.00) - - React-callinvoker (= 0.64.0) - - React-TurboModuleCxx-WinRTPort (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) - - React-TurboModuleCxx-WinRTPort (0.64.0): - - React-TurboModuleCxx-WinRTPort/Shared (= 0.64.0) - - React-TurboModuleCxx-WinRTPort/WinRT (= 0.64.0) - - React-TurboModuleCxx-WinRTPort/Shared (0.64.0) - - React-TurboModuleCxx-WinRTPort/WinRT (0.64.0): - - RCT-Folly (= 2020.01.13.00) - - React-callinvoker (= 0.64.0) - - React-TurboModuleCxx-WinRTPort/Shared (= 0.64.0) - - ReactCommon/turbomodule/core (0.64.0): + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-perflogger (= 0.64.1) + - React-jsinspector (0.64.1) + - React-perflogger (0.64.1) + - React-RCTActionSheet (0.64.1): + - React-Core/RCTActionSheetHeaders (= 0.64.1) + - React-RCTAnimation (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.64.1) + - React-Core/RCTAnimationHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTBlob (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - React-Core/RCTBlobHeaders (= 0.64.1) + - React-Core/RCTWebSocket (= 0.64.1) + - React-jsi (= 0.64.1) + - React-RCTNetwork (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTImage (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.64.1) + - React-Core/RCTImageHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - React-RCTNetwork (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTLinking (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - React-Core/RCTLinkingHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTNetwork (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.64.1) + - React-Core/RCTNetworkHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTPushNotification (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCTTypeSafety (= 0.64.1) + - React-Core/RCTPushNotificationHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTSettings (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.64.1) + - React-Core/RCTSettingsHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTTest (0.64.1): + - RCT-Folly (= 2020.01.13.00) + - React-Core (= 0.64.1) + - React-CoreModules (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-RCTText (0.64.1): + - React-Core/RCTTextHeaders (= 0.64.1) + - React-RCTVibration (0.64.1): + - FBReactNativeSpec (= 0.64.1) + - RCT-Folly (= 2020.01.13.00) + - React-Core/RCTVibrationHeaders (= 0.64.1) + - React-jsi (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-runtimeexecutor (0.64.1): + - React-jsi (= 0.64.1) + - React-TurboModuleCxx-RNW (0.64.1): + - RCT-Folly (= 2020.01.13.00) + - React-callinvoker (= 0.64.1) + - React-TurboModuleCxx-WinRTPort (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) + - React-TurboModuleCxx-WinRTPort (0.64.1): + - React-TurboModuleCxx-WinRTPort/Shared (= 0.64.1) + - React-TurboModuleCxx-WinRTPort/WinRT (= 0.64.1) + - React-TurboModuleCxx-WinRTPort/Shared (0.64.1) + - React-TurboModuleCxx-WinRTPort/WinRT (0.64.1): + - RCT-Folly (= 2020.01.13.00) + - React-callinvoker (= 0.64.1) + - React-TurboModuleCxx-WinRTPort/Shared (= 0.64.1) + - ReactCommon/turbomodule/core (0.64.1): - DoubleConversion - glog - RCT-Folly (= 2020.01.13.00) - - React-callinvoker (= 0.64.0) - - React-Core (= 0.64.0) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-perflogger (= 0.64.0) - - ReactCommon/turbomodule/samples (0.64.0): + - React-callinvoker (= 0.64.1) + - React-Core (= 0.64.1) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-perflogger (= 0.64.1) + - ReactCommon/turbomodule/samples (0.64.1): - DoubleConversion - glog - RCT-Folly (= 2020.01.13.00) - - React-callinvoker (= 0.64.0) - - React-Core (= 0.64.0) - - React-cxxreact (= 0.64.0) - - React-jsi (= 0.64.0) - - React-perflogger (= 0.64.0) - - ReactCommon/turbomodule/core (= 0.64.0) + - React-callinvoker (= 0.64.1) + - React-Core (= 0.64.1) + - React-cxxreact (= 0.64.1) + - React-jsi (= 0.64.1) + - React-perflogger (= 0.64.1) + - ReactCommon/turbomodule/core (= 0.64.1) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) diff --git a/scripts/bump-oss-version.js b/scripts/bump-oss-version.js index a940e4fc9a41b1..045f6af768d867 100755 --- a/scripts/bump-oss-version.js +++ b/scripts/bump-oss-version.js @@ -29,6 +29,11 @@ let argv = yargs type: 'boolean', default: false, }) + .option('p', { // [MacOS: Used during RNM's publish pipelines + alias: 'rnmpublish', + type: 'boolean', + default: false, + }) .option('n', { alias: 'nightly', type: 'boolean', @@ -36,7 +41,10 @@ let argv = yargs }).argv; const nightlyBuild = argv.nightly; +// Nightly builds don't need an update as main will already be up-to-date. +const updatePodfileLock = !nightlyBuild; const ci = argv.ci; +const rnmpublish = argv.rnmpublish; let version, branch; if (nightlyBuild) { @@ -133,8 +141,10 @@ fs.writeFileSync( let packageJson = JSON.parse(cat('package.json')); packageJson.version = version; -delete packageJson.workspaces; -delete packageJson.private; +if (!rnmpublish) { + delete packageJson.workspaces; + delete packageJson.private; +} fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2), 'utf-8'); // Change ReactAndroid/gradle.properties @@ -153,6 +163,15 @@ if ( // Change react-native version in the template's package.json exec(`node scripts/set-rn-template-version.js ${version}`); +if (updatePodfileLock) { + echo('Updating RNTester Podfile.lock...') + if (exec('source scripts/update_podfile_lock.sh && update_pods').code) { + echo('Failed to update RNTester Podfile.lock.'); + echo('Fix the issue, revert and try again.'); + exit(1); + } +} + // Verify that files changed, we just do a git diff and check how many times version is added across files let numberOfChangedLinesWithNewVersion = exec( `git diff -U0 | grep '^[+]' | grep -c ${version} `, @@ -161,7 +180,7 @@ let numberOfChangedLinesWithNewVersion = exec( // Release builds should commit the version bumps, and create tags. // Nightly builds do not need to do that. -if (!nightlyBuild) { +if (!nightlyBuild && !rnmpublish) { if (+numberOfChangedLinesWithNewVersion !== 3) { echo( 'Failed to update all the files. package.json and gradle.properties must have versions in them', diff --git a/scripts/update_podfile_lock.sh b/scripts/update_podfile_lock.sh new file mode 100644 index 00000000000000..d763e30043efd6 --- /dev/null +++ b/scripts/update_podfile_lock.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +# This script updates RNTester Podfile.lock after verifying the CocoaPods environment. +# Usage: +# source scripts/update_podfile_lock && update_pods + +THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +RNTESTER_DIR="$THIS_DIR/../packages/rn-tester" + +# Note: Keep in sync with FB internal. +REQUIRED_COCOAPODS_VERSION="1.10.1" + +validate_env () { + # Check that CocoaPods is working. + if [ -z "$(command -v pod)" ]; then + echo "You need to install CocoaPods." + echo "See https://guides.cocoapods.org/using/getting-started.html#getting-started for instructions." + exit 1 + fi + +# COCOAPODS_VERSION=$(pod --version) +# if [[ "$COCOAPODS_VERSION" != "$REQUIRED_COCOAPODS_VERSION" ]]; +# then +# echo "You must have CocoaPods $REQUIRED_COCOAPODS_VERSION installed; you have $COCOAPODS_VERSION." +# echo "Installing via gem is recommended:" +# echo " sudo gem install cocoapods -v $REQUIRED_COCOAPODS_VERSION" +# exit 1 +# fi +} + +update_pods () { + validate_env + + cd "$RNTESTER_DIR" || exit + pod install + cd "$THIS_DIR" || exit +} \ No newline at end of file