Skip to content

Commit c1429b0

Browse files
committed
inline alias
1 parent 2669eef commit c1429b0

File tree

5 files changed

+2
-7
lines changed

5 files changed

+2
-7
lines changed

.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ module.exports = {
521521
spyOnProd: 'readonly',
522522
__DEV__: 'readonly',
523523
__EXPERIMENTAL__: 'readonly',
524-
__NEXT_MAJOR__: 'readonly',
525524
__EXTENSION__: 'readonly',
526525
__PROFILE__: 'readonly',
527526
__TEST__: 'readonly',

packages/shared/ReactFeatureFlags.js

+2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ export const transitionLaneExpirationMs = 5000;
138138
// Ready for next major.
139139
//
140140
// __NEXT_MAJOR__ is an alias for __EXPERIMENTAL__.
141+
// The global injects a value from the feature flag script to diff flags.
141142
// -----------------------------------------------------------------------------
143+
const __NEXT_MAJOR__ = global.__NEXT_MAJOR__ || __EXPERIMENTAL__;
142144

143145
// Not ready to break experimental yet.
144146
export const disableLegacyContext = false;

scripts/flow/environment.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
declare var __PROFILE__: boolean;
1313
declare var __UMD__: boolean;
1414
declare var __EXPERIMENTAL__: boolean;
15-
declare var __NEXT_MAJOR__: boolean;
1615
declare var __VARIANT__: boolean;
1716

1817
declare var __REACT_DEVTOOLS_GLOBAL_HOOK__: any; /*?{

scripts/jest/setupEnvironment.js

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ global.__EXPERIMENTAL__ =
1919
? RELEASE_CHANNEL === 'experimental'
2020
: true;
2121

22-
global.__NEXT_MAJOR__ = __EXPERIMENTAL__;
23-
2422
global.__VARIANT__ = !!process.env.VARIANT;
2523

2624
if (typeof window !== 'undefined') {

scripts/rollup/build.js

-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ const __EXPERIMENTAL__ =
3434
? RELEASE_CHANNEL === 'experimental'
3535
: true;
3636

37-
const __NEXT_MAJOR__ = __EXPERIMENTAL__;
38-
3937
// Errors in promises should be fatal.
4038
let loggedErrors = new Set();
4139
process.on('unhandledRejection', err => {
@@ -470,7 +468,6 @@ function getPlugins(
470468
? "'production'"
471469
: "'development'",
472470
__EXPERIMENTAL__,
473-
__NEXT_MAJOR__,
474471
},
475472
}),
476473
// The CommonJS plugin *only* exists to pull "art" into "react-art".

0 commit comments

Comments
 (0)