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

Upgrade packages, babel 7 #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions packages/babel-preset-cgb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const updateNotifier = require( 'update-notifier' );
const pkg = require( './package.json' );
updateNotifier( { pkg } ).notify();

module.exports = {
module.exports = () => ({
presets: [
[
// 'env',
require.resolve( 'babel-preset-env' ),
require.resolve( '@babel/preset-env' ),
{
// Do not transform modules to CJS.
modules: false,
Expand Down Expand Up @@ -44,7 +44,7 @@ module.exports = {
[
// Transforms JSX Syntax.
// 'transform-react-jsx',
require.resolve( 'babel-plugin-transform-react-jsx' ),
require.resolve( '@babel/plugin-transform-react-jsx' ),
{
pragma: 'wp.element.createElement',
},
Expand All @@ -53,12 +53,12 @@ module.exports = {
[ require.resolve( 'babel-plugin-syntax-async-functions' ) ],
// Polyfills the runtime needed for async/await and generators.
[
require.resolve( 'babel-plugin-transform-runtime' ),
require.resolve( '@babel/plugin-transform-runtime' ),
{
helpers: false,
polyfill: false,
//polyfill: false,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why you commented this?

regenerator: true,
},
],
],
};
});
12 changes: 9 additions & 3 deletions packages/babel-preset-cgb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@
"index.js"
],
"dependencies": {
"@babel/plugin-transform-react-jsx": "^6.24.1",
"@babel/plugin-transform-runtime": "^6.23.0",
"@babel/preset-env": "^1.6.0",
"babel-eslint": "^10.0.1",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"eslint": "^5.9.0",
"eslint-plugin-jest": "^22.1.2",
"execa": "^1.0.0",
"lerna": "^3.5.1",
"ora": "^3.0.0",
"update-notifier": "^2.3.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the addition of these extra packages?

{
"eslint": "^5.9.0",
		"eslint-plugin-jest": "^22.1.2",
		"execa": "^1.0.0",
		"lerna": "^3.5.1",
		"ora": "^3.0.0",
}

}
}
22 changes: 12 additions & 10 deletions packages/cgb-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,37 @@
"cgb-scripts": "./bin/cgb-scripts.js"
},
"dependencies": {
"@babel/core": "^6.25.0",
"autoprefixer": "^7.2.4",
"babel-core": "^6.25.0",
"babel-eslint": "^8.2.1",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.1",
"babel-preset-cgb": "^1.6.0",
"cgb-dev-utils": "^1.5.0",
"chalk": "^2.3.0",
"chalk": "^2.4.1",
"cross-env": "^5.0.1",
"cross-spawn": "^5.1.0",
"eslint": "^4.15.0",
"eslint": "^5.9.0",
"eslint-config-wordpress": "^2.0.0",
"eslint-plugin-jest": "^21.6.1",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-jest": "^22.1.2",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-wordpress": "^0.1.0",
"execa": "^1.0.0",
"extract-text-webpack-plugin": "^3.0.2",
"filesize": "^3.5.11",
"fs-extra": "^5.0.0",
"gzip-size": "^4.1.0",
"inquirer": "^5.0.0",
"lerna": "^3.5.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding lerna here?

"node-sass": "^4.7.2",
"ora": "^1.3.0",
"ora": "^3.0.0",
"postcss-loader": "^2.0.10",
"raw-loader": "^0.5.1",
"resolve-pkg": "^1.0.0",
"sass-loader": "^6.0.6",
"shelljs": "^0.8.0",
"shelljs": "^0.8.3",
"style-loader": "^0.19.1",
"update-notifier": "^2.3.0",
"update-notifier": "^2.5.0",
"webpack": "^3.1.0"
}
}
Loading