Skip to content

Commit d091060

Browse files
author
Dimitri Kopriwa
committed
fix(dependencies): Upgrade all dependencies, using @rollup-umd/rollup for rollup configuration
1 parent 7e5c28c commit d091060

File tree

2 files changed

+16
-114
lines changed

2 files changed

+16
-114
lines changed

package.json

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,24 @@
6868
"@babel/plugin-proposal-class-properties": "^7.3.0",
6969
"@babel/plugin-proposal-decorators": "^7.3.0",
7070
"@babel/plugin-proposal-json-strings": "^7.2.0",
71-
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
71+
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
7272
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
7373
"@babel/plugin-syntax-import-meta": "^7.2.0",
7474
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
7575
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
7676
"@babel/plugin-transform-react-inline-elements": "^7.2.0",
7777
"@babel/preset-env": "^7.3.1",
7878
"@babel/preset-react": "^7.0.0",
79-
"@bootstrap-styled/documentation": "^1.2.3",
79+
"@bootstrap-styled/documentation": "^1.2.4",
8080
"@bootstrap-styled/provider": "^1.4.2",
81-
"@rollup-umd/documentation": "^1.3.7",
81+
"@rollup-umd/documentation": "^1.3.13",
82+
"@rollup-umd/rollup": "^1.0.1",
8283
"@semantic-release/changelog": "^3.0.2",
8384
"@semantic-release/git": "^7.0.8",
8485
"@semantic-release/github": "^5.2.10",
8586
"@semantic-release/npm": "^5.1.4",
8687
"babel-eslint": "^10.0.1",
87-
"babel-jest": "^24.0.0",
88+
"babel-jest": "^24.1.0",
8889
"babel-loader": "^8.0.5",
8990
"babel-plugin-add-module-exports": "^1.0.0",
9091
"babel-plugin-array-includes": "^2.0.3",
@@ -96,45 +97,33 @@
9697
"babel-preset-react-hmre": "^1.1.1",
9798
"cz-conventional-changelog": "^2.1.0",
9899
"enzyme": "^3.8.0",
99-
"enzyme-adapter-react-16": "^1.8.0",
100+
"enzyme-adapter-react-16": "^1.9.1",
100101
"eslint": "^5.13.0",
101102
"eslint-config-airbnb": "^17.1.0",
102103
"eslint-plugin-import": "^2.16.0",
103-
"eslint-plugin-jsx-a11y": "^6.2.0",
104+
"eslint-plugin-jsx-a11y": "^6.2.1",
104105
"eslint-plugin-react": "^7.12.4",
105106
"immutable": "^4.0.0-rc.12",
106-
"jest-cli": "^24.0.0",
107+
"jest-cli": "^24.1.0",
107108
"jest-sonar-reporter": "^2.0.0",
108109
"lint-staged": "^8.1.3",
109110
"mini-html-webpack-plugin": "^0.2.3",
110111
"pre-commit": "^1.2.2",
111112
"raf": "^3.4.1",
112-
"react": "^16.7.0",
113-
"react-dom": "^16.7.0",
113+
"react": "^16.8.0",
114+
"react-dom": "^16.8.0",
114115
"react-styleguidist": "^8.0.6",
115-
"react-test-renderer": "^16.7.0",
116+
"react-test-renderer": "^16.8.0",
116117
"rimraf": "^2.6.3",
117118
"rollup": "^1.1.2",
118-
"rollup-plugin-babel": "^4.3.2",
119-
"rollup-plugin-cleanup": "^3.1.1",
120-
"rollup-plugin-commonjs": "^9.2.0",
121-
"rollup-plugin-inject": "^2.2.0",
122-
"rollup-plugin-json": "^3.1.0",
123-
"rollup-plugin-node-builtins": "^2.1.2",
124-
"rollup-plugin-node-resolve": "^4.0.0",
125-
"rollup-plugin-replace": "^2.1.0",
126-
"rollup-plugin-terser": "^4.0.3",
127-
"rollup-plugin-visualizer": "^0.9.2",
128-
"rollup-watch": "^4.3.1",
129119
"semantic-release": "^15.13.3",
130120
"styled-components": "^4.1.3",
131121
"stylelint": "^9.10.1",
132122
"stylelint-config-recommended": "^2.1.0",
133123
"stylelint-config-styled-components": "^0.1.1",
134124
"stylelint-processor-styled-components": "^1.5.2",
135-
"terser": "3.14.1",
136125
"toctoc": "^0.3.2",
137-
"webpack": "^4.29.0"
126+
"webpack": "^4.29.2"
138127
},
139128
"jest": {
140129
"roots": [
@@ -205,8 +194,8 @@
205194
"tether-fix": "^1.4.0-fix-es"
206195
},
207196
"peerDependencies": {
208-
"react": "^16.7.0",
209-
"react-dom": "^16.7.0",
197+
"react": "^16.8.0",
198+
"react-dom": "^16.8.0",
210199
"styled-components": "^4.1.3"
211200
},
212201
"publishConfig": {

rollup.config.js

Lines changed: 2 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,3 @@
1-
/* eslint-disable flowtype-errors/show-errors, no-console, import/extensions */
2-
import nodeResolve from 'rollup-plugin-node-resolve';
3-
import replace from 'rollup-plugin-replace';
4-
import commonjs from 'rollup-plugin-commonjs';
5-
import inject from 'rollup-plugin-inject';
6-
import babel from 'rollup-plugin-babel';
7-
import json from 'rollup-plugin-json';
8-
import { terser } from 'rollup-plugin-terser';
9-
import cleanup from 'rollup-plugin-cleanup';
10-
import visualizer from 'rollup-plugin-visualizer';
11-
import builtins from 'rollup-plugin-node-builtins';
12-
import pkg from './package.json';
13-
import declination from './declination.json';
14-
const processShim = '\0process-shim';
15-
const prod = process.env.PRODUCTION;
16-
const mode = prod ? 'production' : 'development';
17-
const { external, globals } = declination;
1+
import { createConfig } from '@rollup-umd/rollup';
182

19-
console.log(`Creating ${mode} bundle...`);
20-
21-
const output = prod ? [
22-
{
23-
name: pkg.name, exports: 'named', globals, file: `dist/${pkg.name}.min.js`, format: 'umd', sourcemap: true,
24-
},
25-
{
26-
name: pkg.name, exports: 'named', globals, file: `dist/${pkg.name}.cjs.min.js`, format: 'cjs', sourcemap: true,
27-
},
28-
{
29-
name: pkg.name, exports: 'named', globals, file: `dist/${pkg.name}.esm.js`, format: 'es', sourcemap: true,
30-
},
31-
] : [
32-
{
33-
name: pkg.name, exports: 'named', globals, file: `dist/${pkg.name}.js`, format: 'umd', sourcemap: true,
34-
},
35-
{
36-
name: pkg.name, exports: 'named', globals, file: `dist/${pkg.name}.cjs.js`, format: 'cjs', sourcemap: true,
37-
},
38-
{
39-
name: pkg.name, exports: 'named', globals, file: `dist/${pkg.name}.esm.js`, format: 'es', sourcemap: true,
40-
},
41-
];
42-
43-
const plugins = [
44-
// Unlike Webpack and Browserify, Rollup doesn't automatically shim Node
45-
// builtins like `process`. This ad-hoc plugin creates a 'virtual module'
46-
// which includes a shim containing just the parts the bundle needs.
47-
{
48-
resolveId(importee) {
49-
if (importee === processShim) return importee;
50-
return null;
51-
},
52-
load(id) {
53-
if (id === processShim) return 'export default { argv: [], env: {} }';
54-
return null;
55-
},
56-
},
57-
builtins(),
58-
nodeResolve({
59-
browser: true,
60-
}),
61-
commonjs({
62-
include: 'node_modules/**',
63-
namedExports: {
64-
// left-hand side can be an absolute path, a path
65-
// relative to the current directory, or the name
66-
// of a module in node_modules
67-
'bootstrap-styled-utils': ['parseTransition'],
68-
immutable: ['fromJS'],
69-
},
70-
}),
71-
replace({
72-
'process.env.NODE_ENV': JSON.stringify(prod ? 'production' : 'development'),
73-
}),
74-
inject({
75-
process: processShim,
76-
}),
77-
json(),
78-
babel({
79-
babelrc: false,
80-
exclude: 'node_modules/**',
81-
}),
82-
cleanup(),
83-
];
84-
85-
export default output.map((o) => ({
86-
input: 'src/index.js',
87-
external,
88-
output: o,
89-
plugins: prod ? plugins.concat([terser(), visualizer({ filename: './bundle-stats.html' })]) : plugins,
90-
}));
3+
export default createConfig();

0 commit comments

Comments
 (0)