Skip to content

Commit

Permalink
Tools: Update the minimum Node.js version to 12 (#27934)
Browse files Browse the repository at this point in the history
* Scripts: Update the minimum Node.js version to 12

* Updates webpack-bundle-analyzer dependency

* Increase Node.js version for create-block package

* Increase the minimun Node version to 12 in more packages

* Update Gutenberg version for e2e test utils

* Docs: Regenerate API docs for e2e test utils
  • Loading branch information
gziolo authored Jan 5, 2021
1 parent ec810c1 commit 986f585
Show file tree
Hide file tree
Showing 55 changed files with 318 additions and 250 deletions.
52 changes: 8 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions packages/babel-plugin-import-jsx-pragma/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@

## Unreleased

### Breaking Changes

- Increase the minimum Node.js version to 12 ([#27934](https://github.com/WordPress/gutenberg/pull/27934)).

## 2.2.0 (2019-05-21)

### New Feature

- Add Fragment import handling ([#15120](https://github.com/WordPress/gutenberg/pull/15120)).
- Add Fragment import handling ([#15120](https://github.com/WordPress/gutenberg/pull/15120)).

## 2.0.0 (2019-03-06)

### Breaking Change

- Stop using Babel transpilation internally and set node 8 as a minimal version required ([#13540](https://github.com/WordPress/gutenberg/pull/13540)).
- Stop using Babel transpilation internally and set node 8 as a minimal version required ([#13540](https://github.com/WordPress/gutenberg/pull/13540)).

### Enhancement

- Plugin skips now adding import JSX pragma when the scope variable is defined for all JSX elements ([#13809](https://github.com/WordPress/gutenberg/pull/13809)).
- Plugin skips now adding import JSX pragma when the scope variable is defined for all JSX elements ([#13809](https://github.com/WordPress/gutenberg/pull/13809)).

## 1.1.0 (2018-09-05)

### New Feature

- Plugin updated to work with the stable version of Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)).
- Plugin updated to work with the stable version of Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)).
30 changes: 19 additions & 11 deletions packages/babel-plugin-import-jsx-pragma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Install the module to your project using [npm](https://www.npmjs.com/).
npm install @wordpress/babel-plugin-import-jsx-pragma
```

**Note**: This package requires Node.js 12.0.0 or later. It is not compatible with older versions.

## Usage

Refer to the [Babel Plugins documentation](http://babeljs.io/docs/en/plugins) if you don't yet have experience working with Babel plugins.
Expand All @@ -30,7 +32,7 @@ module.exports = {
};
```

_Note:_ `@wordpress/babel-plugin-import-jsx-pragma` is included in `@wordpress/babel-preset-default` (default preset for WordPress development) starting from `v4.0.0`. If you are using this preset, you shouldn't include this plugin in your Babel config.
_Note:_ `@wordpress/babel-plugin-import-jsx-pragma` is included in `@wordpress/babel-preset-default` (default preset for WordPress development) starting from `v4.0.0`. If you are using this preset, you shouldn't include this plugin in your Babel config.

## Options

Expand All @@ -42,16 +44,22 @@ For example, if you are using the `@wordpress/element` package, you may want to
// .babelrc.js
module.exports = {
plugins: [
[ '@wordpress/babel-plugin-import-jsx-pragma', {
scopeVariable: 'createElement',
scopeVariableFrag: 'Fragment',
source: '@wordpress/element',
isDefault: false,
} ],
[ '@babel/plugin-transform-react-jsx', {
pragma: 'createElement',
pragmaFrag: 'Fragment',
} ],
[
'@wordpress/babel-plugin-import-jsx-pragma',
{
scopeVariable: 'createElement',
scopeVariableFrag: 'Fragment',
source: '@wordpress/element',
isDefault: false,
},
],
[
'@babel/plugin-transform-react-jsx',
{
pragma: 'createElement',
pragmaFrag: 'Fragment',
},
],
],
};
```
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-import-jsx-pragma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/WordPress/gutenberg/issues"
},
"engines": {
"node": ">=8"
"node": ">=12"
},
"files": [
"index.js"
Expand Down
16 changes: 10 additions & 6 deletions packages/babel-plugin-makepot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,35 @@

## Unreleased

### Breaking Changes

- Increase the minimum Node.js version to 12 ([#27934](https://github.com/WordPress/gutenberg/pull/27934)).

## 2.2.0 (2019-03-06)

### Bug Fix

- Fixed Babel plugin for POT file generation to properly handle plural numbers specified in the passed header. ([#13577](https://github.com/WordPress/gutenberg/pull/13577))
- Fix extracted translator comments to be written as prefixed by `#.` ([#9440](https://github.com/WordPress/gutenberg/pull/9440))
- Fixed Babel plugin for POT file generation to properly handle plural numbers specified in the passed header. ([#13577](https://github.com/WordPress/gutenberg/pull/13577))
- Fix extracted translator comments to be written as prefixed by `#.` ([#9440](https://github.com/WordPress/gutenberg/pull/9440))

## 2.1.0 (2018-09-05)

### New Feature

- Plugin updated to work with the stable version of Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)).
- Plugin updated to work with the stable version of Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)).

## 2.0.0 (2018-07-12)

### Breaking Change

- Updated code to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))
- Updated code to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))

### Internal

- Moved `@WordPress/packages` repository to `@WordPress/gutenberg` ([#7805](https://github.com/WordPress/gutenberg/pull/7805))
- Moved `@WordPress/packages` repository to `@WordPress/gutenberg` ([#7805](https://github.com/WordPress/gutenberg/pull/7805))

## 1.0.1 (2018-05-18)

### Polish

- Fix: Standardized `package.json` format ([#119](https://github.com/WordPress/packages/pull/119))
- Fix: Standardized `package.json` format ([#119](https://github.com/WordPress/packages/pull/119))
7 changes: 6 additions & 1 deletion packages/babel-plugin-makepot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ Babel plugin used to scan JavaScript files for use of localization functions. It
```json
{
"plugins": [
[ "@wordpress/babel-plugin-makepot", { "output": "languages/myplugin.pot" } ],
[
"@wordpress/babel-plugin-makepot",
{ "output": "languages/myplugin.pot" }
]
]
}
```
Expand All @@ -18,4 +21,6 @@ Install the module:
npm install @wordpress/babel-plugin-makepot --save-dev
```

**Note**: This package requires Node.js 12.0.0 or later. It is not compatible with older versions.

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
2 changes: 1 addition & 1 deletion packages/babel-plugin-makepot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"url": "https://github.com/WordPress/gutenberg/issues"
},
"engines": {
"node": ">=8"
"node": ">=12"
},
"files": [
"build",
Expand Down
42 changes: 23 additions & 19 deletions packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,99 @@

## Unreleased

### Breaking Changes

- Increase the minimum Node.js version to 12 ([#27934](https://github.com/WordPress/gutenberg/pull/27934)).

## 4.20.0 (2020-12-17)

### 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)).
- 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)
- 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)

### New Features

- The bundled `@babel/core` dependency has been updated from requiring `^7.9.0` to requiring `^7.11.6`. All other Babel plugins were updated to the latest version (see Highlights: [7.11](https://babeljs.io/blog/2020/07/30/7.11.0) and [7.10](https://babeljs.io/blog/2020/05/25/7.10.0)).
- The bundled `@babel/core` dependency has been updated from requiring `^7.9.0` to requiring `^7.11.6`. All other Babel plugins were updated to the latest version (see Highlights: [7.11](https://babeljs.io/blog/2020/07/30/7.11.0) and [7.10](https://babeljs.io/blog/2020/05/25/7.10.0)).

## 4.12.0 (2020-04-15)

### New Features

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

## 4.10.0 (2020-02-04)

### New Feature

- The bundled `@babel/core` dependency has been updated from requiring `^7.4.4` to requiring `^7.8.3`. All other Babel plugins were updated to the latest version. `@babel/preset-env` has now ESMAScript 2020 support enabled by default (see [Highlights](https://babeljs.io/blog/2020/01/11/7.8.0#highlights)).
- The bundled `@babel/core` dependency has been updated from requiring `^7.4.4` to requiring `^7.8.3`. All other Babel plugins were updated to the latest version. `@babel/preset-env` has now ESMAScript 2020 support enabled by default (see [Highlights](https://babeljs.io/blog/2020/01/11/7.8.0#highlights)).

## 4.5.0 (2019-08-29)

### Bug Fixes

- Added missing `@wordpress/element` dependency which is used internally.
- Added missing `@wordpress/element` dependency which is used internally.

## 4.4.0 (2019-08-05)

### Bug Fixes

- Configure Babel to target your current version of Node as described in [Jest docs](https://jestjs.io/docs/en/getting-started#using-babel).
- Added missing [core-js](https://www.npmjs.com/package/core-js) dependency ([#16259](https://github.com/WordPress/gutenberg/pull/16259)).
- Configure Babel to target your current version of Node as described in [Jest docs](https://jestjs.io/docs/en/getting-started#using-babel).
- Added missing [core-js](https://www.npmjs.com/package/core-js) dependency ([#16259](https://github.com/WordPress/gutenberg/pull/16259)).

## 4.2.0 (2019-05-21)

### New Features

- Handle `<></>` JSX Fragments with `@wordpress/element` `Fragment` ([#15120](https://github.com/WordPress/gutenberg/pull/15120)).
- The bundled `@babel/core` dependency has been updated from requiring `^7.2.2` to requiring `^7.4.4`. Babel preset is now using `core-js@3` instead of `core-js@2` (see [Migration Guide](https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2)).
- Handle `<></>` JSX Fragments with `@wordpress/element` `Fragment` ([#15120](https://github.com/WordPress/gutenberg/pull/15120)).
- The bundled `@babel/core` dependency has been updated from requiring `^7.2.2` to requiring `^7.4.4`. Babel preset is now using `core-js@3` instead of `core-js@2` (see [Migration Guide](https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2)).

## 4.0.0 (2019-03-06)

### Breaking Changes

- Removed `babel-core` dependency acting as Babel 7 bridge ([#13922](https://github.com/WordPress/gutenberg/pull/13922). Ensure all references to `babel-core` are replaced with `@babel/core` .
- Preset updated to include `@wordpress/babel-plugin-import-jsx-pragma` plugin integration ([#13540](https://github.com/WordPress/gutenberg/pull/13540)). It should no longer be explicitly included in your Babel config.
- Removed `babel-core` dependency acting as Babel 7 bridge ([#13922](https://github.com/WordPress/gutenberg/pull/13922). Ensure all references to `babel-core` are replaced with `@babel/core` .
- Preset updated to include `@wordpress/babel-plugin-import-jsx-pragma` plugin integration ([#13540](https://github.com/WordPress/gutenberg/pull/13540)). It should no longer be explicitly included in your Babel config.

### Bug Fix

- The runtime transform no longer disables [the `regenerator` option](https://babeljs.io/docs/en/babel-plugin-transform-runtime#regenerator). This should resolve issues where a file generated using the preset would assume the presence of a `regeneratorRuntime` object in the global scope. While this is not considered a breaking change, you may be mindful to consider that with transformed output now explicitly importing the runtime regenerator, bundle sizes may increase if you do not otherwise mitigate the additional import by either (a) overriding the option in your own Babel configuration extensions or (b) redefining the resolved value of `@babel/runtime/regenerator` using a feature like [Webpack's `externals` option](https://webpack.js.org/configuration/externals/).
- The runtime transform no longer disables [the `regenerator` option](https://babeljs.io/docs/en/babel-plugin-transform-runtime#regenerator). This should resolve issues where a file generated using the preset would assume the presence of a `regeneratorRuntime` object in the global scope. While this is not considered a breaking change, you may be mindful to consider that with transformed output now explicitly importing the runtime regenerator, bundle sizes may increase if you do not otherwise mitigate the additional import by either (a) overriding the option in your own Babel configuration extensions or (b) redefining the resolved value of `@babel/runtime/regenerator` using a feature like [Webpack's `externals` option](https://webpack.js.org/configuration/externals/).

## 3.0.0 (2018-09-30)

### Breaking Change

- The configured `@babel/preset-env` preset will no longer pass `useBuiltIns: 'usage'` as an option. It is therefore expected that a polyfill serve in its place, if necessary.
- The configured `@babel/preset-env` preset will no longer pass `useBuiltIns: 'usage'` as an option. It is therefore expected that a polyfill serve in its place, if necessary.

## 2.1.0 (2018-09-05)

### New Feature

- Plugin updated to work with the stable version of Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)).
- Plugin updated to work with the stable version of Babel 7 ([#9171](https://github.com/WordPress/gutenberg/pull/9171)).

## 2.0.0 (2018-07-12)

### Breaking Change

- Updated code to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))
- Updated code to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))

### Internal

- Moved `@WordPress/packages` repository to `@WordPress/gutenberg` ([#7805](https://github.com/WordPress/gutenberg/pull/7805))
- Moved `@WordPress/packages` repository to `@WordPress/gutenberg` ([#7805](https://github.com/WordPress/gutenberg/pull/7805))

## 1.3.0 (2018-05-22)

### New Feature

- Added support for async generator functions ([#126](https://github.com/WordPress/packages/pull/126))
- Added support for async generator functions ([#126](https://github.com/WordPress/packages/pull/126))

## 1.2.1 (2018-05-18)

### Polish

- Fix: Standardized `package.json` format ([#119](https://github.com/WordPress/packages/pull/119))
- Fix: Standardized `package.json` format ([#119](https://github.com/WordPress/packages/pull/119))
8 changes: 5 additions & 3 deletions packages/babel-preset-default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Install the module
npm install @wordpress/babel-preset-default --save-dev
```

**Note**: This package requires Node.js 12.0.0 or later. It is not compatible with older versions.

### Usage

There are a number of methods to configure Babel. See [Babel's Configuration documentation](https://babeljs.io/docs/en/configuration) for more information. To use this preset, simply reference `@wordpress/default` in the `presets` option in your Babel configuration.
Expand All @@ -20,7 +22,7 @@ For example, using `.babelrc`:

```json
{
"presets": [ "@wordpress/default" ]
"presets": [ "@wordpress/default" ]
}
```

Expand All @@ -32,8 +34,8 @@ For example, if you'd like to use a new language feature proposal which has not

```json
{
"presets": [ "@wordpress/babel-preset-default" ],
"plugins": [ "@babel/plugin-proposal-class-properties" ]
"presets": [ "@wordpress/babel-preset-default" ],
"plugins": [ "@babel/plugin-proposal-class-properties" ]
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"url": "https://github.com/WordPress/gutenberg/issues"
},
"engines": {
"node": ">=8"
"node": ">=12"
},
"files": [
"index.js"
Expand Down
Loading

0 comments on commit 986f585

Please # to comment.