Skip to content

Commit

Permalink
Upgrade Babel packages to 7.12.x (#27553)
Browse files Browse the repository at this point in the history
* Upgrade Babel packages to 7.12.x

* Update lockfile to install Babel 7.12.x packages

* Update changelogs of affected packages

* Fix ESLint errors (dot-notation, camelcase) in optionally chained places

* Update CHANGELOG.md

Co-authored-by: Greg Ziółkowski <[email protected]>
  • Loading branch information
jsnajdr and gziolo authored Dec 8, 2020
1 parent c66baaf commit 18349c4
Show file tree
Hide file tree
Showing 65 changed files with 779 additions and 4,951 deletions.
5,580 changes: 701 additions & 4,879 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
"devDependencies": {
"@actions/core": "1.2.6",
"@actions/github": "1.0.0",
"@babel/core": "7.11.6",
"@babel/plugin-syntax-jsx": "7.10.4",
"@babel/runtime-corejs3": "7.11.2",
"@babel/traverse": "7.11.5",
"@babel/core": "7.12.9",
"@babel/plugin-syntax-jsx": "7.12.1",
"@babel/runtime-corejs3": "7.12.5",
"@babel/traverse": "7.12.9",
"@jest/types": "25.3.0",
"@octokit/rest": "16.26.0",
"@octokit/webhooks": "7.1.0",
Expand Down Expand Up @@ -143,7 +143,7 @@
"babel-plugin-react-native-platform-specific-extensions": "1.1.1",
"babel-plugin-require-context-hook": "1.0.0",
"benchmark": "2.1.4",
"browserslist": "4.14.0",
"browserslist": "4.15.0",
"chalk": "4.0.0",
"commander": "4.1.0",
"concurrently": "3.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ When creating a new package, you need to provide at least the following:
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react-native": "src/index",
"types": "build-types",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/dom-ready": "file:../dom-ready",
"@wordpress/i18n": "file:../i18n"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/data": "file:../data",
"@wordpress/hooks": "file:../hooks",
"@wordpress/i18n": "file:../i18n",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/i18n": "file:../i18n",
"@wordpress/url": "file:../url"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/autop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-makepot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.19"
},
Expand Down
8 changes: 7 additions & 1 deletion packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## Unreleased

## Breaking Changes
### New Features

- The bundled `@babel/core` dependency has been updated from requiring `^7.11.6` to requiring `^7.12.9`. All other Babel plugins were updated to the latest version (see [Highlights](https://babeljs.io/blog/2020/10/15/7.12.0)).

## 4.14.0 (2020-05-27)

### Breaking Changes

- Revert enabling the `shippedProposals` flag. That flag enables the use of stage-3 proposals, but the goal of this preset is to only support stage-4 features. [#22083](https://github.com/WordPress/gutenberg/pull/22083)

Expand Down
10 changes: 5 additions & 5 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
],
"main": "index.js",
"dependencies": {
"@babel/core": "^7.11.6",
"@babel/plugin-transform-react-jsx": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/runtime": "^7.11.2",
"@babel/core": "^7.12.9",
"@babel/plugin-transform-react-jsx": "^7.12.7",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@babel/runtime": "^7.12.5",
"@wordpress/babel-plugin-import-jsx-pragma": "file:../babel-plugin-import-jsx-pragma",
"@wordpress/browserslist-config": "file:../browserslist-config",
"@wordpress/element": "file:../element",
Expand Down
2 changes: 1 addition & 1 deletion packages/blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"{src,build,build-module}/{index.js,store/index.js,hooks/**}"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/blob": "file:../blob",
"@wordpress/blocks": "file:../blocks",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"src/**/*.scss"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/autop": "file:../autop",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-serialization-default-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"{src,build,build-module}/{index.js,store/index.js}"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
"@wordpress/block-serialization-default-parser": "file:../block-serialization-default-parser",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"src/**/*.scss"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@emotion/core": "^10.0.22",
"@emotion/css": "^10.0.22",
"@emotion/native": "^10.0.22",
Expand Down
2 changes: 1 addition & 1 deletion packages/compose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/dom": "file:../dom",
"@wordpress/element": "file:../element",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"{src,build,build-module}/index.js"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/blocks": "file:../blocks",
"@wordpress/data": "file:../data",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/data": "file:../data",
"@wordpress/deprecated": "file:../deprecated"
Expand Down
2 changes: 1 addition & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/compose": "file:../compose",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/element": "file:../element",
Expand Down
2 changes: 1 addition & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"moment": "^2.22.1",
"moment-timezone": "^0.5.31"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/deprecated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/hooks": "file:../hooks"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/docgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"docgen": "./bin/cli.js"
},
"dependencies": {
"@babel/core": "^7.11.0",
"@babel/core": "^7.12.9",
"doctrine": "^2.1.0",
"lodash": "^4.17.19",
"mdast-util-inject": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/dom-ready/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"lodash": "^4.17.19"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/keycodes": "file:../keycodes",
"@wordpress/url": "file:../url",
"lodash": "^4.17.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/block-library": "file:../block-library",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/block-library": "file:../block-library",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"{src,build,build-module}/{index.js,store/index.js,hooks/**}"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
Expand Down
3 changes: 1 addition & 2 deletions packages/editor/src/components/post-saved-state/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export default function PostSavedState( {
isSaveable: isEditedPostSaveable(),
isScheduled: isCurrentPostScheduled(),
hasPublishAction:
getCurrentPost()?.[ '_links' ]?.[ 'wp:action-publish' ] ??
false,
getCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,
};
},
[ forceIsDirty, forceIsSaving ]
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-trash/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default withSelect( ( select ) => {
const { getPostType, canUser } = select( 'core' );
const postId = getCurrentPostId();
const postType = getPostType( getCurrentPostType() );
const resource = postType?.[ 'rest_base' ] || '';
const resource = postType?.rest_base || ''; // eslint-disable-line camelcase

return {
isNew: isEditedPostNew(),
Expand Down
2 changes: 1 addition & 1 deletion packages/element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@wordpress/escape-html": "file:../escape-html",
Expand Down
2 changes: 1 addition & 1 deletion packages/escape-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/format-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/components": "file:../components",
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-native": "src/index",
"types": "build-types",
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/html-entities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-native": "src/index",
"types": "build-types",
"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"pot-to-php": "./tools/pot-to-php.js"
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.19",
"memize": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react-native": "src/index",
"types": "build-types",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/element": "file:../element",
"@wordpress/primitives": "file:../primitives"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"{src,build,build-module}/{index.js,store/index.js}"
],
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime": "^7.12.5",
"@wordpress/components": "file:../components",
"@wordpress/data": "file:../data",
"@wordpress/deprecated": "file:../deprecated",
Expand Down
Loading

0 comments on commit 18349c4

Please sign in to comment.