[build2 -> build] Local scripts
Update all our local scripts to use `build` instead of `build2`. There are still downstream scripts that depend on `build2`, though, so we can't remove it yet.
Andrew Clark committed
Sep 21, 2021 at 15:12 UTC
bb0d06935961732d37eb2d1ff706cdacea7003c9
14 files changed
+19
-23
fixtures/dom/package.json
+1
-1
@@ -20,7 +20,7 @@
20
},
21
"scripts": {
22
"start": "react-scripts start",
23
- "prestart": "cp ../../build2/oss-stable/scheduler/umd/scheduler-unstable_mock.development.js ../../build2/oss-stable/scheduler/umd/scheduler-unstable_mock.production.min.js ../../build2/oss-stable/react/umd/react.development.js ../../build2/oss-stable/react-dom/umd/react-dom.development.js ../../build2/oss-stable/react/umd/react.production.min.js ../../build2/oss-stable/react-dom/umd/react-dom.production.min.js ../../build2/oss-stable/react-dom/umd/react-dom-server.browser.development.js ../../build2/oss-stable/react-dom/umd/react-dom-server.browser.production.min.js ../../build2/oss-stable/react-dom/umd/react-dom-test-utils.development.js ../../build2/oss-stable/react-dom/umd/react-dom-test-utils.production.min.js public/ && cp -a ../../build2/oss-stable/. node_modules",
23
+ "prestart": "cp ../../build/oss-stable/scheduler/umd/scheduler-unstable_mock.development.js ../../build/oss-stable/scheduler/umd/scheduler-unstable_mock.production.min.js ../../build/oss-stable/react/umd/react.development.js ../../build/oss-stable/react-dom/umd/react-dom.development.js ../../build/oss-stable/react/umd/react.production.min.js ../../build/oss-stable/react-dom/umd/react-dom.production.min.js ../../build/oss-stable/react-dom/umd/react-dom-server.browser.development.js ../../build/oss-stable/react-dom/umd/react-dom-server.browser.production.min.js ../../build/oss-stable/react-dom/umd/react-dom-test-utils.development.js ../../build/oss-stable/react-dom/umd/react-dom-test-utils.production.min.js public/ && cp -a ../../build/oss-stable/. node_modules",
24
"build": "react-scripts build && cp build/index.html build/200.html",
25
"test": "react-scripts test --env=jsdom",
26
"eject": "react-scripts eject"
package.json
+1
-1
@@ -108,7 +108,7 @@
108
"scripts": {
109
"build": "node ./scripts/rollup/build.js",
110
"build-combined": "node ./scripts/rollup/build-all-release-channels.js",
111
- "build-for-devtools": "cross-env RELEASE_CHANNEL=experimental yarn build react/index,react/jsx,react-dom,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh --type=NODE && rm -rf build2 && mkdir build2 && cp -r ./build/node_modules build2/oss-experimental/",
111
+ "build-for-devtools": "cross-env RELEASE_CHANNEL=experimental yarn build react/index,react/jsx,react-dom,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh --type=NODE && rm -rf build && mkdir build && cp -r ./build/node_modules build/oss-experimental/",
112
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
113
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
114
"linc": "node ./scripts/tasks/linc.js",
packages/react-devtools-core/webpack.backend.js
+1
-1
@@ -22,7 +22,7 @@ const builtModulesDir = resolve(
22
__dirname,
23
'..',
24
'..',
25
- 'build2',
25
+ 'build',
26
'oss-experimental',
27
);
28
packages/react-devtools-core/webpack.standalone.js
+1
-1
@@ -22,7 +22,7 @@ const builtModulesDir = resolve(
22
__dirname,
23
'..',
24
'..',
25
- 'build2',
25
+ 'build',
26
'oss-experimental',
27
);
28
packages/react-devtools-extensions/build.js
+1
-1
@@ -27,7 +27,7 @@ const ensureLocalBuild = async () => {
27
__dirname,
28
'..',
29
'..',
30
- 'build2',
30
+ 'build',
31
'oss-experimental',
32
);
33
packages/react-devtools-extensions/webpack.backend.js
+1
-1
@@ -24,7 +24,7 @@ const builtModulesDir = resolve(
24
__dirname,
25
'..',
26
'..',
27
- 'build2',
27
+ 'build',
28
'oss-experimental',
29
);
30
packages/react-devtools-extensions/webpack.config.js
+1
-1
@@ -24,7 +24,7 @@ const builtModulesDir = resolve(
24
__dirname,
25
'..',
26
'..',
27
- 'build2',
27
+ 'build',
28
'oss-experimental',
29
);
30
packages/react-devtools-shell/webpack.config.js
+1
-1
@@ -28,7 +28,7 @@ const builtModulesDir = resolve(
28
__dirname,
29
'..',
30
'..',
31
- 'build2',
31
+ 'build',
32
'oss-experimental',
33
);
34
scripts/circleci/check_minified_errors.sh
+1
-1
@@ -2,7 +2,7 @@
2
3
# Ensure errors are minified in production
4
5
-OUT=$(git --no-pager grep -n --untracked --no-exclude-standard 'FIXME (minify-errors-in-prod)' -- './build2/*')
5
+OUT=$(git --no-pager grep -n --untracked --no-exclude-standard 'FIXME (minify-errors-in-prod)' -- './build/*')
6
7
if [ "$OUT" != "" ]; then
8
echo "$OUT";
scripts/jest/config.build-devtools.js
+3
-5
@@ -35,13 +35,11 @@ moduleNameMapper['react-devtools-feature-flags'] =
35
// Map packages to bundles
36
packages.forEach(name => {
37
// Root entry point
38
- moduleNameMapper[
39
- `^${name}$`
40
- ] = `<rootDir>/build2/${NODE_MODULES_DIR}/${name}`;
38
+ moduleNameMapper[`^${name}$`] = `<rootDir>/build/${NODE_MODULES_DIR}/${name}`;
39
// Named entry points
40
moduleNameMapper[
41
`^${name}\/([^\/]+)$`
44
- ] = `<rootDir>/build2/${NODE_MODULES_DIR}/${name}/$1`;
42
+ ] = `<rootDir>/build/${NODE_MODULES_DIR}/${name}/$1`;
43
});
44
45
// Allow tests to import shared code (e.g. feature flags, getStackByFiberInDevAndProd)
@@ -57,7 +55,7 @@ module.exports = Object.assign({}, baseConfig, {
55
// Exclude the build output from transforms
56
transformIgnorePatterns: [
57
'/node_modules/',
60
- '<rootDir>/build2/',
58
+ '<rootDir>/build/',
59
'/__compiled__/',
60
'/__untransformed__/',
61
],
scripts/jest/config.build.js
+3
-5
@@ -38,13 +38,11 @@ moduleNameMapper[
38
// Map packages to bundles
39
packages.forEach(name => {
40
// Root entry point
41
- moduleNameMapper[
42
- `^${name}$`
43
- ] = `<rootDir>/build2/${NODE_MODULES_DIR}/${name}`;
41
+ moduleNameMapper[`^${name}$`] = `<rootDir>/build/${NODE_MODULES_DIR}/${name}`;
42
// Named entry points
43
moduleNameMapper[
44
`^${name}\/([^\/]+)$`
47
- ] = `<rootDir>/build2/${NODE_MODULES_DIR}/${name}/$1`;
45
+ ] = `<rootDir>/build/${NODE_MODULES_DIR}/${name}/$1`;
46
});
47
48
module.exports = Object.assign({}, baseConfig, {
@@ -58,7 +56,7 @@ module.exports = Object.assign({}, baseConfig, {
56
// Don't run bundle tests on -test.internal.* files
57
testPathIgnorePatterns: ['/node_modules/', '-test.internal.js$'],
58
// Exclude the build output from transforms
61
- transformIgnorePatterns: ['/node_modules/', '<rootDir>/build2/'],
59
+ transformIgnorePatterns: ['/node_modules/', '<rootDir>/build/'],
60
setupFiles: [
61
...baseConfig.setupFiles,
62
require.resolve('./setupTests.build.js'),
scripts/jest/jest-cli.js
+1
-1
@@ -219,7 +219,7 @@ function validateOptions() {
219
220
if (argv.build) {
221
// TODO: We could build this if it hasn't been built yet.
222
- const buildDir = path.resolve('./build2');
222
+ const buildDir = path.resolve('./build');
223
if (!fs.existsSync(buildDir)) {
224
logError(
225
'Build directory does not exist, please run `yarn build-combined` or remove the --build option.'
scripts/release/utils.js
+2
-2
@@ -125,7 +125,7 @@ const getCommitFromCurrentBuild = async () => {
125
// This is important to make the build reproducible (e.g. by Mozilla reviewers).
126
const buildInfoJSON = join(
127
cwd,
128
- 'build2',
128
+ 'build',
129
'oss-experimental',
130
'react',
131
'build-info.json'
@@ -136,7 +136,7 @@ const getCommitFromCurrentBuild = async () => {
136
} else {
137
const packageJSON = join(
138
cwd,
139
- 'build2',
139
+ 'build',
140
'oss-experimental',
141
'react',
142
'package.json'
scripts/rollup/validate/index.js
+1
-1
@@ -79,7 +79,7 @@ async function lint(eslint, filepaths) {
79
async function lintEverything() {
80
console.log(`Linting build artifacts...`);
81
82
- const allFilepaths = await glob('build2/**/*.js');
82
+ const allFilepaths = await glob('build/**/*.js');
83
84
const pathsByFormat = new Map();
85
for (const filepath of allFilepaths) {