Skip to content

Commit

Permalink
Update rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusNotheis committed Mar 31, 2020
1 parent 90aa801 commit 31c28f8
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 91 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"@babel/core": "^7.8.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.0",
"@babel/plugin-proposal-optional-chaining": "^7.8.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@storybook/storybook-deployer": "^2.8.1",
"@types/enzyme": "^3.10.5",
"@types/jest": "^25.1.2",
Expand Down Expand Up @@ -76,13 +79,10 @@
"react-app-polyfill": "^1.0.6",
"react-dom": "^16.8.6",
"rimraf": "^3.0.1",
"rollup": "^1.31.0",
"rollup": "^2.3.1",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-prettier": "^0.6.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-strip-banner": "^1.0.0",
"rollup-plugin-strip-banner": "^2.0.0",
"shelljs": "^0.8.3",
"sinon": "^8.1.1",
"targz": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/main/scripts/create-library-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs');
const PATHS = require('../../../config/paths');

const LIB_BASE_PATH = path.resolve(PATHS.packages, 'main', 'src', 'lib');
const INTERNAL_COMPONENTS = ['withWebComponent', 'ScrollContext'];
const INTERNAL_COMPONENTS = ['withWebComponent', 'ScrollContext', 'ThemingSupport'];

const allLibFiles = fs
.readdirSync(LIB_BASE_PATH)
Expand Down
2 changes: 0 additions & 2 deletions packages/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ import { TextAlign } from './lib/TextAlign';
import { TextArea } from './lib/TextArea';
import { ThemeProvider } from './lib/ThemeProvider';
import { Themes } from './lib/Themes';
import { ThemingSupport } from './lib/ThemingSupport';
import { TimePicker } from './lib/TimePicker';
import { Timeline } from './lib/Timeline';
import { TimelineItem } from './lib/TimelineItem';
Expand Down Expand Up @@ -256,7 +255,6 @@ export {
TextArea,
ThemeProvider,
Themes,
ThemingSupport,
TimePicker,
Timeline,
TimelineItem,
Expand Down
7 changes: 4 additions & 3 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ const { rollup } = require('rollup');
const stripBanner = require('rollup-plugin-strip-banner');
const babel = require('rollup-plugin-babel');
const prettier = require('rollup-plugin-prettier');
const replace = require('rollup-plugin-replace');
const resolve = require('rollup-plugin-node-resolve');
const replace = require('@rollup/plugin-replace');
const resolve = require('@rollup/plugin-node-resolve');
const json = require('@rollup/plugin-json');
const closure = require('./plugins/closure-plugin');
const sizes = require('./plugins/sizes-plugin');
const stripUnusedImports = require('./plugins/strip-unused-imports');
const Bundles = require('./bundles');
const Stats = require('./stats');
const { asyncCopyTo, asyncRimRaf } = require('../utils');
const codeFrame = require('babel-code-frame');
const chalk = require('chalk');
const path = require('path');
Expand Down Expand Up @@ -147,6 +147,7 @@ function getPlugins(entry, externals, updateBabelOptions, filename, packageName,
stripBanner({
exclude: 'node_modules/**/*'
}),
json(),
// Compile to ES5.
babel(getBabelConfig(updateBabelOptions, bundleType)),
// Turn __DEV__ and process.env checks into constants.
Expand Down
16 changes: 8 additions & 8 deletions scripts/rollup/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@
"filename": "base.development.js",
"bundleType": "NODE_DEV",
"packageName": "base",
"size": 82238,
"gzip": 15545
"size": 88749,
"gzip": 16153
},
{
"filename": "base.production.min.js",
"bundleType": "NODE_PROD",
"packageName": "base",
"size": 82238,
"gzip": 15545
"size": 88749,
"gzip": 16153
},
{
"filename": "main.development.js",
"bundleType": "NODE_DEV",
"packageName": "main",
"size": 140984,
"gzip": 36750
"size": 158251,
"gzip": 40291
},
{
"filename": "main.production.min.js",
"bundleType": "NODE_PROD",
"packageName": "main",
"size": 140984,
"gzip": 36750
"size": 158251,
"gzip": 40291
}
]
}
4 changes: 3 additions & 1 deletion shared/rollup/configFactory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const resolve = require('rollup-plugin-node-resolve');
const resolve = require('@rollup/plugin-node-resolve');
const babel = require('rollup-plugin-babel');
const path = require('path');
const fs = require('fs');
const json = require('@rollup/plugin-json');
const escapeStringRegexp = require('escape-string-regexp');
const PATHS = require('../../config/paths');
const { highlightLog } = require('../utils');
Expand All @@ -19,6 +20,7 @@ const rollupConfigFactory = (pkgName, externals = []) => {
resolve({
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json']
}),
json(),
babel({
presets: ['babel-preset-react-app/prod'],
plugins: ['@babel/plugin-proposal-nullish-coalescing-operator'],
Expand Down
124 changes: 53 additions & 71 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,39 @@
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"

"@rollup/plugin-json@^4.0.2":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.0.2.tgz#482185ee36ac7dd21c346e2dbcc22ffed0c6f2d6"
integrity sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg==
dependencies:
"@rollup/pluginutils" "^3.0.4"

"@rollup/plugin-node-resolve@^7.1.1":
version "7.1.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.1.tgz#8c6e59c4b28baf9d223028d0e450e06a485bb2b7"
integrity sha512-14ddhD7TnemeHE97a4rLOhobfYvUVcaYuqTnL8Ti7Jxi9V9Jr5LY7Gko4HZ5k4h4vqQM0gBQt6tsp9xXW94WPA==
dependencies:
"@rollup/pluginutils" "^3.0.6"
"@types/resolve" "0.0.8"
builtin-modules "^3.1.0"
is-module "^1.0.0"
resolve "^1.14.2"

"@rollup/plugin-replace@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.1.tgz#16fb0563628f9e6c6ef9e05d48d3608916d466f5"
integrity sha512-qDcXj2VOa5+j0iudjb+LiwZHvBRRgWbHPhRmo1qde2KItTjuxDVQO21rp9/jOlzKR5YO0EsgRQoyox7fnL7y/A==
dependencies:
"@rollup/pluginutils" "^3.0.4"
magic-string "^0.25.5"

"@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.6":
version "3.0.8"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde"
integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==
dependencies:
estree-walker "^1.0.1"

"@samverschueren/stream-to-observable@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f"
Expand Down Expand Up @@ -3172,16 +3205,6 @@
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==

"@types/estree@*":
version "0.0.42"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.42.tgz#8d0c1f480339efedb3e46070e22dd63e0430dd11"
integrity sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==

"@types/estree@0.0.39":
version "0.0.39"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==

"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
Expand Down Expand Up @@ -7303,6 +7326,11 @@ estree-walker@^0.6.1:
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==

estree-walker@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==

esutils@^2.0.0, esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
Expand Down Expand Up @@ -7975,7 +8003,7 @@ fsevents@^1.2.7:
bindings "^1.5.0"
nan "^2.12.1"

fsevents@^2.1.2:
fsevents@^2.1.2, fsevents@~2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==
Expand Down Expand Up @@ -9555,13 +9583,6 @@ is-redirect@^1.0.0:
resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=

is-reference@^1.1.2:
version "1.1.4"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427"
integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==
dependencies:
"@types/estree" "0.0.39"

is-regex@^1.0.3, is-regex@^1.0.4, is-regex@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae"
Expand Down Expand Up @@ -11705,14 +11726,7 @@ magic-string@0.25.1:
dependencies:
sourcemap-codec "^1.4.1"

magic-string@0.25.4:
version "0.25.4"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143"
integrity sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==
dependencies:
sourcemap-codec "^1.4.4"

magic-string@^0.25.2:
magic-string@0.25.7, magic-string@^0.25.5:
version "0.25.7"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
Expand Down Expand Up @@ -15198,7 +15212,7 @@ resolve@1.1.7:
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=

resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.8.1:
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.8.1:
version "1.15.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
Expand Down Expand Up @@ -15287,28 +15301,6 @@ rollup-plugin-babel@^4.3.2:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.8.1"

rollup-plugin-commonjs@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb"
integrity sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==
dependencies:
estree-walker "^0.6.1"
is-reference "^1.1.2"
magic-string "^0.25.2"
resolve "^1.11.0"
rollup-pluginutils "^2.8.1"

rollup-plugin-node-resolve@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523"
integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==
dependencies:
"@types/resolve" "0.0.8"
builtin-modules "^3.1.0"
is-module "^1.0.0"
resolve "^1.11.1"
rollup-pluginutils "^2.8.1"

rollup-plugin-prettier@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-prettier/-/rollup-plugin-prettier-0.6.0.tgz#3b53b4ac2def23f150f496cff9106f4042a4ade1"
Expand All @@ -15322,38 +15314,28 @@ rollup-plugin-prettier@^0.6.0:
magic-string "0.25.1"
prettier "^1.0.0"

rollup-plugin-replace@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz#f41ae5372e11e7a217cde349c8b5d5fd115e70e3"
integrity sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA==
dependencies:
magic-string "^0.25.2"
rollup-pluginutils "^2.6.0"

rollup-plugin-strip-banner@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-strip-banner/-/rollup-plugin-strip-banner-1.0.0.tgz#28ddfb74e7b9c1fe3e612124fa83e571b914e893"
integrity sha512-hatiuCbYCM7db/JmogCn5a4/Un5dLnAIT4ixXmH9qNCbzXJqd0/jnVd/8ZDA3fF7WmmVh7D18GAzha0MMmRpSQ==
rollup-plugin-strip-banner@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-strip-banner/-/rollup-plugin-strip-banner-2.0.0.tgz#de1a3eb4688964609ac473d75d2bed97f007ea67"
integrity sha512-9ipg2Wzl+6AZ+8PW65DrvuLzVrf9PjXZW39GeG9R0j0vm6DgxYli14wDpovRuKc+xEjKIE5DLAGwUem4Yvo+IA==
dependencies:
extract-banner "0.1.2"
magic-string "0.25.4"
magic-string "0.25.7"
rollup-pluginutils "2.8.2"

rollup-pluginutils@2.8.2, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1:
rollup-pluginutils@2.8.2, rollup-pluginutils@^2.8.1:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
dependencies:
estree-walker "^0.6.1"

rollup@^1.31.0:
version "1.32.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.32.1.tgz#4480e52d9d9e2ae4b46ba0d9ddeaf3163940f9c4"
integrity sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==
dependencies:
"@types/estree" "*"
"@types/node" "*"
acorn "^7.1.0"
rollup@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.3.1.tgz#844c5cdf88d212ff7e59212088c37eacc521a2f9"
integrity sha512-BRjzOauORe+R0U0I6SkMTSG22nYmtztR/TaBl0SvbXgc3VAxBDrZoB6HROiK0S5px1pUBnLnjBkbzmVuwC9Q1Q==
optionalDependencies:
fsevents "~2.1.2"

rst-selector-parser@^2.2.3:
version "2.2.3"
Expand Down

0 comments on commit 31c28f8

Please sign in to comment.