Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Upgrade to babel 7 (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound authored and istarkov committed Aug 28, 2018
1 parent ea0a6e5 commit ff1c72c
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 549 deletions.
9 changes: 3 additions & 6 deletions babel.config.js
@@ -1,11 +1,8 @@
module.exports = {
plugins: [['@babel/proposal-class-properties', { loose: true }]],
presets: [['@babel/env', { loose: true, modules: false }], '@babel/react'],
presets: [['@babel/env', { loose: true }], '@babel/react'],
}

if (process.env.NODE_ENV === 'cjs' || process.env.NODE_ENV === 'test') {
module.exports.plugins.push(
['@babel/transform-runtime'],
'@babel/transform-modules-commonjs'
)
if (process.env.NODE_ENV === 'cjs') {
module.exports.plugins.push('@babel/transform-runtime')
}
23 changes: 11 additions & 12 deletions package.json
Expand Up @@ -36,16 +36,15 @@
]
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.56",
"@babel/core": "^7.0.0-beta.56",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.56",
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.56",
"@babel/plugin-transform-runtime": "^7.0.0-beta.56",
"@babel/preset-env": "^7.0.0-beta.56",
"@babel/preset-react": "^7.0.0-beta.56",
"@babel/runtime": "^7.0.0-beta.56",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/runtime": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^9.0.0-beta.3",
"babel-eslint": "^9.0.0",
"babel-jest": "^22.4.3",
"baconjs": "^0.7.84",
"chalk": "^1.1.1",
Expand Down Expand Up @@ -73,9 +72,9 @@
"react": "^16.3.1",
"react-dom": "^16.3.1",
"readline-sync": "^1.2.21",
"rollup": "^0.62.0",
"rollup-plugin-babel": "^4.0.0-beta.8",
"rollup-plugin-commonjs": "^9.1.3",
"rollup": "^0.65.0",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.1.6",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-size-snapshot": "^0.6.1",
Expand Down
3 changes: 1 addition & 2 deletions scripts/rollup.config.js
Expand Up @@ -17,8 +17,7 @@ const input = `./${path.join(PACKAGES_SRC_DIR, packageName, 'index.js')}`

const outDir = path.join(PACKAGES_OUT_DIR, packageName, 'dist')

const isExternal = id =>
!id.startsWith('\0') && !id.startsWith('.') && !id.startsWith('/')
const isExternal = id => !id.startsWith('.') && !id.startsWith('/')

const getBabelOptions = ({ useESModules }) => ({
exclude: '**/node_modules/**',
Expand Down
2 changes: 1 addition & 1 deletion src/packages/recompose/package.json
Expand Up @@ -12,7 +12,7 @@
"main": "dist/Recompose.cjs.js",
"module": "dist/Recompose.esm.js",
"dependencies": {
"@babel/runtime": "7.0.0-beta.56",
"@babel/runtime": "^7.0.0",
"change-emitter": "^0.1.2",
"fbjs": "^0.8.1",
"hoist-non-react-statics": "^2.3.1",
Expand Down
6 changes: 3 additions & 3 deletions src/packages/recompose/yarn.lock
Expand Up @@ -2,9 +2,9 @@
# yarn lockfile v1


"@babel/runtime@7.0.0-beta.56":
version "7.0.0-beta.56"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.56.tgz#cda612dffd5b1719a7b8e91e3040bd6ae64de8b0"
"@babel/runtime@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c"
dependencies:
regenerator-runtime "^0.12.0"

Expand Down

0 comments on commit ff1c72c

Please sign in to comment.