Skip to content

Commit

Permalink
Post-process build files for React Native to add generated signature …
Browse files Browse the repository at this point in the history
…and @NOLINT (#26616)

## Summary

We're enabling a new mechanism to synchronize build files from `react`
to `react-native`. That new mechanism doesn't post-process files, so we
need to add that post-processing somewhere. This PR does that when
generating the files in the first place, so the generated files in the
`build` directory are ready to be committed in the `react-native`
repository directly.

This makes use of `signedsource` to avoid direct modifications of these
files in the `react-native` repository, as well as `@noformat` and
`@nolint` to prevent unactionable CI failures in that repository.

## How did you test this change?

Generated build files for `react-native` before and after this change:
```
node ./scripts/rollup/build-all-release-channels.js react-native
```

Checked new contents. Relevant changes:

```diff
diff --color -r build-before/react-native/implementations/ReactFabric-dev.fb.js build-after/react-native/implementations/ReactFabric-dev.fb.js
10c10
<  * @generated
---
>  * @generated SignedSource<<03cef14e77b8250b567dfdf3b066085e>>
diff --color -r build-before/react-native/implementations/ReactFabric-dev.js build-after/react-native/implementations/ReactFabric-dev.js
11c11
<  * @generated
---
>  * @generated SignedSource<<e39eed38a363846ca9ee9b59a225683c>>
diff --color -r build-before/react-native/implementations/ReactFabric-prod.fb.js build-after/react-native/implementations/ReactFabric-prod.fb.js
10c10
<  * @generated
---
>  * @generated SignedSource<<f65efcd6a469d5f6fef1ce647e5ec09a>>
diff --color -r build-before/react-native/implementations/ReactFabric-prod.js build-after/react-native/implementations/ReactFabric-prod.js
11c11
<  * @generated
---
>  * @generated SignedSource<<cdd582aa889b1054b2c5faf412622b18>>
diff --color -r build-before/react-native/implementations/ReactFabric-profiling.fb.js build-after/react-native/implementations/ReactFabric-profiling.fb.js
10c10
<  * @generated
---
>  * @generated SignedSource<<81e74849b24f104882bd298f062be0fa>>
diff --color -r build-before/react-native/implementations/ReactFabric-profiling.js build-after/react-native/implementations/ReactFabric-profiling.js
11c11
<  * @generated
---
>  * @generated SignedSource<<c050b7fa1453dc21ac1c5b98146210a8>>
diff --color -r build-before/react-native/implementations/ReactNativeRenderer-dev.fb.js build-after/react-native/implementations/ReactNativeRenderer-dev.fb.js
10c10
<  * @generated
---
>  * @generated SignedSource<<9c03464b489b41c06a065aeba8619263>>
diff --color -r build-before/react-native/implementations/ReactNativeRenderer-dev.js build-after/react-native/implementations/ReactNativeRenderer-dev.js
11c11
<  * @generated
---
>  * @generated SignedSource<<18b34c037544949dcf9b28f945921ba8>>
diff --color -r build-before/react-native/implementations/ReactNativeRenderer-prod.fb.js build-after/react-native/implementations/ReactNativeRenderer-prod.fb.js
10c10
<  * @generated
---
>  * @generated SignedSource<<592e9654c584d1da523378b119bd8bd7>>
diff --color -r build-before/react-native/implementations/ReactNativeRenderer-prod.js build-after/react-native/implementations/ReactNativeRenderer-prod.js
11c11
<  * @generated
---
>  * @generated SignedSource<<91c894db99e2d76f8a32708ad6ad1bde>>
diff --color -r build-before/react-native/implementations/ReactNativeRenderer-profiling.fb.js build-after/react-native/implementations/ReactNativeRenderer-profiling.fb.js
10c10
<  * @generated
---
>  * @generated SignedSource<<5ce378a9216ea747d91b208b9fd1ebd5>>
diff --color -r build-before/react-native/implementations/ReactNativeRenderer-profiling.js build-after/react-native/implementations/ReactNativeRenderer-profiling.js
11c11
<  * @generated
---
>  * @generated SignedSource<<1c7564f446ee83142976035b2884dcfd>>
diff --color -r build-before/react-native/shims/ReactFabric.js build-after/react-native/shims/ReactFabric.js
7c7
<  * @Format
---
>  * @noformat
8a9,10
>  * @NOLINT
>  * @generated SignedSource<<cece19ddbec9f287c995721f49c68977>>
diff --color -r build-before/react-native/shims/ReactFeatureFlags.js build-after/react-native/shims/ReactFeatureFlags.js
7c7
<  * @Format
---
>  * @noformat
8a9,10
>  * @NOLINT
>  * @generated SignedSource<<2881c8e89ef0f73f4cf6612cb518b197>>
diff --color -r build-before/react-native/shims/ReactNative.js build-after/react-native/shims/ReactNative.js
7c7
<  * @Format
---
>  * @noformat
8a9,10
>  * @NOLINT
>  * @generated SignedSource<<0debd6e5a17dc037cb4661315a886de6>>
diff --color -r build-before/react-native/shims/ReactNativeTypes.js build-after/react-native/shims/ReactNativeTypes.js
7c7
<  * @Format
---
>  * @noformat
8a9,10
>  * @NOLINT
>  * @generated SignedSource<<652b117c94307244bcf5e4af18928903>>
diff --color -r build-before/react-native/shims/ReactNativeViewConfigRegistry.js build-after/react-native/shims/ReactNativeViewConfigRegistry.js
7c7
<  * @Format
---
>  * @noformat
8a9,10
>  * @NOLINT
>  * @generated SignedSource<<ce82e8957367bee7d11379ab88e3f7c5>>
diff --color -r build-before/react-native/shims/createReactNativeComponentClass.js build-after/react-native/shims/createReactNativeComponentClass.js
7c7
<  * @Format
---
>  * @noformat
8a9,10
>  * @NOLINT
>  * @generated SignedSource<<ede54ac2fa1b9a09e234cdf098048989>>
```

DiffTrain build for commit 39a3b72.
  • Loading branch information
rubennorte committed Apr 14, 2023
1 parent 9e0082b commit d42533c
Show file tree
Hide file tree
Showing 33 changed files with 63 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<04e903e2c42db853c48c81f8bf9fbc20>>
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<41457e58875ca2b4348c205786f8a603>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<41457e58875ca2b4348c205786f8a603>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<ae4eb8b4cf9bd4b8d67e0fe8f50fe731>>
*/

'use strict';
Expand Down Expand Up @@ -23745,7 +23745,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-d121c6700-20230413";
var ReactVersion = "18.3.0-next-39a3b72c6-20230414";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<1bd2144f4116acb567dfa45470f554cf>>
*/

"use strict";
Expand Down Expand Up @@ -8587,7 +8587,7 @@ var devToolsConfig$jscomp$inline_1023 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-d121c6700-20230413",
version: "18.3.0-next-39a3b72c6-20230414",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1206 = {
Expand Down Expand Up @@ -8618,7 +8618,7 @@ var internals$jscomp$inline_1206 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d121c6700-20230413"
reconcilerVersion: "18.3.0-next-39a3b72c6-20230414"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1207 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<e176a3c7913739c8a2a2a7e96412ea56>>
*/

"use strict";
Expand Down Expand Up @@ -9013,7 +9013,7 @@ var devToolsConfig$jscomp$inline_1065 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-d121c6700-20230413",
version: "18.3.0-next-39a3b72c6-20230414",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1247 = {
Expand Down Expand Up @@ -9044,7 +9044,7 @@ var internals$jscomp$inline_1247 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d121c6700-20230413"
reconcilerVersion: "18.3.0-next-39a3b72c6-20230414"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1248 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<26475298aa34ad2cd59665f1ded7480c>>
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<548b04958213d77fe22adf99372702ad>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<548b04958213d77fe22adf99372702ad>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<e2ceb6464d362e2cf22c09a1b8c1771b>>
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<82444ded84168f50c5e2d5115e52dac9>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<82444ded84168f50c5e2d5115e52dac9>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<35d1df17e68a7171ea6085b1ff9b4370>>
*/

'use strict';
Expand All @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-next-d121c6700-20230413";
var ReactVersion = "18.3.0-next-39a3b72c6-20230414";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<623d88de048cc740842b62d6c9f97677>>
*/

"use strict";
Expand Down Expand Up @@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-d121c6700-20230413";
exports.version = "18.3.0-next-39a3b72c6-20230414";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<15cd4562f04114d4bc0a56646072dbba>>
*/


Expand Down Expand Up @@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-d121c6700-20230413";
exports.version = "18.3.0-next-39a3b72c6-20230414";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<b85c2a10b2dc93deb1fb229aeda66768>>
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<6de9b4c616b4fa4d342cccd7689eb2af>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<a5b8d3dfbfefbe54a13cba9fe05a5615>>
*/


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<02f8b70fae987ca45ecb285c137d6bfb>>
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<87e7b57a62257e3d246f6aac3f6ce7c3>>
*/

"use strict";
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d121c67004a2e6b0bb5d341843663ef213f64863
39a3b72c6db97c58c45b0dd9b685b316cd2302c3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<b5c59815854081f30fed1657a366e74d>>
*/

'use strict';
Expand Down Expand Up @@ -27052,7 +27052,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-d121c6700-20230413";
var ReactVersion = "18.3.0-next-39a3b72c6-20230414";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<5fde975939665b5fcfc876ee15b06b3e>>
*/

"use strict";
Expand Down Expand Up @@ -9456,7 +9456,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1047 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-d121c6700-20230413",
version: "18.3.0-next-39a3b72c6-20230414",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -9498,7 +9498,7 @@ var internals$jscomp$inline_1276 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d121c6700-20230413"
reconcilerVersion: "18.3.0-next-39a3b72c6-20230414"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1277 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<98ffccdbe5c99b6a4d1b3ced23fd0ab0>>
*/


Expand Down Expand Up @@ -10165,7 +10165,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1125 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-d121c6700-20230413",
version: "18.3.0-next-39a3b72c6-20230414",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -10220,7 +10220,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d121c6700-20230413"
reconcilerVersion: "18.3.0-next-39a3b72c6-20230414"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<251dd2a17860a00b36073837aeb01f90>>
*/

'use strict';
Expand Down Expand Up @@ -27565,7 +27565,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-d121c6700-20230413";
var ReactVersion = "18.3.0-next-39a3b72c6-20230414";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<26f5e4a449229f70fb80fa44c5d18704>>
*/

"use strict";
Expand Down Expand Up @@ -9715,7 +9715,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1102 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-d121c6700-20230413",
version: "18.3.0-next-39a3b72c6-20230414",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -9757,7 +9757,7 @@ var internals$jscomp$inline_1345 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d121c6700-20230413"
reconcilerVersion: "18.3.0-next-39a3b72c6-20230414"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1346 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated
* @generated SignedSource<<4bfcd476ebad959bb289e89a33e3ed7a>>
*/


Expand Down Expand Up @@ -10424,7 +10424,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1180 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-d121c6700-20230413",
version: "18.3.0-next-39a3b72c6-20230414",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -10479,7 +10479,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-d121c6700-20230413"
reconcilerVersion: "18.3.0-next-39a3b72c6-20230414"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {
Expand Down
Loading

0 comments on commit d42533c

Please sign in to comment.