Skip to content

Commit 102a80a

Browse files
committed
refactor[ci/build]: preserve header format in artifacts (#27671)
In order to make Haste work with React's artifacts, It is important to keep headers in this format: ``` /** * ... ... * ... */ ``` For optimization purposes, Closure compiler will actually modify these headers by removing * prefixes, which is expected. We should pass sources to the compiler without license headers, with these changes the current flow will be: 1. Apply top-level definitions. For UMD-bundles, for example, or DEV-only bundles (e. g. `if (__DEV__) { ...`) 2. Apply licence headers for artifacts with sourcemaps: oss-production and oss-profiling bundles, they don't need to preserve the header format to comply with Haste. We need to apply these headers before passing sources to Closure, so it can build correct mappings for sourcemaps. 3. Pass these sources to closure compiler for minification and sourcemaps building. 4. Apply licence headers for artifacts without sourcemaps: dev bundles, fb bundles. This way the header style will be preserved and not changed by Closure. DiffTrain build for commit c47c306.
1 parent 6ec3027 commit 102a80a

27 files changed

+215
-224
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-dev.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
2-
* @preserve
32
* Copyright (c) Meta Platforms, Inc. and affiliates.
43
*
54
* This source code is licensed under the MIT license found in the
@@ -8,7 +7,7 @@
87
* @noflow
98
* @nolint
109
* @preventMunge
11-
* @generated SignedSource<<4c68925f3d01b8123e6a9a624a4f628d>>
10+
* @generated SignedSource<<36f762822297bdf88d7c307324df43cc>>
1211
*/
1312

1413
"use strict";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-prod.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/*
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<41457e58875ca2b4348c205786f8a603>>
11+
*/
212

3-
Copyright (c) Meta Platforms, Inc. and affiliates.
4-
5-
This source code is licensed under the MIT license found in the
6-
LICENSE file in the root directory of this source tree.
7-
8-
@noflow
9-
@nolint
10-
@preventMunge
11-
@generated SignedSource<<e844d0f641e3669e6cfab6fbedf8c071>>
12-
*/
1313
"use strict";
1414
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
1515
REACT_PORTAL_TYPE = Symbol.for("react.portal"),

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-profiling.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/*
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<41457e58875ca2b4348c205786f8a603>>
11+
*/
212

3-
Copyright (c) Meta Platforms, Inc. and affiliates.
4-
5-
This source code is licensed under the MIT license found in the
6-
LICENSE file in the root directory of this source tree.
7-
8-
@noflow
9-
@nolint
10-
@preventMunge
11-
@generated SignedSource<<e844d0f641e3669e6cfab6fbedf8c071>>
12-
*/
1313
"use strict";
1414
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
1515
REACT_PORTAL_TYPE = Symbol.for("react.portal"),

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
2-
* @preserve
32
* Copyright (c) Meta Platforms, Inc. and affiliates.
43
*
54
* This source code is licensed under the MIT license found in the
@@ -8,7 +7,7 @@
87
* @noflow
98
* @nolint
109
* @preventMunge
11-
* @generated SignedSource<<769546074522c131978074e9337b9413>>
10+
* @generated SignedSource<<cf7aa70650e042d314e5532e7bbcef6b>>
1211
*/
1312

1413
"use strict";
@@ -25356,7 +25355,7 @@ if (__DEV__) {
2535625355
return root;
2535725356
}
2535825357

25359-
var ReactVersion = "18.3.0-canary-7bdd7cc2d-20231109";
25358+
var ReactVersion = "18.3.0-canary-c47c306a7-20231109";
2536025359

2536125360
// Might add PROFILE later.
2536225361

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/*
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<77adb29a02f57dc2c424e298a9570c63>>
11+
*/
212

3-
Copyright (c) Meta Platforms, Inc. and affiliates.
4-
5-
This source code is licensed under the MIT license found in the
6-
LICENSE file in the root directory of this source tree.
7-
8-
@noflow
9-
@nolint
10-
@preventMunge
11-
@generated SignedSource<<64fea925e1f2075ccf9b0d7a53d3616f>>
12-
*/
1313
"use strict";
1414
var React = require("react"),
1515
Scheduler = require("scheduler/unstable_mock"),
@@ -9044,7 +9044,7 @@ var devToolsConfig$jscomp$inline_1033 = {
90449044
throw Error("TestRenderer does not support findFiberByHostInstance()");
90459045
},
90469046
bundleType: 0,
9047-
version: "18.3.0-canary-7bdd7cc2d-20231109",
9047+
version: "18.3.0-canary-c47c306a7-20231109",
90489048
rendererPackageName: "react-test-renderer"
90499049
};
90509050
var internals$jscomp$inline_1226 = {
@@ -9075,7 +9075,7 @@ var internals$jscomp$inline_1226 = {
90759075
scheduleRoot: null,
90769076
setRefreshHandler: null,
90779077
getCurrentFiber: null,
9078-
reconcilerVersion: "18.3.0-canary-7bdd7cc2d-20231109"
9078+
reconcilerVersion: "18.3.0-canary-c47c306a7-20231109"
90799079
};
90809080
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90819081
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/*
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<a1310f096190dd3ed0ece3221fcd9bda>>
11+
*/
212

3-
Copyright (c) Meta Platforms, Inc. and affiliates.
4-
5-
This source code is licensed under the MIT license found in the
6-
LICENSE file in the root directory of this source tree.
7-
8-
@noflow
9-
@nolint
10-
@preventMunge
11-
@generated SignedSource<<61b6979329b48da7cd49daaed19bd835>>
12-
*/
1313
"use strict";
1414
var React = require("react"),
1515
Scheduler = require("scheduler/unstable_mock"),
@@ -9470,7 +9470,7 @@ var devToolsConfig$jscomp$inline_1075 = {
94709470
throw Error("TestRenderer does not support findFiberByHostInstance()");
94719471
},
94729472
bundleType: 0,
9473-
version: "18.3.0-canary-7bdd7cc2d-20231109",
9473+
version: "18.3.0-canary-c47c306a7-20231109",
94749474
rendererPackageName: "react-test-renderer"
94759475
};
94769476
var internals$jscomp$inline_1267 = {
@@ -9501,7 +9501,7 @@ var internals$jscomp$inline_1267 = {
95019501
scheduleRoot: null,
95029502
setRefreshHandler: null,
95039503
getCurrentFiber: null,
9504-
reconcilerVersion: "18.3.0-canary-7bdd7cc2d-20231109"
9504+
reconcilerVersion: "18.3.0-canary-c47c306a7-20231109"
95059505
};
95069506
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
95079507
var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
2-
* @preserve
32
* Copyright (c) Meta Platforms, Inc. and affiliates.
43
*
54
* This source code is licensed under the MIT license found in the
@@ -8,7 +7,7 @@
87
* @noflow
98
* @nolint
109
* @preventMunge
11-
* @generated SignedSource<<193beb5c2614f253957a6dd80e74569e>>
10+
* @generated SignedSource<<8170be8fec46751a1d737fb773d9ff2c>>
1211
*/
1312

1413
"use strict";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-prod.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/*
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<548b04958213d77fe22adf99372702ad>>
11+
*/
212

3-
Copyright (c) Meta Platforms, Inc. and affiliates.
4-
5-
This source code is licensed under the MIT license found in the
6-
LICENSE file in the root directory of this source tree.
7-
8-
@noflow
9-
@nolint
10-
@preventMunge
11-
@generated SignedSource<<ddf116c0bc187fb023209b490262f9c6>>
12-
*/
1313
"use strict";
1414
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1515
exports.Fragment = REACT_FRAGMENT_TYPE;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-profiling.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/*
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<548b04958213d77fe22adf99372702ad>>
11+
*/
212

3-
Copyright (c) Meta Platforms, Inc. and affiliates.
4-
5-
This source code is licensed under the MIT license found in the
6-
LICENSE file in the root directory of this source tree.
7-
8-
@noflow
9-
@nolint
10-
@preventMunge
11-
@generated SignedSource<<ddf116c0bc187fb023209b490262f9c6>>
12-
*/
1313
"use strict";
1414
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1515
exports.Fragment = REACT_FRAGMENT_TYPE;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
2-
* @preserve
32
* Copyright (c) Meta Platforms, Inc. and affiliates.
43
*
54
* This source code is licensed under the MIT license found in the
@@ -8,7 +7,7 @@
87
* @noflow
98
* @nolint
109
* @preventMunge
11-
* @generated SignedSource<<e0b1d5c19be55d930c46cd9d9d91fa50>>
10+
* @generated SignedSource<<147cb9c49da614e98a9929adc67f6800>>
1211
*/
1312

1413
"use strict";

0 commit comments

Comments
 (0)