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
This commit is contained in:
Sebastian Markbåge 2020-04-02 17:52:32 -07:00 committed by GitHub
parent 91c9d69f9a
commit 3c16baf848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 55 deletions

View File

@ -31,7 +31,6 @@ aliases:
- *restore_yarn_cache
- *run_yarn
- run: node ./scripts/rollup/consolidateBundleSizes.js
- run: ./scripts/circleci/upload_build.sh
- run: ./scripts/circleci/pack_and_store_artifact.sh
- store_artifacts:
path: ./node_modules.tgz

View File

@ -16,8 +16,8 @@
If you checked out the source from GitHub make sure to run <code>npm run build</code>.
</p>
</div>
<script src="../../build/dist/react.development.js"></script>
<script src="../../build/dist/react-dom-unstable-fizz.browser.development.js"></script>
<script src="../../build/node_modules/react/umd/react.development.js"></script>
<script src="../../build/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.js"></script>
<script type="text/babel">
let stream = ReactDOMFizzServer.renderToReadableStream(<body>Success</body>);

View File

@ -16,11 +16,11 @@
If you checked out the source from GitHub make sure to run <code>npm run build</code>.
</p>
</div>
<script src="../../build/dist/react.development.js"></script>
<script src="../../build/dist/react-dom.development.js"></script>
<script src="../../build/dist/react-dom-server.browser.development.js"></script>
<script src="../../build/dist/react-flight-dom-webpack-server.browser.development.js"></script>
<script src="../../build/dist/react-flight-dom-webpack.development.js"></script>
<script src="../../build/node_modules/react/umd/react.development.js"></script>
<script src="../../build/node_modules/react-dom/umd/react-dom.development.js"></script>
<script src="../../build/node_modules/react-dom/umd/react-dom-server.browser.development.js"></script>
<script src="../../build/node_modules/react-flight-dom-webpack/umd/react-flight-dom-webpack-server.browser.development.js"></script>
<script src="../../build/node_modules/react-flight-dom-webpack/umd/react-flight-dom-webpack.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.js"></script>
<script type="text/babel">
let Suspense = React.Suspense;

View File

@ -7,6 +7,7 @@ module.exports = {
react: '../../../../build/node_modules/react/umd/react.development',
'react-dom':
'../../../../build/node_modules/react-dom/umd/react-dom.development',
schedule: '../../../../build/dist/schedule.development',
schedule:
'../../../../build/node_modules/scheduler/umd/schedule.development',
},
};

View File

@ -7,6 +7,7 @@ module.exports = {
react: '../../../../build/node_modules/react/umd/react.production.min',
'react-dom':
'../../../../build/node_modules/react-dom/umd/react-dom.production.min',
schedule: '../../../../build/dist/schedule.development',
schedule:
'../../../../build/node_modules/scheduler/umd/schedule.development',
},
};

View File

@ -3,6 +3,7 @@ System.config({
react: '../../../../build/node_modules/react/umd/react.development.js',
'react-dom':
'../../../../build/node_modules/react-dom/umd/react-dom.development.js',
schedule: '../../../../build/dist/schedule.development',
schedule:
'../../../../build/node_modules/scheduler/umd/schedule.development',
},
});

View File

@ -3,6 +3,7 @@ System.config({
react: '../../../../build/node_modules/react/umd/react.production.min.js',
'react-dom':
'../../../../build/node_modules/react-dom/umd/react-dom.production.min.js',
schedule: '../../../../build/dist/schedule.development',
schedule:
'../../../../build/node_modules/scheduler/umd/schedule.development',
},
});

View File

@ -1,20 +0,0 @@
#!/bin/bash
set -e
if [ -z "$CI_PULL_REQUEST" ] && [ -n "$BUILD_SERVER_ENDPOINT" ]; then
curl \
-F "react.development=@build/dist/react.development.js" \
-F "react.production.min=@build/dist/react.production.min.js" \
-F "react-dom.development=@build/dist/react-dom.development.js" \
-F "react-dom.production.min=@build/dist/react-dom.production.min.js" \
-F "react-dom-server.browser.development=@build/dist/react-dom-server.browser.development.js" \
-F "react-dom-server.browser.production.min=@build/dist/react-dom-server.browser.production.min.js" \
-F "results.json=@build/../build/bundle-sizes.json" \
-F "commit=$CIRCLE_SHA1" \
-F "date=$(git log --format='%ct' -1)" \
-F "pull_request=false" \
-F "token=$BUILD_SERVER_TOKEN" \
-F "branch=$CIRCLE_BRANCH" \
"$BUILD_SERVER_ENDPOINT"
fi

View File

@ -21,7 +21,7 @@ const useForks = require('./plugins/use-forks-plugin');
const stripUnusedImports = require('./plugins/strip-unused-imports');
const extractErrorCodes = require('../error-codes/extract-errors');
const Packaging = require('./packaging');
const {asyncCopyTo, asyncRimRaf} = require('./utils');
const {asyncRimRaf} = require('./utils');
const codeFrame = require('babel-code-frame');
const Wrappers = require('./wrappers');
@ -627,7 +627,7 @@ async function createBundle(bundle, bundleType) {
esModule: false,
},
};
const [mainOutputPath, ...otherOutputPaths] = Packaging.getBundleOutputPaths(
const mainOutputPath = Packaging.getBundleOutputPath(
bundleType,
filename,
packageName
@ -649,9 +649,6 @@ async function createBundle(bundle, bundleType) {
console.log(`${chalk.bgYellow.black(' BUILDING ')} ${logKey}`);
break;
case 'BUNDLE_END':
for (let i = 0; i < otherOutputPaths.length; i++) {
await asyncCopyTo(mainOutputPath, otherOutputPaths[i]);
}
console.log(`${chalk.bgGreen.black(' COMPLETE ')} ${logKey}\n`);
break;
case 'ERROR':
@ -671,9 +668,6 @@ async function createBundle(bundle, bundleType) {
handleRollupError(error);
throw error;
}
for (let i = 0; i < otherOutputPaths.length; i++) {
await asyncCopyTo(mainOutputPath, otherOutputPaths[i]);
}
console.log(`${chalk.bgGreen.black(' COMPLETE ')} ${logKey}\n`);
}
}

View File

@ -34,29 +34,26 @@ function getPackageName(name) {
return name;
}
function getBundleOutputPaths(bundleType, filename, packageName) {
function getBundleOutputPath(bundleType, filename, packageName) {
switch (bundleType) {
case NODE_DEV:
case NODE_PROD:
case NODE_PROFILING:
return [`build/node_modules/${packageName}/cjs/${filename}`];
return `build/node_modules/${packageName}/cjs/${filename}`;
case UMD_DEV:
case UMD_PROD:
case UMD_PROFILING:
return [
`build/node_modules/${packageName}/umd/${filename}`,
`build/dist/${filename}`,
];
return `build/node_modules/${packageName}/umd/${filename}`;
case FB_WWW_DEV:
case FB_WWW_PROD:
case FB_WWW_PROFILING:
return [`build/facebook-www/${filename}`];
return `build/facebook-www/${filename}`;
case RN_OSS_DEV:
case RN_OSS_PROD:
case RN_OSS_PROFILING:
switch (packageName) {
case 'react-native-renderer':
return [`build/react-native/implementations/${filename}`];
return `build/react-native/implementations/${filename}`;
default:
throw new Error('Unknown RN package.');
}
@ -65,12 +62,10 @@ function getBundleOutputPaths(bundleType, filename, packageName) {
case RN_FB_PROFILING:
switch (packageName) {
case 'react-native-renderer':
return [
`build/react-native/implementations/${filename.replace(
/\.js$/,
'.fb.js'
)}`,
];
return `build/react-native/implementations/${filename.replace(
/\.js$/,
'.fb.js'
)}`;
default:
throw new Error('Unknown RN package.');
}
@ -155,6 +150,6 @@ async function prepareNpmPackages() {
module.exports = {
copyAllShims,
getPackageName,
getBundleOutputPaths,
getBundleOutputPath,
prepareNpmPackages,
};