Remove /dist/ UMD builds (#18473)
* Remove /dist/ UMD builds We publish UMDs to npm (and we're considering stopping even that). This means we'll stop publishing to http://react.zpao.com/builds/master/latest/ * Update fixture paths
Sebastian Markbåge committed
Apr 2, 2020 at 17:52 UTC
3c16baf848e7d3b5bab96ab34cc9097ddfea76de
10 files changed
+27
-55
.circleci/config.yml
-1
@@ -31,7 +31,6 @@ aliases:
31
- *restore_yarn_cache
32
- *run_yarn
33
- run: node ./scripts/rollup/consolidateBundleSizes.js
34
- - run: ./scripts/circleci/upload_build.sh
34
- run: ./scripts/circleci/pack_and_store_artifact.sh
35
- store_artifacts:
36
path: ./node_modules.tgz
fixtures/fizz-ssr-browser/index.html
+2
-2
@@ -16,8 +16,8 @@
16
If you checked out the source from GitHub make sure to run <code>npm run build</code>.
17
</p>
18
</div>
19
- <script src="../../build/dist/react.development.js"></script>
20
- <script src="../../build/dist/react-dom-unstable-fizz.browser.development.js"></script>
19
+ <script src="../../build/node_modules/react/umd/react.development.js"></script>
20
+ <script src="../../build/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js"></script>
21
<script src="https://unpkg.com/babel-standalone@6/babel.js"></script>
22
<script type="text/babel">
23
let stream = ReactDOMFizzServer.renderToReadableStream(<body>Success</body>);
fixtures/flight-browser/index.html
+5
-5
@@ -16,11 +16,11 @@
16
If you checked out the source from GitHub make sure to run <code>npm run build</code>.
17
</p>
18
</div>
19
- <script src="../../build/dist/react.development.js"></script>
20
- <script src="../../build/dist/react-dom.development.js"></script>
21
- <script src="../../build/dist/react-dom-server.browser.development.js"></script>
22
- <script src="../../build/dist/react-flight-dom-webpack-server.browser.development.js"></script>
23
- <script src="../../build/dist/react-flight-dom-webpack.development.js"></script>
19
+ <script src="../../build/node_modules/react/umd/react.development.js"></script>
20
+ <script src="../../build/node_modules/react-dom/umd/react-dom.development.js"></script>
21
+ <script src="../../build/node_modules/react-dom/umd/react-dom-server.browser.development.js"></script>
22
+ <script src="../../build/node_modules/react-flight-dom-webpack/umd/react-flight-dom-webpack-server.browser.development.js"></script>
23
+ <script src="../../build/node_modules/react-flight-dom-webpack/umd/react-flight-dom-webpack.development.js"></script>
24
<script src="https://unpkg.com/babel-standalone@6/babel.js"></script>
25
<script type="text/babel">
26
let Suspense = React.Suspense;
fixtures/packaging/rjs/dev/config.js
+2
-1
@@ -7,6 +7,7 @@ module.exports = {
7
react: '../../../../build/node_modules/react/umd/react.development',
8
'react-dom':
9
'../../../../build/node_modules/react-dom/umd/react-dom.development',
10
- schedule: '../../../../build/dist/schedule.development',
10
+ schedule:
11
+ '../../../../build/node_modules/scheduler/umd/schedule.development',
12
},
13
};
fixtures/packaging/rjs/prod/config.js
+2
-1
@@ -7,6 +7,7 @@ module.exports = {
7
react: '../../../../build/node_modules/react/umd/react.production.min',
8
'react-dom':
9
'../../../../build/node_modules/react-dom/umd/react-dom.production.min',
10
- schedule: '../../../../build/dist/schedule.development',
10
+ schedule:
11
+ '../../../../build/node_modules/scheduler/umd/schedule.development',
12
},
13
};
fixtures/packaging/systemjs-builder/dev/config.js
+2
-1
@@ -3,6 +3,7 @@ System.config({
3
react: '../../../../build/node_modules/react/umd/react.development.js',
4
'react-dom':
5
'../../../../build/node_modules/react-dom/umd/react-dom.development.js',
6
- schedule: '../../../../build/dist/schedule.development',
6
+ schedule:
7
+ '../../../../build/node_modules/scheduler/umd/schedule.development',
8
},
9
});
fixtures/packaging/systemjs-builder/prod/config.js
+2
-1
@@ -3,6 +3,7 @@ System.config({
3
react: '../../../../build/node_modules/react/umd/react.production.min.js',
4
'react-dom':
5
'../../../../build/node_modules/react-dom/umd/react-dom.production.min.js',
6
- schedule: '../../../../build/dist/schedule.development',
6
+ schedule:
7
+ '../../../../build/node_modules/scheduler/umd/schedule.development',
8
},
9
});
scripts/circleci/upload_build.sh
deleted
-20
@@ -1,20 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-if [ -z "$CI_PULL_REQUEST" ] && [ -n "$BUILD_SERVER_ENDPOINT" ]; then
6
- curl \
7
- -F "react.development=@build/dist/react.development.js" \
8
- -F "react.production.min=@build/dist/react.production.min.js" \
9
- -F "react-dom.development=@build/dist/react-dom.development.js" \
10
- -F "react-dom.production.min=@build/dist/react-dom.production.min.js" \
11
- -F "react-dom-server.browser.development=@build/dist/react-dom-server.browser.development.js" \
12
- -F "react-dom-server.browser.production.min=@build/dist/react-dom-server.browser.production.min.js" \
13
- -F "results.json=@build/../build/bundle-sizes.json" \
14
- -F "commit=$CIRCLE_SHA1" \
15
- -F "date=$(git log --format='%ct' -1)" \
16
- -F "pull_request=false" \
17
- -F "token=$BUILD_SERVER_TOKEN" \
18
- -F "branch=$CIRCLE_BRANCH" \
19
- "$BUILD_SERVER_ENDPOINT"
20
-fi
scripts/rollup/build.js
+2
-8
@@ -21,7 +21,7 @@ const useForks = require('./plugins/use-forks-plugin');
21
const stripUnusedImports = require('./plugins/strip-unused-imports');
22
const extractErrorCodes = require('../error-codes/extract-errors');
23
const Packaging = require('./packaging');
24
-const {asyncCopyTo, asyncRimRaf} = require('./utils');
24
+const {asyncRimRaf} = require('./utils');
25
const codeFrame = require('babel-code-frame');
26
const Wrappers = require('./wrappers');
27
@@ -627,7 +627,7 @@ async function createBundle(bundle, bundleType) {
627
esModule: false,
628
},
629
};
630
- const [mainOutputPath, ...otherOutputPaths] = Packaging.getBundleOutputPaths(
630
+ const mainOutputPath = Packaging.getBundleOutputPath(
631
bundleType,
632
filename,
633
packageName
@@ -649,9 +649,6 @@ async function createBundle(bundle, bundleType) {
649
console.log(`${chalk.bgYellow.black(' BUILDING ')} ${logKey}`);
650
break;
651
case 'BUNDLE_END':
652
- for (let i = 0; i < otherOutputPaths.length; i++) {
653
- await asyncCopyTo(mainOutputPath, otherOutputPaths[i]);
654
- }
652
console.log(`${chalk.bgGreen.black(' COMPLETE ')} ${logKey}\n`);
653
break;
654
case 'ERROR':
@@ -671,9 +668,6 @@ async function createBundle(bundle, bundleType) {
668
handleRollupError(error);
669
throw error;
670
}
674
- for (let i = 0; i < otherOutputPaths.length; i++) {
675
- await asyncCopyTo(mainOutputPath, otherOutputPaths[i]);
676
- }
671
console.log(`${chalk.bgGreen.black(' COMPLETE ')} ${logKey}\n`);
672
}
673
}
scripts/rollup/packaging.js
+10
-15
@@ -34,29 +34,26 @@ function getPackageName(name) {
34
return name;
35
}
36
37
-function getBundleOutputPaths(bundleType, filename, packageName) {
37
+function getBundleOutputPath(bundleType, filename, packageName) {
38
switch (bundleType) {
39
case NODE_DEV:
40
case NODE_PROD:
41
case NODE_PROFILING:
42
- return [`build/node_modules/${packageName}/cjs/${filename}`];
42
+ return `build/node_modules/${packageName}/cjs/${filename}`;
43
case UMD_DEV:
44
case UMD_PROD:
45
case UMD_PROFILING:
46
- return [
47
- `build/node_modules/${packageName}/umd/${filename}`,
48
- `build/dist/${filename}`,
49
- ];
46
+ return `build/node_modules/${packageName}/umd/${filename}`;
47
case FB_WWW_DEV:
48
case FB_WWW_PROD:
49
case FB_WWW_PROFILING:
53
- return [`build/facebook-www/${filename}`];
50
+ return `build/facebook-www/${filename}`;
51
case RN_OSS_DEV:
52
case RN_OSS_PROD:
53
case RN_OSS_PROFILING:
54
switch (packageName) {
55
case 'react-native-renderer':
59
- return [`build/react-native/implementations/${filename}`];
56
+ return `build/react-native/implementations/${filename}`;
57
default:
58
throw new Error('Unknown RN package.');
59
}
@@ -65,12 +62,10 @@ function getBundleOutputPaths(bundleType, filename, packageName) {
62
case RN_FB_PROFILING:
63
switch (packageName) {
64
case 'react-native-renderer':
68
- return [
69
- `build/react-native/implementations/${filename.replace(
70
- /\.js$/,
71
- '.fb.js'
72
- )}`,
73
- ];
65
+ return `build/react-native/implementations/${filename.replace(
66
+ /\.js$/,
67
+ '.fb.js'
68
+ )}`;
69
default:
70
throw new Error('Unknown RN package.');
71
}
@@ -155,6 +150,6 @@ async function prepareNpmPackages() {
150
module.exports = {
151
copyAllShims,
152
getPackageName,
158
- getBundleOutputPaths,
153
+ getBundleOutputPath,
154
prepareNpmPackages,
155
};