Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update npm deps: babel@7 rollup@1 #3366

Merged
merged 8 commits into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"plugins": [
"emotion",
"transform-class-properties",
"transform-object-rest-spread"
"plugins": ["emotion", "@babel/plugin-proposal-class-properties"],
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-flow"
],
"presets": ["env", "react"],
"ignore": ["node_modules"]
}
2 changes: 1 addition & 1 deletion docs/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'babel-polyfill';
import '@babel/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
Expand Down
2 changes: 1 addition & 1 deletion package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
default: concurrent.nps('build.flowtype.lib'),
lib: 'echo "// @flow\n\nexport * from \'../src\';" > lib/index.js.flow',
},
docs: series(rimraf('docs/dist'), 'webpack --progress -p'),
docs: series(rimraf('docs/dist'), 'cross-env FORCE_EXTRACT_REACT_TYPES=true webpack --progress -p'),
},
publish: {
default: series(
Expand Down
41 changes: 19 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@
"@atlaskit/modal-dialog": "^4.0.3",
"@atlaskit/spinner": "^5.0.0",
"@atlaskit/tooltip": "^9.1.4",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-loader": "^7.1.2",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.0",
"babel-plugin-emotion": "9.2.10",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"bundlesize": "^0.17.0",
"chroma-js": "^1.3.6",
"chrono-node": "^1.3.5",
Expand All @@ -53,7 +54,7 @@
"enzyme-to-json": "^3.3.0",
"eslint": "^4.6.1",
"eslint-plugin-react": "^7.3.0",
"extract-react-types-loader": "^0.1.2",
"extract-react-types-loader": "^0.3.0",
"flow-bin": "^0.72.0",
"gh-pages": "^1.1.0",
"html-webpack-plugin": "^2.30.1",
Expand All @@ -64,7 +65,7 @@
"moment": "^2.20.1",
"nps": "^5.7.1",
"nps-utils": "^1.3.0",
"pretty-proptypes": "^0.2.1",
"pretty-proptypes": "^0.5.0",
"raf-schd": "^2.1.0",
"raw-loader": "^0.5.1",
"react": "^16.2.0",
Expand All @@ -74,13 +75,12 @@
"react-markings": "^1.3.0",
"react-router-dom": "^4.2.2",
"react-syntax-highlighter": "^7.0.1",
"rollup": "^0.57.1",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^3.0.0",
"rollup": "1.1.2",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-terser": "^4.0.2",
"style-loader": "^0.19.1",
"uglify-es": "^3.3.9",
"unfetch": "^3.0.0",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.9.7"
Expand All @@ -95,7 +95,7 @@
"coveralls": "cat coverage/lcov.info | coveralls",
"lint": "eslint .",
"deploy": "cross-env NODE_ENV=production nps publish",
"start": "webpack-dev-server --progress",
"start": "cross-env FORCE_EXTRACT_REACT_TYPES=true webpack-dev-server --progress",
"fresh": "rm -rf node_modules && yarn install",
"test": "npm run test:jest && npm run test:cypress",
"test:jest": "jest --coverage",
Expand Down Expand Up @@ -128,9 +128,6 @@
"modulePathIgnorePatterns": [
"./node_modules"
],
"transform": {
"^.+\\.js$": "babel-jest"
},
"testRegex": "src/*(/(__tests?__/)([^_].*/)*?[^_][^/]*?\\.(test|spec)?\\.(js?))$",
"setupFiles": [
"./enzymeAdapter.setup.js"
Expand Down
20 changes: 11 additions & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
import { terser } from 'rollup-plugin-terser';
import pkg from './package.json';

const name = 'Select';
Expand All @@ -19,16 +18,19 @@ const globals = {
};
// $FlowFixMe This should be inferred by Flow and manual casting does not work inside of this config.
const external = Object.keys(globals);

const babelOptions = () => {
let result = {
babelrc: false,
presets: [['env', { modules: false }], 'react'],
presets: [
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-flow'
],
plugins: [
'emotion',
'transform-class-properties',
'transform-object-rest-spread',
'external-helpers',
],
'@babel/plugin-proposal-class-properties'
]
DragorWW marked this conversation as resolved.
Show resolved Hide resolved
};
return result;
};
Expand All @@ -38,7 +40,7 @@ export default [
input: 'src/index.js',
output: {
file: pkg.module,
format: 'es',
format: 'esm',
},
external: [...external, 'raf'],
plugins: [babel(babelOptions())],
Expand All @@ -65,6 +67,6 @@ export default [
globals,
},
external,
plugins: [babel(babelOptions()), resolve(), commonjs(), uglify({}, minify)],
plugins: [babel(babelOptions()), resolve(), commonjs(), terser()],
DragorWW marked this conversation as resolved.
Show resolved Hide resolved
},
];
Loading