diff --git a/change/@office-iss-react-native-win32-2020-08-11-04-28-07-integrate-4-22.json b/change/@office-iss-react-native-win32-2020-08-11-04-28-07-integrate-4-22.json new file mode 100644 index 00000000000..b089213673c --- /dev/null +++ b/change/@office-iss-react-native-win32-2020-08-11-04-28-07-integrate-4-22.json @@ -0,0 +1,8 @@ +{ + "type": "prerelease", + "comment": "Integrate 4/22 Nightly Build", + "packageName": "@office-iss/react-native-win32", + "email": "ngerlem@microsoft.com", + "dependentChangeType": "patch", + "date": "2020-08-11T11:28:00.447Z" +} diff --git a/change/@rnw-scripts-integrate-rn-2020-08-11-05-05-02-integrate-4-22.json b/change/@rnw-scripts-integrate-rn-2020-08-11-05-05-02-integrate-4-22.json new file mode 100644 index 00000000000..bc0d8685f5b --- /dev/null +++ b/change/@rnw-scripts-integrate-rn-2020-08-11-05-05-02-integrate-4-22.json @@ -0,0 +1,8 @@ +{ + "type": "patch", + "comment": "Fix integrate-rn bug with dependency syncing added late PR", + "packageName": "@rnw-scripts/integrate-rn", + "email": "ngerlem@microsoft.com", + "dependentChangeType": "patch", + "date": "2020-08-11T12:05:02.815Z" +} diff --git a/change/react-native-windows-2020-08-11-04-28-07-integrate-4-22.json b/change/react-native-windows-2020-08-11-04-28-07-integrate-4-22.json new file mode 100644 index 00000000000..c970a5411d2 --- /dev/null +++ b/change/react-native-windows-2020-08-11-04-28-07-integrate-4-22.json @@ -0,0 +1,8 @@ +{ + "type": "prerelease", + "comment": "Integrate 4/22 Nightly Build", + "packageName": "react-native-windows", + "email": "ngerlem@microsoft.com", + "dependentChangeType": "patch", + "date": "2020-08-11T11:28:07.228Z" +} diff --git a/packages/@rnw-scripts/integrate-rn/package.json b/packages/@rnw-scripts/integrate-rn/package.json index 601c3b8e6ca..f61c163f74e 100644 --- a/packages/@rnw-scripts/integrate-rn/package.json +++ b/packages/@rnw-scripts/integrate-rn/package.json @@ -15,6 +15,7 @@ "dependencies": { "@rnw-scripts/find-repo-root": "^0.0.4", "@rnw-scripts/package-utils": "^0.0.1", + "async": "^3.2.0", "lodash": "^4.17.15", "ora": "^4.0.3", "react-native-platform-override": "^0.2.1", @@ -25,6 +26,7 @@ "@rnw-scripts/eslint-config": "0.0.2", "@rnw-scripts/just-task": "0.0.2", "@rnw-scripts/ts-config": "0.1.0", + "@types/async": "^3.2.3", "@types/lodash": "^4.14.157", "@types/ora": "^3.2.0", "@types/semver": "^7.3.1", diff --git a/packages/@rnw-scripts/integrate-rn/src/integrateRN.ts b/packages/@rnw-scripts/integrate-rn/src/integrateRN.ts index 7c0b2067596..401856f639a 100644 --- a/packages/@rnw-scripts/integrate-rn/src/integrateRN.ts +++ b/packages/@rnw-scripts/integrate-rn/src/integrateRN.ts @@ -6,6 +6,7 @@ */ import * as _ from 'lodash'; +import * as async from 'async'; import * as fs from 'fs'; import * as ora from 'ora'; import * as path from 'path'; @@ -15,6 +16,7 @@ import * as yargs from 'yargs'; import { enumerateLocalPackages, findPackage, + NpmPackage, WritableNpmPackage, } from '@rnw-scripts/package-utils'; @@ -60,14 +62,19 @@ import findRepoRoot from '@rnw-scripts/find-repo-root'; * Enumerate packages for out-of-tree platforms */ async function enumeratePlatformPackages(): Promise { - return await enumerateLocalPackages(async pkg => { - try { - await fs.promises.access(path.join(pkg.path, 'overrides.json')); - return true; - } catch { - return false; - } - }); + return await enumerateLocalPackages(isOutOfTreePlatform); +} + +/** + * Does the NPM package correspond to an out-of-tree platform? + */ +async function isOutOfTreePlatform(pkg: NpmPackage): Promise { + try { + await fs.promises.access(path.join(pkg.path, 'overrides.json')); + return true; + } catch { + return false; + } } /** @@ -75,8 +82,13 @@ async function enumeratePlatformPackages(): Promise { * version of React Native */ async function updatePackages(newVersion: string) { + // Be careful to share package objects since writing to one may invalidate + // copies const localPackages = await enumerateLocalPackages(); - const platformPackages = await enumeratePlatformPackages(); + const platformPackages = await async.filter( + localPackages, + isOutOfTreePlatform, + ); if (platformPackages.length === 0) { throw new Error( diff --git a/packages/E2ETest/package.json b/packages/E2ETest/package.json index 5b1d597c3e9..927ee5d6ed2 100644 --- a/packages/E2ETest/package.json +++ b/packages/E2ETest/package.json @@ -24,7 +24,7 @@ "dependencies": { "prompt-sync": "^4.2.0", "react": "16.13.1", - "react-native": "0.0.0-4a48b021d", + "react-native": "0.0.0-2c473e1a3", "react-native-windows": "0.0.0-canary.137" }, "devDependencies": { diff --git a/packages/E2ETest/wdio/test/VisitAllPages.spec.ts b/packages/E2ETest/wdio/test/VisitAllPages.spec.ts index a3f4b097bdc..a05a184ea8e 100644 --- a/packages/E2ETest/wdio/test/VisitAllPages.spec.ts +++ b/packages/E2ETest/wdio/test/VisitAllPages.spec.ts @@ -10,7 +10,6 @@ let pages = [ /* TODO: Disabling most of the test for now due to instability, tracked by #5661 '