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

Babel 7.14 upgrade #30

Merged
merged 1 commit into from
May 6, 2021
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change log

## [Unreleased]
### Changed
* Babel `7.14.x` upgrades.

## 5.2.0 - 2021-02-25
### Changed
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = (context, options = {}) => {
corejs: 2,
helpers: true,
regenerator: true,
version: '7.13.0', // 1
version: '7.14.0', // 1
};

let presets = [
Expand All @@ -53,6 +53,7 @@ module.exports = (context, options = {}) => {
let plugins = [
'@babel/plugin-transform-flow-strip-types', // 2
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we remove them instead ?

Thus, you can remove @babel/plugin-proposal-class-properties and @babel/plugin-proposal-private-methods, since they are now enabled by default in @babel/preset-env.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was my first try obviously, but I want to keep the loose option only for this plugin, not much choice.
Also it warns because the loose option is different for both plugins, hence the private-methods addition...

I would be in favor of not using the loose mode for those anymore (more compiled code), but probably in a major?

['@babel/plugin-transform-runtime', runtimeOpts],
];

Expand Down
Loading