diff --git a/.nvmrc b/.nvmrc index 33edba2d01f06..5e0613fa0796a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v8.4.0 +v10.8.0 diff --git a/package.json b/package.json index 754ed41a54b68..d8e98d9b2e61f 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "packages/*" ], "devDependencies": { + "@ampproject/rollup-plugin-closure-compiler": "^0.6.1", "art": "^0.10.1", "babel-cli": "^6.6.5", "babel-code-frame": "^6.26.0", @@ -57,7 +58,6 @@ "flow-bin": "^0.72.0", "glob": "^6.0.4", "glob-stream": "^6.1.0", - "google-closure-compiler": "20180506.0.0", "gzip-size": "^3.0.0", "jasmine-check": "^1.0.0-rc.0", "jest": "^23.1.0", @@ -72,11 +72,11 @@ "random-seed": "^0.3.0", "react-lifecycles-compat": "^3.0.2", "rimraf": "^2.6.1", - "rollup": "^0.52.1", - "rollup-plugin-babel": "^3.0.1", - "rollup-plugin-commonjs": "^8.2.6", - "rollup-plugin-node-resolve": "^2.1.1", - "rollup-plugin-prettier": "^0.3.0", + "rollup": "^0.63.5", + "rollup-plugin-babel": "^3.0.7", + "rollup-plugin-commonjs": "^9.1.4", + "rollup-plugin-node-resolve": "^3.3.0", + "rollup-plugin-prettier": "^0.4.0", "rollup-plugin-replace": "^2.0.0", "rollup-plugin-strip-banner": "^0.2.0", "semver": "^5.5.0", @@ -93,6 +93,7 @@ }, "scripts": { "build": "npm run version-check && node ./scripts/rollup/build.js", + "postbuild": "node ./scripts/smoke-modules/run.js", "linc": "node ./scripts/tasks/linc.js", "lint": "node ./scripts/tasks/eslint.js", "lint-build": "node ./scripts/rollup/validate/index.js", diff --git a/packages/react-is/package.json b/packages/react-is/package.json index 09728faafe1a4..4a236a6f39ab6 100644 --- a/packages/react-is/package.json +++ b/packages/react-is/package.json @@ -16,7 +16,9 @@ "LICENSE", "README.md", "index.js", + "index.mjs", "cjs/", + "esm/", "umd/" ] } diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index c0ddb6e2dbee2..e980ae6d5badd 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -2,7 +2,7 @@ const {rollup} = require('rollup'); const babel = require('rollup-plugin-babel'); -const closure = require('./plugins/closure-plugin'); +const closure = require('@ampproject/rollup-plugin-closure-compiler'); const commonjs = require('rollup-plugin-commonjs'); const prettier = require('rollup-plugin-prettier'); const replace = require('rollup-plugin-replace'); @@ -24,6 +24,8 @@ const Packaging = require('./packaging'); const {asyncCopyTo, asyncRimRaf} = require('./utils'); const codeFrame = require('babel-code-frame'); const Wrappers = require('./wrappers'); +const Entries = require('./entries'); +const Treeshake = require('./treeshake'); // Errors in promises should be fatal. let loggedErrors = new Set(); @@ -38,6 +40,8 @@ process.on('unhandledRejection', err => { const { UMD_DEV, UMD_PROD, + ESM_DEV, + ESM_PROD, NODE_DEV, NODE_PROD, NODE_PROFILING, @@ -68,10 +72,8 @@ const errorCodeOpts = { const closureOptions = { compilation_level: 'SIMPLE', - language_in: 'ECMASCRIPT5_STRICT', - language_out: 'ECMASCRIPT5_STRICT', env: 'CUSTOM', - warning_level: 'QUIET', + language_out: 'ECMASCRIPT5_STRICT', apply_input_source_maps: false, use_types_for_optimization: false, process_common_js_modules: false, @@ -113,6 +115,8 @@ function getBabelConfig(updateBabelOptions, bundleType, filename) { }); case UMD_DEV: case UMD_PROD: + case ESM_DEV: + case ESM_PROD: case NODE_DEV: case NODE_PROD: case NODE_PROFILING: @@ -159,6 +163,9 @@ function getFormat(bundleType) { case UMD_DEV: case UMD_PROD: return `umd`; + case ESM_DEV: + case ESM_PROD: + return `es`; case NODE_DEV: case NODE_PROD: case NODE_PROFILING: @@ -183,6 +190,10 @@ function getFilename(name, globalName, bundleType) { return `${name}.development.js`; case UMD_PROD: return `${name}.production.min.js`; + case ESM_DEV: + return `${name}.development.mjs`; + case ESM_PROD: + return `${name}.production.min.mjs`; case NODE_DEV: return `${name}.development.js`; case NODE_PROD: @@ -207,12 +218,14 @@ function getFilename(name, globalName, bundleType) { function isProductionBundleType(bundleType) { switch (bundleType) { case UMD_DEV: + case ESM_DEV: case NODE_DEV: case FB_WWW_DEV: case RN_OSS_DEV: case RN_FB_DEV: return false; case UMD_PROD: + case ESM_PROD: case NODE_PROD: case NODE_PROFILING: case FB_WWW_PROD: @@ -239,6 +252,8 @@ function isProfilingBundleType(bundleType) { case RN_OSS_PROD: case UMD_DEV: case UMD_PROD: + case ESM_DEV: + case ESM_PROD: return false; case FB_WWW_PROFILING: case NODE_PROFILING: @@ -266,7 +281,6 @@ function blacklistFBJS() { function getPlugins( entry, - externals, updateBabelOptions, filename, packageName, @@ -306,9 +320,7 @@ function getPlugins( // Ensure we don't try to bundle any fbjs modules. blacklistFBJS(), // Use Node resolution mechanism. - resolve({ - skip: externals, - }), + resolve(), // Remove license headers from individual modules stripBanner({ exclude: 'node_modules/**/*', @@ -387,6 +399,25 @@ function getPlugins( }; }, }), + + // Treeshaked bundle size. + bundleType === ESM_DEV && { + async transformBundle(source) { + // bundle esm entry point importing nothing + const newSizes = await Treeshake.treeshakeCode(source); + const treeshakedSizes = Stats.currentBuildResults.treeshakedSizes; + const recordIndex = treeshakedSizes.findIndex( + record => + record.packageName === packageName && record.filename === filename + ); + const index = recordIndex !== -1 ? recordIndex : treeshakedSizes.length; + Stats.currentBuildResults.treeshakedSizes[index] = { + filename, + packageName, + ...newSizes, + }; + }, + }, ].filter(Boolean); } @@ -467,7 +498,6 @@ async function createBundle(bundle, bundleType) { onwarn: handleRollupWarning, plugins: getPlugins( bundle.entry, - externals, bundle.babel, filename, packageName, @@ -477,11 +507,6 @@ async function createBundle(bundle, bundleType) { bundle.modulesToStub, pureExternalModules ), - // We can't use getters in www. - legacy: - bundleType === FB_WWW_DEV || - bundleType === FB_WWW_PROD || - bundleType === FB_WWW_PROFILING, }; const [mainOutputPath, ...otherOutputPaths] = Packaging.getBundleOutputPaths( bundleType, @@ -496,10 +521,11 @@ async function createBundle(bundle, bundleType) { bundleType ); + let result; console.log(`${chalk.bgYellow.black(' BUILDING ')} ${logKey}`); try { - const result = await rollup(rollupConfig); - await result.write(rollupOutputOptions); + result = await rollup(rollupConfig); + result = await result.write(rollupOutputOptions); } catch (error) { console.log(`${chalk.bgRed.black(' OH NOES! ')} ${logKey}\n`); handleRollupError(error); @@ -509,6 +535,7 @@ async function createBundle(bundle, bundleType) { await asyncCopyTo(mainOutputPath, otherOutputPaths[i]); } console.log(`${chalk.bgGreen.black(' COMPLETE ')} ${logKey}\n`); + return result; } function handleRollupWarning(warning) { @@ -534,6 +561,16 @@ function handleRollupWarning(warning) { return; } + // Fix react-reconciler circular dependency later + if (warning.code === 'CIRCULAR_DEPENDENCY') { + if ( + warning.importer.includes('react-reconciler') || + warning.importer.includes('react-scheduler') + ) { + return; + } + } + if (typeof warning.code === 'string') { // This is a warning coming from Rollup itself. // These tend to be important (e.g. clashes in namespaced exports) @@ -588,6 +625,8 @@ async function buildEverything() { for (const bundle of Bundles.bundles) { await createBundle(bundle, UMD_DEV); await createBundle(bundle, UMD_PROD); + await createBundle(bundle, ESM_DEV); + const esmResult = await createBundle(bundle, ESM_PROD); await createBundle(bundle, NODE_DEV); await createBundle(bundle, NODE_PROD); await createBundle(bundle, NODE_PROFILING); @@ -600,6 +639,24 @@ async function buildEverything() { await createBundle(bundle, RN_FB_DEV); await createBundle(bundle, RN_FB_PROD); await createBundle(bundle, RN_FB_PROFILING); + + if ( + !shouldSkipBundle(bundle, ESM_DEV) && + !shouldSkipBundle(bundle, ESM_PROD) && + esmResult + ) { + const [packageName, entry] = bundle.entry.split('/'); + const filename = entry == null ? 'index.mjs' : entry + '.mjs'; + const filepath = path.resolve( + `build/node_modules/${packageName}`, + filename + ); + // write esm entry point + fs.writeFileSync( + filepath, + Entries.generateESMEntryPoint(packageName, esmResult.exports) + ); + } } await Packaging.copyAllShims(); diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index c35bf046f2e2b..8e456920dffe3 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -3,6 +3,8 @@ const bundleTypes = { UMD_DEV: 'UMD_DEV', UMD_PROD: 'UMD_PROD', + ESM_DEV: 'ESM_DEV', + ESM_PROD: 'ESM_PROD', NODE_DEV: 'NODE_DEV', NODE_PROD: 'NODE_PROD', NODE_PROFILING: 'NODE_PROFILING', @@ -19,6 +21,8 @@ const bundleTypes = { const UMD_DEV = bundleTypes.UMD_DEV; const UMD_PROD = bundleTypes.UMD_PROD; +const ESM_DEV = bundleTypes.ESM_DEV; +const ESM_PROD = bundleTypes.ESM_PROD; const NODE_DEV = bundleTypes.NODE_DEV; const NODE_PROD = bundleTypes.NODE_PROD; const NODE_PROFILING = bundleTypes.NODE_PROFILING; @@ -353,6 +357,8 @@ const bundles = [ FB_WWW_PROD, UMD_DEV, UMD_PROD, + ESM_DEV, + ESM_PROD, ], moduleType: ISOMORPHIC, entry: 'react-is', diff --git a/scripts/rollup/entries.js b/scripts/rollup/entries.js new file mode 100644 index 0000000000000..f7aed30cedef9 --- /dev/null +++ b/scripts/rollup/entries.js @@ -0,0 +1,18 @@ +'use strict'; + +function generateESMEntryPoint(packageName, exports) { + return [ + `import * as dev from "./esm/${packageName}.development.mjs";`, + `import * as prod from "./esm/${packageName}.production.min.mjs";`, + `\n`, + ...exports.map( + name => + `export var ${name} =\n` + + ` process.env.NODE_ENV !== 'production' ? dev.${name} : prod.${name}` + ), + ].join('\n'); +} + +module.exports = { + generateESMEntryPoint, +}; diff --git a/scripts/rollup/packaging.js b/scripts/rollup/packaging.js index d2c8c96ad289b..97cd88b213371 100644 --- a/scripts/rollup/packaging.js +++ b/scripts/rollup/packaging.js @@ -12,6 +12,8 @@ const { const { UMD_DEV, UMD_PROD, + ESM_DEV, + ESM_PROD, NODE_DEV, NODE_PROD, NODE_PROFILING, @@ -45,6 +47,12 @@ function getBundleOutputPaths(bundleType, filename, packageName) { `build/node_modules/${packageName}/umd/${filename}`, `build/dist/${filename}`, ]; + case ESM_DEV: + case ESM_PROD: + return [ + `build/node_modules/${packageName}/esm/${filename}`, + `build/dist/${filename}`, + ]; case FB_WWW_DEV: case FB_WWW_PROD: case FB_WWW_PROFILING: diff --git a/scripts/rollup/plugins/closure-plugin.js b/scripts/rollup/plugins/closure-plugin.js deleted file mode 100644 index 0c95ee99e22e2..0000000000000 --- a/scripts/rollup/plugins/closure-plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const ClosureCompiler = require('google-closure-compiler').compiler; -const {promisify} = require('util'); -const fs = require('fs'); -const tmp = require('tmp'); -const writeFileAsync = promisify(fs.writeFile); - -function compile(flags) { - return new Promise((resolve, reject) => { - const closureCompiler = new ClosureCompiler(flags); - closureCompiler.run(function(exitCode, stdOut, stdErr) { - if (!stdErr) { - resolve(stdOut); - } else { - reject(new Error(stdErr)); - } - }); - }); -} - -module.exports = function closure(flags = {}) { - return { - name: 'scripts/rollup/plugins/closure-plugin', - async transformBundle(code) { - const inputFile = tmp.fileSync(); - const tempPath = inputFile.name; - flags = Object.assign({}, flags, {js: tempPath}); - await writeFileAsync(tempPath, code, 'utf8'); - const compiledCode = await compile(flags); - inputFile.removeCallback(); - return {code: compiledCode}; - }, - }; -}; diff --git a/scripts/rollup/results.json b/scripts/rollup/results.json index ea7d1c4e07de1..5d58fd502ae64 100644 --- a/scripts/rollup/results.json +++ b/scripts/rollup/results.json @@ -4,29 +4,29 @@ "filename": "react.development.js", "bundleType": "UMD_DEV", "packageName": "react", - "size": 59086, - "gzip": 16296 + "size": 61209, + "gzip": 16384 }, { "filename": "react.production.min.js", "bundleType": "UMD_PROD", "packageName": "react", - "size": 7217, - "gzip": 3050 + "size": 7277, + "gzip": 3092 }, { "filename": "react.development.js", "bundleType": "NODE_DEV", "packageName": "react", - "size": 49501, - "gzip": 13887 + "size": 52395, + "gzip": 14287 }, { "filename": "react.production.min.js", "bundleType": "NODE_PROD", "packageName": "react", - "size": 5724, - "gzip": 2481 + "size": 6257, + "gzip": 2686 }, { "filename": "React-dev.js", @@ -46,29 +46,29 @@ "filename": "react-dom.development.js", "bundleType": "UMD_DEV", "packageName": "react-dom", - "size": 641505, - "gzip": 149286 + "size": 654096, + "gzip": 147770 }, { "filename": "react-dom.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-dom", - "size": 96507, - "gzip": 31258 + "size": 99208, + "gzip": 32246 }, { "filename": "react-dom.development.js", "bundleType": "NODE_DEV", "packageName": "react-dom", - "size": 625496, - "gzip": 145193 + "size": 619285, + "gzip": 145073 }, { "filename": "react-dom.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-dom", - "size": 94969, - "gzip": 30225 + "size": 99209, + "gzip": 31778 }, { "filename": "ReactDOM-dev.js", @@ -88,29 +88,29 @@ "filename": "react-dom-test-utils.development.js", "bundleType": "UMD_DEV", "packageName": "react-dom", - "size": 46355, - "gzip": 12768 + "size": 45973, + "gzip": 11921 }, { "filename": "react-dom-test-utils.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-dom", - "size": 10653, - "gzip": 3918 + "size": 10381, + "gzip": 3855 }, { "filename": "react-dom-test-utils.development.js", "bundleType": "NODE_DEV", "packageName": "react-dom", - "size": 41092, - "gzip": 11309 + "size": 43664, + "gzip": 11750 }, { "filename": "react-dom-test-utils.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-dom", - "size": 9913, - "gzip": 3696 + "size": 10175, + "gzip": 3798 }, { "filename": "ReactTestUtils-dev.js", @@ -123,29 +123,29 @@ "filename": "react-dom-unstable-native-dependencies.development.js", "bundleType": "UMD_DEV", "packageName": "react-dom", - "size": 62921, - "gzip": 16559 + "size": 59975, + "gzip": 14944 }, { "filename": "react-dom-unstable-native-dependencies.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-dom", - "size": 11622, - "gzip": 4007 + "size": 11378, + "gzip": 3931 }, { "filename": "react-dom-unstable-native-dependencies.development.js", "bundleType": "NODE_DEV", "packageName": "react-dom", - "size": 58483, - "gzip": 15262 + "size": 56924, + "gzip": 14672 }, { "filename": "react-dom-unstable-native-dependencies.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-dom", - "size": 10939, - "gzip": 3744 + "size": 11191, + "gzip": 3853 }, { "filename": "ReactDOMUnstableNativeDependencies-dev.js", @@ -165,29 +165,29 @@ "filename": "react-dom-server.browser.development.js", "bundleType": "UMD_DEV", "packageName": "react-dom", - "size": 105006, - "gzip": 27524 + "size": 105544, + "gzip": 27023 }, { "filename": "react-dom-server.browser.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-dom", - "size": 15463, - "gzip": 5917 + "size": 15675, + "gzip": 5981 }, { "filename": "react-dom-server.browser.development.js", "bundleType": "NODE_DEV", "packageName": "react-dom", - "size": 94052, - "gzip": 25217 + "size": 96479, + "gzip": 25723 }, { "filename": "react-dom-server.browser.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-dom", - "size": 14810, - "gzip": 5665 + "size": 15575, + "gzip": 5916 }, { "filename": "ReactDOMServer-dev.js", @@ -207,43 +207,43 @@ "filename": "react-dom-server.node.development.js", "bundleType": "NODE_DEV", "packageName": "react-dom", - "size": 96020, - "gzip": 25767 + "size": 98447, + "gzip": 26266 }, { "filename": "react-dom-server.node.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-dom", - "size": 15634, - "gzip": 5964 + "size": 16400, + "gzip": 6227 }, { "filename": "react-art.development.js", "bundleType": "UMD_DEV", "packageName": "react-art", - "size": 417844, - "gzip": 93214 + "size": 432501, + "gzip": 94151 }, { "filename": "react-art.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-art", - "size": 83064, - "gzip": 25615 + "size": 87693, + "gzip": 27244 }, { "filename": "react-art.development.js", "bundleType": "NODE_DEV", "packageName": "react-art", - "size": 341917, - "gzip": 73846 + "size": 342587, + "gzip": 75737 }, { "filename": "react-art.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-art", - "size": 46568, - "gzip": 14504 + "size": 51850, + "gzip": 16360 }, { "filename": "ReactART-dev.js", @@ -291,29 +291,29 @@ "filename": "react-test-renderer.development.js", "bundleType": "UMD_DEV", "packageName": "react-test-renderer", - "size": 349236, - "gzip": 75574 + "size": 341815, + "gzip": 72107 }, { "filename": "react-test-renderer.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-test-renderer", - "size": 47024, - "gzip": 14562 + "size": 50684, + "gzip": 15739 }, { "filename": "react-test-renderer.development.js", "bundleType": "NODE_DEV", "packageName": "react-test-renderer", - "size": 339847, - "gzip": 72777 + "size": 322205, + "gzip": 70346 }, { "filename": "react-test-renderer.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-test-renderer", - "size": 46110, - "gzip": 14094 + "size": 50390, + "gzip": 15549 }, { "filename": "ReactTestRenderer-dev.js", @@ -326,29 +326,29 @@ "filename": "react-test-renderer-shallow.development.js", "bundleType": "UMD_DEV", "packageName": "react-test-renderer", - "size": 24945, - "gzip": 6660 + "size": 24633, + "gzip": 6470 }, { "filename": "react-test-renderer-shallow.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-test-renderer", - "size": 7320, - "gzip": 2398 + "size": 7343, + "gzip": 2399 }, { "filename": "react-test-renderer-shallow.development.js", "bundleType": "NODE_DEV", "packageName": "react-test-renderer", - "size": 14751, - "gzip": 3694 + "size": 18807, + "gzip": 5202 }, { "filename": "react-test-renderer-shallow.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-test-renderer", - "size": 7363, - "gzip": 2403 + "size": 7956, + "gzip": 2622 }, { "filename": "ReactShallowRenderer-dev.js", @@ -361,57 +361,57 @@ "filename": "react-noop-renderer.development.js", "bundleType": "NODE_DEV", "packageName": "react-noop-renderer", - "size": 18358, - "gzip": 4804 + "size": 23444, + "gzip": 5370 }, { "filename": "react-noop-renderer.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-noop-renderer", - "size": 6829, - "gzip": 2631 + "size": 8824, + "gzip": 3045 }, { "filename": "react-reconciler.development.js", "bundleType": "NODE_DEV", "packageName": "react-reconciler", - "size": 331893, - "gzip": 70268 + "size": 331894, + "gzip": 71048 }, { "filename": "react-reconciler.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-reconciler", - "size": 46230, - "gzip": 13812 + "size": 49337, + "gzip": 15005 }, { "filename": "react-reconciler-persistent.development.js", "bundleType": "NODE_DEV", "packageName": "react-reconciler", - "size": 330477, - "gzip": 69672 + "size": 331090, + "gzip": 70931 }, { "filename": "react-reconciler-persistent.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-reconciler", - "size": 46241, - "gzip": 13818 + "size": 49348, + "gzip": 15011 }, { "filename": "react-reconciler-reflection.development.js", "bundleType": "NODE_DEV", "packageName": "react-reconciler", - "size": 11847, - "gzip": 3642 + "size": 14196, + "gzip": 4392 }, { "filename": "react-reconciler-reflection.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-reconciler", - "size": 2312, - "gzip": 1027 + "size": 2608, + "gzip": 1152 }, { "filename": "react-call-return.development.js", @@ -431,29 +431,29 @@ "filename": "react-is.development.js", "bundleType": "UMD_DEV", "packageName": "react-is", - "size": 4785, - "gzip": 1323 + "size": 5051, + "gzip": 1343 }, { "filename": "react-is.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-is", - "size": 1933, - "gzip": 787 + "size": 1973, + "gzip": 802 }, { "filename": "react-is.development.js", "bundleType": "NODE_DEV", "packageName": "react-is", - "size": 4596, - "gzip": 1264 + "size": 4651, + "gzip": 1279 }, { "filename": "react-is.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-is", - "size": 1881, - "gzip": 719 + "size": 1922, + "gzip": 735 }, { "filename": "ReactIs-dev.js", @@ -473,8 +473,8 @@ "filename": "simple-cache-provider.development.js", "bundleType": "NODE_DEV", "packageName": "simple-cache-provider", - "size": 7654, - "gzip": 2412 + "size": 9003, + "gzip": 2898 }, { "filename": "simple-cache-provider.production.min.js", @@ -487,267 +487,310 @@ "filename": "create-subscription.development.js", "bundleType": "NODE_DEV", "packageName": "create-subscription", - "size": 5636, - "gzip": 1973 + "size": 8037, + "gzip": 2774 }, { "filename": "create-subscription.production.min.js", "bundleType": "NODE_PROD", "packageName": "create-subscription", - "size": 2591, - "gzip": 1233 + "size": 2880, + "gzip": 1346 }, { "filename": "React-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react", - "size": 49728, - "gzip": 13583 + "size": 50690, + "gzip": 13934 }, { "filename": "React-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react", - "size": 13708, - "gzip": 3835 + "size": 14176, + "gzip": 3962 }, { "filename": "ReactDOM-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-dom", - "size": 634902, - "gzip": 144512 + "size": 645646, + "gzip": 148221 }, { "filename": "ReactDOM-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react-dom", - "size": 275897, - "gzip": 51771 + "size": 285614, + "gzip": 53792 }, { "filename": "ReactTestUtils-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-dom", - "size": 42513, - "gzip": 11507 + "size": 40752, + "gzip": 10824 }, { "filename": "ReactDOMUnstableNativeDependencies-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-dom", - "size": 58699, - "gzip": 15042 + "size": 54591, + "gzip": 13596 }, { "filename": "ReactDOMUnstableNativeDependencies-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react-dom", - "size": 26877, - "gzip": 5467 + "size": 26881, + "gzip": 5449 }, { "filename": "ReactDOMServer-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-dom", - "size": 97859, - "gzip": 25094 + "size": 100100, + "gzip": 25997 }, { "filename": "ReactDOMServer-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react-dom", - "size": 32295, - "gzip": 7922 + "size": 33865, + "gzip": 8174 }, { "filename": "ReactART-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-art", - "size": 334032, - "gzip": 69646 + "size": 352340, + "gzip": 75370 }, { "filename": "ReactART-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react-art", - "size": 145574, - "gzip": 24830 + "size": 157261, + "gzip": 27259 }, { "filename": "ReactNativeRenderer-dev.js", "bundleType": "RN_FB_DEV", "packageName": "react-native-renderer", - "size": 468596, - "gzip": 102411 + "size": 478802, + "gzip": 106093 }, { "filename": "ReactNativeRenderer-prod.js", "bundleType": "RN_FB_PROD", "packageName": "react-native-renderer", - "size": 210858, - "gzip": 36787 + "size": 219207, + "gzip": 38426 }, { "filename": "ReactNativeRenderer-dev.js", "bundleType": "RN_OSS_DEV", "packageName": "react-native-renderer", - "size": 468299, - "gzip": 102347 + "size": 460372, + "gzip": 101760 }, { "filename": "ReactNativeRenderer-prod.js", "bundleType": "RN_OSS_PROD", "packageName": "react-native-renderer", - "size": 198778, - "gzip": 34759 + "size": 209017, + "gzip": 36772 }, { "filename": "ReactFabric-dev.js", "bundleType": "RN_FB_DEV", "packageName": "react-native-renderer", - "size": 459344, - "gzip": 100124 + "size": 451770, + "gzip": 99577 }, { "filename": "ReactFabric-prod.js", "bundleType": "RN_FB_PROD", "packageName": "react-native-renderer", - "size": 190842, - "gzip": 33372 + "size": 199994, + "gzip": 35166 }, { "filename": "ReactFabric-dev.js", "bundleType": "RN_OSS_DEV", "packageName": "react-native-renderer", - "size": 459380, - "gzip": 100141 + "size": 451733, + "gzip": 99577 }, { "filename": "ReactFabric-prod.js", "bundleType": "RN_OSS_PROD", "packageName": "react-native-renderer", - "size": 190878, - "gzip": 33392 + "size": 200030, + "gzip": 35181 }, { "filename": "ReactTestRenderer-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-test-renderer", - "size": 345831, - "gzip": 72349 + "size": 343100, + "gzip": 73336 }, { "filename": "ReactShallowRenderer-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-test-renderer", - "size": 15507, - "gzip": 3819 + "size": 17253, + "gzip": 4501 }, { "filename": "ReactIs-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-is", - "size": 4669, - "gzip": 1292 + "size": 4728, + "gzip": 1301 }, { "filename": "ReactIs-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react-is", - "size": 3756, - "gzip": 999 + "size": 3811, + "gzip": 1012 }, { "filename": "react-scheduler.development.js", "bundleType": "UMD_DEV", "packageName": "react-scheduler", - "size": 19628, - "gzip": 5881 + "size": 15511, + "gzip": 4409 }, { "filename": "react-scheduler.production.min.js", "bundleType": "UMD_PROD", "packageName": "react-scheduler", - "size": 3233, - "gzip": 1562 + "size": 2784, + "gzip": 1285 }, { "filename": "react-scheduler.development.js", "bundleType": "NODE_DEV", "packageName": "react-scheduler", - "size": 14449, - "gzip": 4354 + "size": 14636, + "gzip": 4343 }, { "filename": "react-scheduler.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-scheduler", - "size": 2825, - "gzip": 1387 + "size": 2701, + "gzip": 1229 }, { "filename": "SimpleCacheProvider-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "simple-cache-provider", - "size": 8054, - "gzip": 2450 + "size": 8106, + "gzip": 2454 }, { "filename": "SimpleCacheProvider-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "simple-cache-provider", - "size": 3714, - "gzip": 1127 + "size": 3734, + "gzip": 1137 }, { "filename": "react-noop-renderer-persistent.development.js", "bundleType": "NODE_DEV", "packageName": "react-noop-renderer", - "size": 18487, - "gzip": 4818 + "size": 23573, + "gzip": 5384 }, { "filename": "react-noop-renderer-persistent.production.min.js", "bundleType": "NODE_PROD", "packageName": "react-noop-renderer", - "size": 6851, - "gzip": 2637 + "size": 8846, + "gzip": 3051 }, { "filename": "react-dom.profiling.min.js", "bundleType": "NODE_PROFILING", "packageName": "react-dom", - "size": 95896, - "gzip": 30574 + "size": 100373, + "gzip": 32186 }, { "filename": "ReactNativeRenderer-profiling.js", "bundleType": "RN_OSS_PROFILING", "packageName": "react-native-renderer", - "size": 201375, - "gzip": 35312 + "size": 212664, + "gzip": 37495 }, { "filename": "ReactFabric-profiling.js", "bundleType": "RN_OSS_PROFILING", "packageName": "react-native-renderer", - "size": 193150, - "gzip": 33867 + "size": 203097, + "gzip": 35830 }, { "filename": "ReactScheduler-dev.js", "bundleType": "FB_WWW_DEV", "packageName": "react-scheduler", - "size": 14452, - "gzip": 4364 + "size": 14856, + "gzip": 4380 }, { "filename": "ReactScheduler-prod.js", "bundleType": "FB_WWW_PROD", "packageName": "react-scheduler", - "size": 7800, - "gzip": 2108 + "size": 7759, + "gzip": 1939 + }, + { + "filename": "ReactDOM-profiling.js", + "bundleType": "FB_WWW_PROFILING", + "packageName": "react-dom", + "size": 288968, + "gzip": 54548 + }, + { + "filename": "ReactNativeRenderer-profiling.js", + "bundleType": "RN_FB_PROFILING", + "packageName": "react-native-renderer", + "size": 222814, + "gzip": 39151 + }, + { + "filename": "ReactFabric-profiling.js", + "bundleType": "RN_FB_PROFILING", + "packageName": "react-native-renderer", + "size": 203056, + "gzip": 35811 + }, + { + "filename": "react-is.development.mjs", + "bundleType": "ESM_DEV", + "packageName": "react-is", + "size": 4058, + "gzip": 1132 + }, + { + "filename": "react-is.production.min.mjs", + "bundleType": "ESM_PROD", + "packageName": "react-is", + "size": 3446, + "gzip": 1200 + } + ], + "treeshakedSizes": [ + { + "filename": "react-is.development.mjs", + "packageName": "react-is", + "originalSize": 4057, + "treeshakedSize": 0 } ] } \ No newline at end of file diff --git a/scripts/rollup/stats.js b/scripts/rollup/stats.js index 54d761a7e1562..4f877b61ef140 100644 --- a/scripts/rollup/stats.js +++ b/scripts/rollup/stats.js @@ -11,6 +11,7 @@ const currentBuildResults = { // Mutated inside build.js during a build run. // We make a copy so that partial rebuilds don't erase other stats. bundleSizes: [...prevBuildResults.bundleSizes], + treeshakedSizes: [...prevBuildResults.treeshakedSizes], }; function saveResults() { diff --git a/scripts/rollup/treeshake.js b/scripts/rollup/treeshake.js new file mode 100644 index 0000000000000..baed874407dac --- /dev/null +++ b/scripts/rollup/treeshake.js @@ -0,0 +1,55 @@ +'use strict'; + +const {rollup} = require('rollup'); +const {transform} = require('babel-core'); + +const fakeInput = '__treeshake_module_input__.js'; +const fakeCode = '__treeshake_module_code__.js'; + +const resolvePlugin = ({inputCode}) => ({ + resolveId(importee) { + if (importee === fakeInput) { + return importee; + } + if (importee === fakeCode) { + return fakeCode; + } + }, + + load(id) { + if (id === fakeInput) { + return `import {} from "${fakeCode}";`; + } + if (id === fakeCode) { + return inputCode; + } + return null; + }, +}); + +function treeshakeCode(inputCode) { + const config = { + input: fakeInput, + onwarn() {}, + external: id => + !id.startsWith('.') && + !id.startsWith('/') && + id !== fakeInput && + id !== fakeCode, + plugins: [resolvePlugin({inputCode})], + }; + + return rollup(config) + .then(bundle => bundle.generate({format: 'esm'})) + .then(result => + transform(result.code, {compact: true, minified: true, comments: false}) + ) + .then(result => ({ + originalSize: inputCode.length, + treeshakedSize: result.code.length, + })); +} + +module.exports = { + treeshakeCode, +}; diff --git a/scripts/rollup/wrappers.js b/scripts/rollup/wrappers.js index 3f7eacf4871a7..da5c9ea0445aa 100644 --- a/scripts/rollup/wrappers.js +++ b/scripts/rollup/wrappers.js @@ -5,6 +5,8 @@ const reactVersion = require('../../package.json').version; const UMD_DEV = Bundles.bundleTypes.UMD_DEV; const UMD_PROD = Bundles.bundleTypes.UMD_PROD; +const ESM_DEV = Bundles.bundleTypes.ESM_DEV; +const ESM_PROD = Bundles.bundleTypes.ESM_PROD; const NODE_DEV = Bundles.bundleTypes.NODE_DEV; const NODE_PROD = Bundles.bundleTypes.NODE_PROD; const NODE_PROFILING = Bundles.bundleTypes.NODE_PROFILING; @@ -49,6 +51,27 @@ ${license} ${source}`; }, + /***************** ESM_DEV *****************/ + [ESM_DEV](source, globalName, filename, moduleType) { + return `/** @license React v${reactVersion} + * ${filename} + * +${license} + */ + +${source}`; + }, + + /***************** ESM_PROD *****************/ + [ESM_PROD](source, globalName, filename, moduleType) { + return `/** @license React v${reactVersion} + * ${filename} + * +${license} + */ +${source}`; + }, + /***************** NODE_DEV *****************/ [NODE_DEV](source, globalName, filename, moduleType) { return `/** @license React v${reactVersion} diff --git a/scripts/smoke-modules/run.js b/scripts/smoke-modules/run.js new file mode 100644 index 0000000000000..fccc8014799b7 --- /dev/null +++ b/scripts/smoke-modules/run.js @@ -0,0 +1,12 @@ +'use strict'; + +const {execSync} = require('child_process'); +const glob = require('glob'); + +const entries = glob.sync('build/node_modules/**/index.mjs'); + +entries.forEach(entry => { + execSync(`node --experimental-modules "./${entry}"`); +}); + +console.info(`\n${entries.length} .mjs entry points are run successfully!\n`); diff --git a/yarn.lock b/yarn.lock index 17cbf7aa36a34..61244107f0838 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,15 @@ # yarn lockfile v1 +"@ampproject/rollup-plugin-closure-compiler@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@ampproject/rollup-plugin-closure-compiler/-/rollup-plugin-closure-compiler-0.6.1.tgz#7a20a4cb70dd81579564d4bf9eaa8139de51286a" + dependencies: + acorn "5.7.1" + google-closure-compiler "20180716.0.1" + magic-string "0.25.0" + temp-write "3.4.0" + "@babel/code-frame@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" @@ -92,6 +101,14 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + +"@types/node@*": + version "10.5.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.5.tgz#8e84d24e896cd77b0d4f73df274027e3149ec2ba" + abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -112,6 +129,10 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" +acorn@5.7.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" @@ -1033,7 +1054,7 @@ browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" -browser-resolve@^1.11.0, browser-resolve@^1.11.2: +browser-resolve@^1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" dependencies: @@ -1049,10 +1070,14 @@ buffer-from@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" -builtin-modules@^1.0.0, builtin-modules@^1.1.0: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +builtin-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1516,7 +1541,11 @@ detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" -diff@3.3.0, diff@^3.2.0: +diff@3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" + +diff@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" @@ -1771,9 +1800,9 @@ estree-walker@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" -estree-walker@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.0.tgz#aae3b57c42deb8010e349c892462f0e71c5dd1aa" +estree-walker@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" @@ -2242,13 +2271,24 @@ globby@^5.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -google-closure-compiler@20180506.0.0: - version "20180506.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20180506.0.0.tgz#f59cc34dbf8c9a4f48fba3ebb2cf098d25e345ab" +google-closure-compiler-linux@^20180716.0.0: + version "20180716.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20180716.0.0.tgz#b0dc9aa4751085b46002d6a300146df73fa87d35" + +google-closure-compiler-osx@^20180716.0.0: + version "20180716.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20180716.0.0.tgz#5691c07580578dfea3205e90a6a2968d23b85bd9" + +google-closure-compiler@20180716.0.1: + version "20180716.0.1" + resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20180716.0.1.tgz#48deb2b1dfe4c118adcb70dd104cf4fa2b9508d7" dependencies: chalk "^1.0.0" vinyl "^2.0.1" vinyl-sourcemaps-apply "^0.2.0" + optionalDependencies: + google-closure-compiler-linux "^20180716.0.0" + google-closure-compiler-osx "^20180716.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: version "4.1.11" @@ -2634,6 +2674,10 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + is-my-json-valid@^2.12.4: version "2.16.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" @@ -3390,6 +3434,18 @@ magic-string@0.22.4, magic-string@^0.22.4: dependencies: vlq "^0.2.1" +magic-string@0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.0.tgz#1f3696f9931ff0a1ed4c132250529e19cad6759b" + dependencies: + sourcemap-codec "^1.4.1" + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + dependencies: + pify "^3.0.0" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -3921,6 +3977,10 @@ pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -4282,12 +4342,18 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.4.0: +resolve@^1.1.6: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" dependencies: path-parse "^1.0.5" +resolve@^1.5.0: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -4315,35 +4381,34 @@ rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1: dependencies: glob "^7.0.5" -rollup-plugin-babel@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.2.tgz#a2765dea0eaa8aece351c983573300d17497495b" +rollup-plugin-babel@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.7.tgz#5b13611f1ab8922497e9d15197ae5d8a23fe3b1e" dependencies: rollup-pluginutils "^1.5.0" -rollup-plugin-commonjs@^8.2.6: - version "8.2.6" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.2.6.tgz#27e5b9069ff94005bb01e01bb46a1e4873784677" +rollup-plugin-commonjs@^9.1.4: + version "9.1.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.4.tgz#525b701adfd40e314b5bb6888d88edc28e10442f" dependencies: - acorn "^5.2.1" - estree-walker "^0.5.0" + estree-walker "^0.5.1" magic-string "^0.22.4" - resolve "^1.4.0" + resolve "^1.5.0" rollup-pluginutils "^2.0.1" -rollup-plugin-node-resolve@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8" +rollup-plugin-node-resolve@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713" dependencies: - browser-resolve "^1.11.0" - builtin-modules "^1.1.0" + builtin-modules "^2.0.0" + is-module "^1.0.0" resolve "^1.1.6" -rollup-plugin-prettier@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-prettier/-/rollup-plugin-prettier-0.3.0.tgz#1000df8a2914d367b79507c1caa582fdbed8b0f3" +rollup-plugin-prettier@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-prettier/-/rollup-plugin-prettier-0.4.0.tgz#de3749c433fa1e0b2a2cf9a51534fa330dcc7d53" dependencies: - diff "3.3.0" + diff "3.4.0" magic-string "0.22.4" prettier "^1.0.0" @@ -4377,9 +4442,12 @@ rollup-pluginutils@^1.5.0: estree-walker "^0.2.1" minimatch "^3.0.2" -rollup@^0.52.1: - version "0.52.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.52.1.tgz#610e8e1be432f18fcfbfa865408a1cd7618cd707" +rollup@^0.63.5: + version "0.63.5" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.63.5.tgz#5543eecac9a1b83b7e1be598b5be84c9c0a089db" + dependencies: + "@types/estree" "0.0.39" + "@types/node" "*" rsvp@^3.3.3: version "3.6.2" @@ -4580,6 +4648,10 @@ source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +sourcemap-codec@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" + spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" @@ -4793,6 +4865,21 @@ targz@^1.0.1: dependencies: tar-fs "^1.8.1" +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + +temp-write@3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" + dependencies: + graceful-fs "^4.1.2" + is-stream "^1.1.0" + make-dir "^1.0.0" + pify "^3.0.0" + temp-dir "^1.0.0" + uuid "^3.0.1" + test-exclude@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" @@ -5017,6 +5104,10 @@ uuid@^3.0.0, uuid@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" +uuid@^3.0.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + v8flags@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"