Skip to content

Commit

Permalink
feat: Preset now defaults to node >=14 (maintentance EOL) instead of …
Browse files Browse the repository at this point in the history
…node 12 [BREAKING]

Signed-off-by: Johannes Tegnér <[email protected]>
  • Loading branch information
Johannestegner committed Sep 6, 2022
1 parent 127a292 commit 8e7d35e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Includes the following presets and plugins:
@babel/plugin-proposal-pipeline-operator
@babel/plugin-proposal-record-and-tuple
@babel/plugin-proposal-throw-expressions
@babel/plugin-proposal-duplicate-named-capturing-groups-regex
@babel/plugin-transform-object-assign
@babel/plugin-transform-runtime
@babel/runtime-corejs3
Expand All @@ -36,16 +37,15 @@ Other than those, the following options are possible to use:

* `exclude` - Takes an array of plugins that should NOT be used (full plugin name including `@babel`) (defaults to `[]`).
* `mode` - Flags build mode (`web`, `node` or undefined for default).
* `node` will set the targets value to `node >= 12`.
* `node` will set the targets value to `node >= 14`.
* `web` will set the targets value to `defaults`.
* `undefined/default` will set the targets value to `defaults, node >= 12`.
* `recordAndTuple`
* `syntaxType` (defaults to 'hash)
* `polyfill` (defaults to false)
* `polyfillModuleName` (defaults to peerDependency `@bloomberg/record-tuple-polyfill`)
* `decorators`
* `version` (defaults to `2018-09`)
* `beforeExport` (defaults to `true`)
* `version` (defaults to `2022-03`)
* `pipeline`
* `poposal` (defaults to `hack`)
* `topicToken` (defaults to `^^`)
Expand All @@ -57,12 +57,13 @@ can use shorter forms in your exclude array.
The following values are checked with a `indexOf` check:

```
preset-env => @babel/preset-env
decorators => @babel/plugin-proposal-decorators
partial-application => @babel/plugin-proposal-partial-application
throw-expressions => @babel/plugin-proposal-throw-expressions
async-do-expressions => @babel/plugin-proposal-async-do-expressions
function-bind => @babel/plugin-proposal-function-bind
pipeline-operator => @babel/plugin-proposal-pipeline-operator
record-and-tuple => @babel/plugin-proposal-record-and-tuple
preset-env => @babel/preset-env
decorators => @babel/plugin-proposal-decorators
partial-application => @babel/plugin-proposal-partial-application
throw-expressions => @babel/plugin-proposal-throw-expressions
async-do-expressions => @babel/plugin-proposal-async-do-expressions
function-bind => @babel/plugin-proposal-function-bind
pipeline-operator => @babel/plugin-proposal-pipeline-operator
record-and-tuple => @babel/plugin-proposal-record-and-tuple
duplicate-named-capturing-groups-regex => @babel/plugin-proposal-duplicate-named-capturing-groups-regex
```
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const pkg = require('./package.json');

const defaultTargets = {
web: 'defaults',
node: 'node >= 12'
node: 'node >= 14'
};

module.exports = declare((api, options) => {
Expand Down Expand Up @@ -58,7 +58,6 @@ module.exports = declare((api, options) => {
plugins: [
isNotExcluded('decorators', () => [
require('@babel/plugin-proposal-decorators'), {
decoratorsBeforeExport: setOr(opts.decorators.beforeExport, true),
version: setOr(opts.decorators.version, '2022-03'),
}
]),
Expand Down

0 comments on commit 8e7d35e

Please sign in to comment.