Compare commits

...

29 Commits

Author SHA1 Message Date
Nicolò Ribaudo
b9cb4af953 v7.6.2 2019-09-23 23:14:37 +02:00
Gonzalo Rodríguez
69d00dc5b0 [parser] Invalid NonOctal Decimal (#10467)
* Add test

* Add nonOctalDecimal verification

* Update regex and code style

* Refactor non octal detection

* Add numeric separator test

* Disallow numeric separators in non octals

* Update whitelist

* Better test naming

* Disallow numeric separators in non oct for all numbers

* Specific error above the general error

* Add test for invalid leading zero in num separator

* Add start position to error
2019-09-23 23:07:52 +02:00
Ivan Medina
f339d2d034 [parser] Disallow numeric separator in unicode scape sequences (#10468)
* [parser] Disallow numeric separator in unicode scape sequences (#10460)

* raise error only when numeric separator plugin is set

* Adds argument for checking numeric separator

* Fix condition for readability

* Add test for hex escape sequence and rephrase error message

* Remove exposure for allowNumSeparator in readHexChar method
2019-09-23 22:47:18 +02:00
Nicolò Ribaudo
3069747a81 Leave trailing comments after handling a possible trailing com… (#10445)
* Leave trailing comments aftre handling a possible trailing comma

* perf
2019-09-23 19:14:43 +02:00
Tomer Aberbach
962015f7e7 docs: updates docs of findParent and find (#10479) [skip ci]
Makes the documentation of `findParent` and `find` consistent and documents their `null` cases.
2019-09-22 23:00:13 +02:00
Vivek Nayyar
b7333ea97a added check to disallow super.private variable access and test case added (#10472)
* 🚀 added check to disallow super.private variable access and test case added

* ♻️ change the other linting change back to how it was

* ♻️ change the other linting change back to how it was

* ♻️ added newline at the end test output.json file

* ♻️ changed the linting style to the way it was

* ♻️ updated error message, removed super private member access test cases from whitelist of flow and test 262 suite

* ♻️ added newline in output.json
2019-09-21 00:22:37 +02:00
Nicolò Ribaudo
46c70ad734 Update PULL_REQUEST_TEMPLATE.md (#10473) [skip ci] 2019-09-20 11:27:49 -04:00
Nicolò Ribaudo
3a7b6e1c22 Force update of test262-stream
v1.2.0 doesn't support Test262 v4
2019-09-20 12:54:28 +02:00
Guy Waldman
9c1ad0a9f7 [parser] Disallow static fields named constructor (#10461)
* Disallow static fields named `constructor` in a class

    - Disallowed static fields named `constructor` in a class (previously only non-static were disallowed)
    - Updated the text for the error for one consolidated warning, for both static and non-static fields
    - Added a test
    - Updated an existing test in the `flow` test suite of the parser to reflect the parse error.
  Strangely, the test used to pass and started failing when inlining the `isNonstaticConstructor` method, without any changes.
  In that test, `constructor` was a field, so in theory it should never have passed.
  Would appreciate some feedback on this, as I'm not 100% sure if this is somehow related to Flow

* Update test262 whitelist

* Add comment and fix && operator
2019-09-18 01:19:45 +02:00
Huáng Jùnliàng
87dc201411 refactor: replace regexp-tree by regexpu (#10430) 2019-09-17 17:38:15 -05:00
Nicolò Ribaudo
0ef4972295 Ignore regexp tests from test262 (#10458) 2019-09-18 00:14:27 +02:00
Nicolò Ribaudo
cb881e6b3f [parser] Report escapes in kws only if they won't be used as i… (#10455)
We can do it by tokenizing escaped keywords as normal identifiers, so that they won't
be accidentally used as real keywords.
2019-09-18 00:13:51 +02:00
Nicolò Ribaudo
45a484f0a2 Enable optional chaining in test262 (#10457) 2019-09-17 12:10:57 -05:00
Nicolò Ribaudo
99f4f6c3b0 Update Test262 (#10448) 2019-09-17 02:14:14 +02:00
Nicolò Ribaudo
e4b4831100 Update GitHub actions to v2 (#10441)
* Update GitHub actions to v2 [skip ci]

* Only run when needed for issues [skip ci]
2019-09-16 22:38:12 +02:00
Huáng Jùnliàng
256fa5aa04 chore: bump regexpu-core to version 4.6.0 (#10439)
* chore: update test fixtures

* chore: test against regexpu-core 4.6.0

* chore: bump regexpu-core dependency
2019-09-13 17:51:24 +02:00
Huáng Jùnliàng
0ee2c42b55 chore: add lint-ts rule (#10427) 2019-09-11 20:24:08 +02:00
Huáng Jùnliàng
1b352ca8a1 chore: remove tryResolve dependency (#10428) 2019-09-11 12:25:18 +02:00
Huáng Jùnliàng
53af9e8b7a fix: allow the process to exit naturally (#10400) 2019-09-11 12:24:44 +02:00
Huáng Jùnliàng
af04f40ee0 fix: pass optionLoc when validating plugin object (#10402) 2019-09-11 12:23:20 +02:00
Bryan Wain
98b14843ba Remove babel polyfill dependency of babel-node (#10429) 2019-09-11 01:57:44 +02:00
Huáng Jùnliàng
4395c22f3a Miscellaneous perf tweak (#10421)
* refactor: early return on hot path

* refactor: read next2 only when next is dot

* perf: mini refactor
2019-09-10 19:47:52 +02:00
Nicolò Ribaudo
610d6bdc62 Do not guess relative execution status for exported fns (#10417) 2019-09-10 19:47:27 +02:00
Tan Li Hau
8027dca501 fix object rest in array pattern (#10275)
* fix object rest in array pattern

* update test fixtures

* early return

* use path.stop() at the right path
2019-09-10 15:18:45 +02:00
Huáng Jùnliàng
81831032c3 chore: remove trim-right dependency (#10420) 2019-09-10 15:17:22 +02:00
FND
daf25af47c Fix typo in changelog (#10409) [skip ci]
s/compliancy/compliancy/g - seems both correct and consistent with more
recent occurrences
2019-09-09 09:22:33 +02:00
Nicolò Ribaudo
6a5cee8f27 Remove circular dependency (#10405)
* Remove circular dependency

* Move @babel/runtime test to @babel/runtime
2019-09-08 22:53:42 +02:00
Nicolò Ribaudo
2096d0cfcb Update @babel deps (#10407)
* Update @babel deps

* Add core-js to transform-named-capturing-groups-regex devDeps

* Don't use fixed deps (they were added by yarn)

* Lockfile
2019-09-08 22:53:20 +02:00
Babel Bot
a79fbe62e4 Add v7.6.1 to CHANGELOG.md [skip ci] 2019-09-06 20:55:50 +00:00
110 changed files with 1699 additions and 1303 deletions

View File

@@ -122,7 +122,7 @@
* Restructure transformers so they're only ran if the AST contains nodes that they need to worry about. Improves transpilation speed significantly.
* **Bug Fix**
* Fix source maps not tracking end of node locations.
* **Spec Compliancy**
* **Spec Compliance**
* Use static super references as the home object is actually done at definition time.
* **Polish**
* Force the `es6.destructuring` transformer to be whitelisted when the `es7.objectSpread` transformer is.
@@ -479,7 +479,7 @@
## 2.12.3
* **Spec Compliancy**
* **Spec Compliance**
* Optional `typeof` transformer checks for `undefined` before passing it to the helper.
* Class methods are now named.
@@ -551,7 +551,7 @@
* Add `classesFastSuper` optional transformer that doesn't support parent getters and prototype changing.
* Add `forOfFast` transformer that speeds up `for...of` on arrays but produces more code.
* Add `--react-compat` to `bin/6to5`.
* **Spec Compliancy**
* **Spec Compliance**
* Disallow setters without a single parameter.
* Add `configurable` and `writable` to defined properties.
* Use define instead of assignment for class methods.
@@ -619,7 +619,7 @@
## 2.7.0
* **Spec Compliancy**
* **Spec Compliance**
* Disallow reassignments of imports.
* **New Feature**
* `reactCompat` option to enable pre-v0.12 react components.
@@ -662,7 +662,7 @@
* **Polish**
* Move `"use strict";` to inside module bodies instead of at the top of the file.
* Better handling of dynamic imports.
* **Spec Compliancy**
* **Spec Compliance**
* Class inheritance now has a `function` or `null` type check.
* Add `interopRequireWildcard` around wildcard imports and exports to handle non-object exports.

View File

@@ -110,7 +110,7 @@
* Throw an error on different `babel` and `babel-runtime` versions.
* Replicate module environment for `babel-node` eval.
* Clean up classes output.
* **Spec Compliancy**
* **Spec Compliance**
* Make it illegal to use a rest parameter on a setter.
## 4.6.6
@@ -150,8 +150,8 @@
* **New Feature**
* Desugar sticky regexes to a new constructor expression so it can be handled by a polyfill.
* **Spec Compliancy**
* `for...of` now outputs in a lengthy `try...catch` this is to ensure spec compliancy in regards to iterator returns and abrupt completions. See [google/traceur-compiler#1773](https://github.com/google/traceur-compiler/issues/1773) and [babel/babel/#838](https://github.com/babel/babel/issues/838) for more information.
* **Spec Compliance**
* `for...of` now outputs in a lengthy `try...catch` this is to ensure spec compliance in regards to iterator returns and abrupt completions. See [google/traceur-compiler#1773](https://github.com/google/traceur-compiler/issues/1773) and [babel/babel/#838](https://github.com/babel/babel/issues/838) for more information.
* **Polish**
* Rest parameters that are only referred to via number properties on member expressions are desugared into a direct `arguments` reference. Thanks [@neVERberleRfellerER](https://github.com/neVERberleRfellerER)!
* `$ babel` no longer exits on syntax errors.

View File

@@ -12,7 +12,7 @@
## 5.8.24
* **Spec Compliancy**
* **Spec Compliance**
* Updated `optimisation.react.inlineElements` transformer to React 0.14 output. Thanks [@spicyj](https://github.com/spicyj)!
* **Polish**
* Add support for evaluating more static nodes. Thanks [@hzoo](https://github.com/hzoo)!
@@ -451,7 +451,7 @@ Issues with publish process.
![gifs lol](https://31.media.tumblr.com/568205a0e37ae15eca510fa639589a59/tumblr_n8kw8kpcSb1sg6cg8o1_500.gif)
* **Spec Compliancy**
* **Spec Compliance**
* Allow trailing param commas for methods when using the `es7.trailingCommas` transformer.
* **Bug Fix**
* Fix `es6.blockScoping` transformer not properly ignoring `break` in `SwitchCase`.
@@ -481,7 +481,7 @@ Issues with publish process.
* Fix correct function scope being passed to `nameMethod.property` when inferring the function name for class methods.
* Fix incorrect extensions reference causing weird issues when using the Babel CLI.
* Fix destructuring param reference replacements not inheriting from their original param.
* **Spec Compliancy**
* **Spec Compliance**
* Fix order that method decorators are ran in.
## 5.2.15
@@ -616,7 +616,7 @@ Issues with publish process.
* Fix `externalHelpers` option being incorrectly listed as type `string`.
* **Internal**
* Upgrade `core-js` to `0.9.0`.
* **Spec Compliancy**
* **Spec Compliance**
* Fix object decorators not using the `initializer` pattern.
* Remove property initializer descriptor reflection.

View File

@@ -22,7 +22,7 @@
> Backports for some folks (also other's when we accidentally merged PRs from both 6.x/master)
> Lesson learned: just use `master` and backport on another branch.
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-core`, `babel-generator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-traverse`, `babel-types`
* [#6081](https://github.com/babel/babel/pull/6081) Flow opaque type 6.x backport. ([@jbrown215](https://github.com/jbrown215))
@@ -1468,7 +1468,7 @@ It's a one-time use tool (helpful after the initial release when upgrading from
## v6.17.0 (2016-10-01)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-preset-stage-2`, `babel-preset-stage-3`
* [#4617](https://github.com/babel/babel/pull/4617) Move async-generators to stage-3. ([@hzoo](https://github.com/hzoo))
@@ -1476,7 +1476,7 @@ It's a one-time use tool (helpful after the initial release when upgrading from
Specification repo: https://github.com/tc39/proposal-async-iteration
Asynchronous Iteration was already added in [6.16.0](http://babeljs.io/blog/2016/09/28/6.16.0#spec-compliancy) under stage-2 but it was moved to stage-3 at the [latest TC-39 meeting](https://github.com/tc39/agendas/blob/master/2016/09.md#agenda-for-the-54th-meeting-of-ecma-tc39).
Asynchronous Iteration was already added in [6.16.0](http://babeljs.io/blog/2016/09/28/6.16.0#spec-compliance) under stage-2 but it was moved to stage-3 at the [latest TC-39 meeting](https://github.com/tc39/agendas/blob/master/2016/09.md#agenda-for-the-54th-meeting-of-ecma-tc39).
```js
// async generator syntax
@@ -1569,7 +1569,7 @@ First PR!
Babel 6.16: Happy 2nd Birthday 🎂!
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-core`, `babel-generator`, `babel-helper-remap-async-to-generator`, `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-types`, `babel-preset-stage-2`, ...
* [#3473](https://github.com/babel/babel/pull/3473) via [#4576](https://github.com/babel/babel/pull/4576) Implement support for async generator functions and for-await statements. ([@zenparsing](https://github.com/zenparsing))
@@ -2036,7 +2036,7 @@ It's also a lot folk's first PR (or first code PR)!
* `babel-generator`, `babel-types`
* [#3570](https://github.com/babel/babel/pull/3570) Add support for the new declare module.exports of flow. ([@danez](https://github.com/danez))
#### Spec Compliancy
#### Spec Compliance
* `babel-plugin-transform-es2015-modules-amd`, `babel-plugin-transform-es2015-modules-commonjs`, `babel-plugin-transform-es2015-modules-umd`
* [#3518](https://github.com/babel/babel/pull/3518) Throw error for multiple exports default. ([@kaicataldo](https://github.com/kaicataldo))
@@ -2332,7 +2332,7 @@ Length: The number of characters in the output code
* `babel-plugin-transform-react-jsx-self`, `babel-preset-react`
* [#3540](https://github.com/babel/babel/pull/3540) Added jsx-self babel transform plugin. ([@jimfb](https://github.com/jimfb))
#### Spec Compliancy
#### Spec Compliance
* `babel-plugin-transform-es2015-unicode-regex`
* [#3338](https://github.com/babel/babel/pull/3338) Update to `regexpu-core@2.0.0` for ES2016 compliance. ([@mathiasbynens](https://github.com/mathiasbynens))
@@ -3206,7 +3206,7 @@ Changes to note:
- Reverting the class properties semicolon parser error.
- Fix regression with plugin ordering with `babel-register`.
#### Spec Compliancy
#### Spec Compliance
* `babel-plugin-transform-class-properties`, `babylon`
* [#3332](https://github.com/babel/babel/pull/3332) Revert to standard ASI behavior for class properties. ([@loganfsmyth](https://github.com/loganfsmyth))
@@ -3628,7 +3628,7 @@ Thanks to @samwgoldman for all the new flow support!
* `babel-plugin-transform-es2015-parameters`: [#3191](https://github.com/babel/babel/pull/3191) Fix the order of arguments initialization (fixes [T6809](http://phabricator.babeljs.io/T6809))
* `babel-traverse`: [#3198](https://github.com/babel/babel/pull/3198) In `evaluate()`, it should not mistake lack of confidence for falsy
* **Spec Compliancy**
* **Spec Compliance**
* `babylon`, `babel-generator`, `babel-plugin-transform-regenerator`: [#3190](https://github.com/babel/babel/pull/3190): Remove `await *` from `babylon` and raise an error for that syntax since it was removed from the proposal and was causing an issue at runtime but not at compile time (fixes [T6688](http://phabricator.babeljs.io/T6688)).
* **Internal**
@@ -3863,7 +3863,7 @@ Thanks to @samwgoldman for all the new flow support!
* Move `children` prop pushing to after props to ensure correct order in the react inline elements plugin.
* Fix `buildExternalHelpers` script ignoring non-underscored helpers.
* Fix exported classes with static class properties.
* **Spec Compliancy**
* **Spec Compliance**
* Add support for computed mutators in `babel-plugin-transform-es2015-computed-properties`.
* **Polish**
* Make interop for plugins with the `__esModule` work for all plugins no matter how they're imported/specified.
@@ -3904,7 +3904,7 @@ Thanks to @samwgoldman for all the new flow support!
* **Polish**
* Add npm 3 check to `babel-doctor`.
* Autoclear the `babel/register` cache when it gets too big to be serialised.
* **Spec Compliancy**
* **Spec Compliance**
* Add support for flow existential type parameters.
## 6.1.1
@@ -3969,7 +3969,7 @@ Thanks to @samwgoldman for all the new flow support!
## 6.0.14
* **Spec Compliancy**
* **Spec Compliance**
* Update exponentiation operator precedence.
* Fix parser bug where arrow functions have a higher precedence than they should.
* **Bug Fix**

View File

@@ -11,7 +11,7 @@ If you are making a change that should have a docs update: submit another PR to
| Q                       | A <!--(Can use an emoji 👍) -->
| ------------------------ | ---
| Fixed Issues? | `Fixes #1, Fixes #2` <!-- remove the (`) quotes to link the issues -->
| Fixed Issues? | `Fixes #1, Fixes #2` <!-- remove the (`) quotes and write "Fixes" before the number to link the issues -->
| Patch: Bug Fix? |
| Major: Breaking Change? |
| Minor: New Feature? |

76
.github/main.workflow vendored
View File

@@ -1,76 +0,0 @@
workflow "Release" {
on = "push"
resolves = ["Trigger GitHub release"]
}
action "Is version tag" {
uses = "actions/bin/filter@0dbb077f64d0ec1068a644d25c71b1db66148a24"
args = "tag v*"
}
action "Is tag from master" {
uses = "babel/actions/commit-matches-branch@master"
needs = [
"Is version tag",
]
args = "master"
}
action "Trigger GitHub release" {
uses = "babel/actions/trigger-github-release@master"
secrets = ["GITHUB_TOKEN"]
env = {
COMMIT_AUTHOR_NAME = "Babel Bot"
COMMIT_AUTHOR_EMAIL = "babel-bot@users.noreply.github.com"
}
needs = [
"Is version tag",
"Is tag from master",
]
}
workflow "Welcome" {
resolves = [
"Create Welcome Comment"
]
on = "issues"
}
action "Is action 'opened'" {
uses = "actions/bin/filter@master"
args = "action opened"
}
action "Create Welcome Comment" {
uses = "babel/actions/create-welcome-comment@master"
secrets = ["GITHUB_TOKEN", "BOT_TOKEN"]
needs = ["Is action 'opened'"]
}
workflow "Needs Info" {
resolves = [
"Create Needs Info Comment"
]
on = "issues"
}
action "Is action 'labeled'" {
uses = "actions/bin/filter@master"
args = "action labeled"
}
action "Has label 'Needs Info'" {
uses = "actions/bin/filter@master"
needs = [
"Is action 'labeled'"
]
args = "label 'Needs Info'"
}
action "Create Needs Info Comment" {
uses = "babel/actions/create-needs-info-comment@master"
needs = [
"Has label 'Needs Info'",
]
secrets = ["BOT_TOKEN", "GITHUB_TOKEN"]
}

81
.github/workflows/issue-triage.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
name: Issue Triage
on:
issues:
types: [opened, labeled]
jobs:
welcome:
name: Welcome comment
runs-on: ubuntu-latest
steps:
- name: Check if Babel member
id: is_babel_member
if: github.event.action == 'opened'
uses: babel/actions/is-org-member@v2
with:
org: babel
username: ${{ github.event.issue.user.login }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Welcome Comment
uses: babel/actions/create-comment@v2
if: |
github.event.action == 'opened' &&
steps.is_babel_member.outputs.result == 0
with:
token: ${{ secrets.BOT_TOKEN }}
issue: ${{ github.event.issue.number }}
comment: >
Hey @${{ github.event.issue.user.login }}!
We really appreciate you taking the time to report an issue. The
collaborators on this project attempt to help as many people as
possible, but we're a limited number of volunteers, so it's
possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a
vibrant [Slack community](https://babeljs.slack.com) that typically always has someone
willing to help. You can sign-up [here](https://slack.babeljs.io/) for an invite."
needs_info:
name: Needs Info
runs-on: ubuntu-latest
steps:
- name: Create Needs Info Comment
uses: babel/actions/create-comment@v2
if: |
github.event.action == 'labeled' &&
github.event.label.name == 'Needs Info'
with:
token: ${{ secrets.BOT_TOKEN }}
issue: ${{ github.event.issue.number }}
comment: >
Hi @${{ github.event.issue.user.login }}!
This issue is missing some important information we'll need
to be able to reproduce this issue.
Please understand that we receive a high volume of issues,
and there are only a limited number of volunteers that help
maintain this project. The easier it is for us to decipher an
issue with the info provided, the more likely it is that we'll
be able to help.
Please make sure you have the following information documented in
this ticket:
1. Your Babel configuration (typically from `.babelrc` or `babel.config.js`)
2. The current (incorrect) behavior you're seeing
3. The behavior you expect
4. A [short, self-contained example](http://sscce.org/)
Please provide either a link to the problem via the
[`repl`](https://babeljs.io/repl/), or if the `repl` is
insufficient, a new and minimal repository with instructions on
how to build/replicate the issue.

53
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Release
on:
push:
tags: ["v*"]
jobs:
github_release:
name: Trigger GitHub release
runs-on: ubuntu-latest
steps:
- name: Checkout the new tag
uses: actions/checkout@v1.0.0
- name: Get tag info
id: tags
uses: babel/actions/get-release-tags@v2
- name: Generate the changelog
id: changelog
uses: babel/actions/generate-lerna-changelog@v2
with:
from: ${{ steps.tags.outputs.old }}
to: ${{ steps.tags.outputs.new }}
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
- name: Create a draft GitHub release
uses: babel/actions/publish-github-release@v2
with:
tag: ${{ steps.tags.outputs.new }}
changelog: ${{ steps.changelog.outputs.changelog }}
token: ${{ secrets.BOT_TOKEN }}
- name: Check if releasing from master
id: is_master
uses: babel/actions/ref-matches-branch@v2
with:
name: master
- name: Update CHANGELOG.md
if: steps.is_master.outputs.result == 1
uses: babel/actions/update-changelog@v2
with:
changelog: ${{ steps.changelog.outputs.changelog }}
- name: Commit CHANGELOG.md
if: steps.is_master.outputs.result == 1
run: |
git add CHANGELOG.md
git -c user.name="Babel Bot" -c user.email="babel-bot@users.noreply.github.com" \
commit -m "Add ${{ steps.tags.outputs.new }} to CHANGELOG.md [skip ci]" --no-verify --quiet
git push "https://babel-bot:${{ secrets.BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" master

View File

@@ -2,7 +2,7 @@
> **Tags:**
> - :boom: [Breaking Change]
> - :eyeglasses: [Spec Compliancy]
> - :eyeglasses: [Spec Compliance]
> - :rocket: [New Feature]
> - :bug: [Bug Fix]
> - :memo: [Documentation]
@@ -18,6 +18,14 @@ See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0
<!-- DO NOT CHANGE THESE COMMENTS - See .github/actions/trigger-github-release/update-changelog.js -->
<!-- insert-new-changelog-here -->
## v7.6.1 (2019-09-06)
#### :bug: Bug Fix
* `babel-types`
* [#10404](https://github.com/babel/babel/pull/10404) fix(types): correct typescript function headers ([@forstermatth](https://github.com/forstermatth))
* `babel-node`
* [#9758](https://github.com/babel/babel/pull/9758) Remove process.exit(1) from babel-node ([@dword-design](https://github.com/dword-design))
## v7.6.0 (2019-09-06)
#### :eyeglasses: Spec Compliance
@@ -476,7 +484,7 @@ See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0
## v7.3.3 (2019-02-15)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-generator`
* [#9501](https://github.com/babel/babel/pull/9501) Correctly output escapes in directives ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
@@ -498,11 +506,11 @@ See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0
* [#9491](https://github.com/babel/babel/pull/9491) Better error output in parser tests ([@danez](https://github.com/danez))
## v7.3.2 (2019-02-04)
Various spec compliancy fixes and better support for smart pipelines and private methods.
Various spec compliance fixes and better support for smart pipelines and private methods.
Thanks @gverni, @naffiq, @spondbob and @dstaley for their first PRs!
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-parser`
* [#9403](https://github.com/babel/babel/pull/9403) Fix line continuation with Unicode line terminators. ([@danez](https://github.com/danez))
* [#9400](https://github.com/babel/babel/pull/9400) Make yield a contextual keyword. ([@danez](https://github.com/danez))
@@ -550,7 +558,7 @@ This release fixes some regressions introduced in v7.3.0
Thanks to @jamesgeorge007 and @armano2 for their first PR!
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-parser`
* [#9314](https://github.com/babel/babel/pull/9314) Disallow async functions as loop body. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* [#9315](https://github.com/babel/babel/pull/9315) Parse class heritage as strict mode code. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
@@ -771,7 +779,7 @@ You can read more about this release at https://babeljs.io/blog/2018/12/03/7.2.0
## v7.1.5 (2018-11-06)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-parser`, `babylon`
* [#7727](https://github.com/babel/babel/pull/7727) Fix await in function name and parameters. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
@@ -1234,7 +1242,7 @@ Fixed a peerDep issue
Mostly bug fixes and some decorator updates
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-plugin-proposal-unicode-property-regex`
* [#8127](https://github.com/babel/babel/pull/8127) Update plugin-proposal-unicode-property-regex for Unicode v11. ([@mathiasbynens](https://github.com/mathiasbynens))
* `babel-parser`
@@ -1334,7 +1342,7 @@ Mostly bugfix release for a regression in decorators, and a quick fix for some n
- Fix IE10 class regression
- Various fixes, many TS fixes
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-parser`, `babel-plugin-proposal-json-strings`, `babel-plugin-syntax-json-strings`, `babel-preset-stage-3`
* [#7985](https://github.com/babel/babel/pull/7985) Subsume json. ([@jridgewell](https://github.com/jridgewell))
@@ -1524,7 +1532,7 @@ Mostly bugfix release for a regression in decorators, and a quick fix for some n
* `babel-generator`, `babel-helper-define-map`, `babel-plugin-syntax-class-properties`, `babel-plugin-transform-parameters`, `babel-plugin-transform-react-constant-elements`, `babel-traverse`, `babel-types`
* [#7666](https://github.com/babel/babel/pull/7666) Private Properties phase 1. ([@jridgewell](https://github.com/jridgewell))
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-helper-simple-access`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`
* [#7766](https://github.com/babel/babel/pull/7766) Correct update expression Number coercion. ([@jridgewell](https://github.com/jridgewell))
* `babel-core`, `babel-generator`, `babel-plugin-proposal-decorators`, `babel-types`, `babylon`
@@ -1612,7 +1620,7 @@ Mostly bugfix release for a regression in decorators, and a quick fix for some n
Various fixes, also lazy-load `@babel/core` dependencies (should make config lookup and other API methods fast for other projects to use).
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-plugin-proposal-logical-assignment-operators`
* [#7604](https://github.com/babel/babel/pull/7604) Logical Assignment: ensure computed key isn't recomputed. ([@jridgewell](https://github.com/jridgewell))
@@ -1711,7 +1719,7 @@ We'll need to update tooling for this ^. Also published `gulp-babel@8.0.0-beta.2
* `babel-register`
* [#7416](https://github.com/babel/babel/pull/7416) Replace instead of merging babel-register options, and resolve cwd up front. ([@loganfsmyth](https://github.com/loganfsmyth))
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babylon`
* [#7503](https://github.com/babel/babel/pull/7503) Update test262 test script and a few keyword escape fixes. ([@existentialism](https://github.com/existentialism))
* [#7498](https://github.com/babel/babel/pull/7498) Disallow setters to have RestElement. ([@danez](https://github.com/danez))
@@ -1859,7 +1867,7 @@ We'll need to update tooling for this ^. Also published `gulp-babel@8.0.0-beta.2
## v7.0.0-beta.39 (2018-01-30)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-plugin-proposal-optional-chaining`
* [#6345](https://github.com/babel/babel/pull/6345) Remove old optional chain features. ([@jridgewell](https://github.com/jridgewell))
@@ -2072,7 +2080,7 @@ Fixes + [overrides](https://github.com/babel/babel/pull/7091) config feature
Various bug fixes, first version of Babel to use the MIT version of `regenerator`
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babylon`
* [#6986](https://github.com/babel/babel/pull/6986) Fix destructuring assignment spec violation. ([@ksashikumar](https://github.com/ksashikumar))
* `babel-helper-replace-supers`, `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`
@@ -2125,7 +2133,7 @@ Various bug fixes, first version of Babel to use the MIT version of `regenerator
* `babel-preset-stage-1`, `babel-preset-stage-2`
* [#6949](https://github.com/babel/babel/pull/6949) Fix stage refs to exportNamespaceFrom and exportDefaultFrom. ([@existentialism](https://github.com/existentialism))
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-preset-stage-0`, `babel-preset-stage-1`
* [#6943](https://github.com/babel/babel/pull/6943) Moving Do expression to stage 1. ([@rajzshkr](https://github.com/rajzshkr))
@@ -2139,7 +2147,7 @@ Various bug fixes, first version of Babel to use the MIT version of `regenerator
## v7.0.0-beta.33 (2017-12-01)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-generator`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-export-default`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-export-namespace`, `babel-plugin-syntax-export-default-from`, `babel-plugin-syntax-export-extensions`, `babel-plugin-syntax-export-namespace-from`, `babel-standalone`, `babylon`
* [#6920](https://github.com/babel/babel/pull/6920) Split exportExtensions into exportDefault and exportNamespace plugins…. ([@existentialism](https://github.com/existentialism))
* `babylon`
@@ -2324,7 +2332,7 @@ Various bug fixes, first version of Babel to use the MIT version of `regenerator
> Note: don't use ^ in your dependencies when using a beta. It can still break between (we should try not to do it but it can), so pin all the packages like `"@babel/cli" : "7.0.0-beta.4"`
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-plugin-transform-optional-chaining`
* [#6525](https://github.com/babel/babel/pull/6525) Optional Chaining: Account for document.all. ([@azz](https://github.com/azz))
* `babel-preset-env`, `babel-helper-remap-async-to-generator`, `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-function-sent`
@@ -2604,7 +2612,7 @@ let {...{}} = {}; let {...[]} = {};
- Add `--config-file` CLI flag to explicitly pass a config location
- Move `babel-standalone` into the repo (another form of this used to be `babel-browser`)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-plugin-transform-async-to-generator`, `babel-*`
* [#6094](https://github.com/babel/babel/pull/6094) Spec compatibility for iteratorClose condition.. ([@yavorsky](https://github.com/yavorsky))
* `babel-helpers`, `babel-plugin-transform-es2015-computed-properties`
@@ -2740,7 +2748,7 @@ Initial release of typescript equivalent of how Babel handles flow with a new `b
## v7.0.0-alpha.18 (2017-08-03)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-generator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-types`
* [#5990](https://github.com/babel/babel/pull/5990) Flow opaque type aliases. ([@jbrown215](https://github.com/jbrown215))
* `babel-preset-stage-3`
@@ -2789,9 +2797,9 @@ Initial release of typescript equivalent of how Babel handles flow with a new `b
- Optional catch binding `try {} catch {}`: `babel-plugin-transform-optional-catch-binding`
- es2015-parameters `loose` mode that doesn't use `arguments`
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-plugin-check-es2015-constants`
* [#5930](https://github.com/babel/babel/pull/5930) Spec compliancy of check-es2015-constants plugin. ([@maurobringolf](https://github.com/maurobringolf))
* [#5930](https://github.com/babel/babel/pull/5930) Spec compliance of check-es2015-constants plugin. ([@maurobringolf](https://github.com/maurobringolf))
> Instead of throwing a compile time error when const is violated, Babel should insert a throw statement before the violation.
@@ -3096,7 +3104,7 @@ var A = function A() {
## v7.0.0-alpha.12 (2017-05-31)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-core`, `babel-generator`, `babel-plugin-syntax-numeric-separator`, `babel-plugin-transform-numeric-separator`, `babel-preset-stage-1`, `babel-template`, `babel-traverse`, `babel-types`
* [#5793](https://github.com/babel/babel/pull/5793) Support for NumericLiteralSeparator, Stage 1 feature. ([@rwaldron](https://github.com/rwaldron))
@@ -3137,7 +3145,7 @@ var A = function A() {
Update Babylon: https://github.com/babel/babylon/releases/tag/v7.0.0-beta.9, https://github.com/babel/babylon/releases/tag/v7.0.0-beta.10
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-generator`, `babel-plugin-transform-flow-strip-types`, `babel-types`
* [#5525](https://github.com/babel/babel/pull/5525) Add support for object type spread. ([@conartist6](https://github.com/conartist6))
@@ -3211,7 +3219,7 @@ Update Babylon: https://github.com/babel/babylon/releases/tag/v7.0.0-beta.9, htt
## v7.0.0-alpha.8 (2017-04-17)
#### :eyeglasses: Spec Compliancy
#### :eyeglasses: Spec Compliance
* `babel-preset-stage-2`, `babel-preset-stage-3`
* [#5610](https://github.com/babel/babel/pull/5610) Move syntax-dynamic-import to stage-3. ([@dkaoster](https://github.com/dkaoster))

View File

@@ -1,6 +1,6 @@
MAKEFLAGS = -j1
FLOW_COMMIT = 09669846b7a7ca5a6c23c12d56bb3bebdafd67e9
TEST262_COMMIT = de567d3aa5de4eaa11e00131d26b9fe77997dfb0
TEST262_COMMIT = ef7fd2bc27e7c10b4a71d2edc632a2934742a13e
# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
export FORCE_COLOR = true
@@ -54,9 +54,14 @@ watch: clean clean-lib
flow:
./node_modules/.bin/flow check --strip-root
lint:
lint: lint-js lint-ts
lint-js:
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' --format=codeframe
lint-ts:
./scripts/tests/typescript/lint.sh
fix: fix-json
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' --format=codeframe --fix

View File

@@ -1,5 +1,5 @@
{
"version": "7.6.1",
"version": "7.6.2",
"changelog": {
"repo": "babel/babel",
"cacheDir": ".changelog",

View File

@@ -9,18 +9,18 @@
"test": "make test"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/eslint-plugin-development": "^1.0.1",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-export-namespace-from": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-export-namespace-from": "^7.5.2",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/plugin-transform-modules-commonjs": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@babel/preset-flow": "^7.0.0",
"@babel/register": "^7.4.4",
"@babel/runtime": "^7.4.5",
"@babel/register": "^7.6.0",
"@babel/runtime": "^7.6.0",
"babel-eslint": "^11.0.0-beta.0",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
@@ -63,8 +63,9 @@
"rollup-plugin-babel": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-replace": "^2.2.0",
"test262-stream": "^1.2.0",
"test262-stream": "^1.3.0",
"through2": "^2.0.0",
"typescript": "^3.6.3",
"warnings-to-errors-webpack-plugin": "^2.0.0",
"webpack": "^3.4.1",
"webpack-dependency-suite": "^2.4.4",

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/cli",
"version": "7.6.0",
"version": "7.6.2",
"description": "Babel command line.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -36,8 +36,8 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/helper-fixtures": "^7.6.0"
"@babel/core": "^7.6.2",
"@babel/helper-fixtures": "^7.6.2"
},
"bin": {
"babel": "./bin/babel.js",

View File

@@ -6,8 +6,12 @@ import fileCommand from "./file";
const opts = parseArgv(process.argv);
const fn = opts.cliOptions.outDir ? dirCommand : fileCommand;
fn(opts).catch(err => {
console.error(err);
process.exit(1);
});
if (opts) {
const fn = opts.cliOptions.outDir ? dirCommand : fileCommand;
fn(opts).catch(err => {
console.error(err);
process.exitCode = 1;
});
} else {
process.exitCode = 2;
}

View File

@@ -158,7 +158,7 @@ export type CmdOptions = {
cliOptions: Object,
};
export default function parseArgv(args: Array<string>): CmdOptions {
export default function parseArgv(args: Array<string>): CmdOptions | null {
//
commander.parse(args);
@@ -223,7 +223,7 @@ export default function parseArgv(args: Array<string>): CmdOptions {
errors.forEach(function(e) {
console.error(" " + e);
});
process.exit(2);
return null;
}
const opts = commander.opts();

View File

@@ -112,7 +112,7 @@ export function deleteDir(path: string): void {
process.on("uncaughtException", function(err) {
console.error(err);
process.exit(1);
process.exitCode = 1;
});
export function requireChokidar(): Object {

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/core",
"version": "7.6.0",
"version": "7.6.2",
"description": "Babel compiler core.",
"main": "lib/index.js",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
@@ -34,11 +34,11 @@
},
"dependencies": {
"@babel/code-frame": "^7.5.5",
"@babel/generator": "^7.6.0",
"@babel/helpers": "^7.6.0",
"@babel/parser": "^7.6.0",
"@babel/generator": "^7.6.2",
"@babel/helpers": "^7.6.2",
"@babel/parser": "^7.6.2",
"@babel/template": "^7.6.0",
"@babel/traverse": "^7.6.0",
"@babel/traverse": "^7.6.2",
"@babel/types": "^7.6.0",
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
@@ -49,7 +49,6 @@
"source-map": "^0.5.0"
},
"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "^7.6.0",
"@babel/register": "^7.6.0"
"@babel/helper-transform-fixture-test-runner": "^7.6.0"
}
}

View File

@@ -272,7 +272,8 @@ export type OptionsSource =
| "configfile"
| "babelrcfile"
| "extendsfile"
| "preset";
| "preset"
| "plugin";
type RootPath = $ReadOnly<{
type: "root",

View File

@@ -84,10 +84,19 @@ export type PluginObject = {
};
export function validatePluginObject(obj: {}): PluginObject {
const rootPath: RootPath = {
type: "root",
source: "plugin",
};
Object.keys(obj).forEach(key => {
const validator = VALIDATORS[key];
const optLoc = {
type: "option",
name: key,
parent: rootPath,
};
if (validator) validator(key, obj[key]);
if (validator) validator(optLoc, obj[key]);
else throw new Error(`.${key} is not a valid Plugin property`);
});

View File

@@ -322,6 +322,21 @@ describe("@babel/core config loading", () => {
}
}
});
it("should thrown when plugin is not valid", () => {
const fooPlugin = {
inherits: "inhertis-should-not-be-string",
};
const opts = {
cwd: path.dirname(FILEPATH),
filename: FILEPATH,
plugins: [fooPlugin],
};
expect(() => loadConfig(opts)).toThrow(
/\.inherits must be a function, or undefined/,
);
});
});
describe("caller metadata", () => {

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/generator",
"version": "7.6.0",
"version": "7.6.2",
"description": "Turns an AST into code.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -17,11 +17,10 @@
"@babel/types": "^7.6.0",
"jsesc": "^2.5.1",
"lodash": "^4.17.13",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
"source-map": "^0.5.0"
},
"devDependencies": {
"@babel/helper-fixtures": "^7.6.0",
"@babel/parser": "^7.6.0"
"@babel/helper-fixtures": "^7.6.2",
"@babel/parser": "^7.6.2"
}
}

View File

@@ -1,5 +1,4 @@
import type SourceMap from "./source-map";
import trimRight from "trim-right";
const SPACES_RE = /^[ \t]+$/;
@@ -43,7 +42,7 @@ export default class Buffer {
const result = {
// Whatever trim is used here should not execute a regex against the
// source string since it may be arbitrarily large after all transformations
code: trimRight(this._buf.join("")),
code: this._buf.join("").trimRight(),
map: null,
rawMappings: map && map.getRawMappings(),
};

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-fixtures",
"version": "7.6.0",
"version": "7.6.2",
"description": "Helper function to support fixtures",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"license": "MIT",
@@ -11,7 +11,6 @@
"main": "lib/index.js",
"dependencies": {
"lodash": "^4.17.13",
"semver": "^5.3.0",
"try-resolve": "^1.0.0"
"semver": "^5.3.0"
}
}

View File

@@ -1,6 +1,4 @@
import cloneDeep from "lodash/cloneDeep";
import trimEnd from "lodash/trimEnd";
import resolve from "try-resolve";
import clone from "lodash/clone";
import extend from "lodash/extend";
import semver from "semver";
@@ -36,6 +34,13 @@ type Suite = {
filename: string,
};
function tryResolve(module) {
try {
return require.resolve(module);
} catch (e) {
return null;
}
}
function assertDirectory(loc) {
if (!fs.statSync(loc).isDirectory()) {
throw new Error(`Expected ${loc} to be a directory.`);
@@ -77,7 +82,7 @@ export default function get(entryLoc): Array<Suite> {
const suites = [];
let rootOpts = {};
const rootOptsLoc = resolve(entryLoc + "/options");
const rootOptsLoc = tryResolve(entryLoc + "/options");
if (rootOptsLoc) rootOpts = require(rootOptsLoc);
for (const suiteName of fs.readdirSync(entryLoc)) {
@@ -93,7 +98,7 @@ export default function get(entryLoc): Array<Suite> {
assertDirectory(suite.filename);
suites.push(suite);
const suiteOptsLoc = resolve(suite.filename + "/options");
const suiteOptsLoc = tryResolve(suite.filename + "/options");
if (suiteOptsLoc) suite.options = require(suiteOptsLoc);
for (const taskName of fs.readdirSync(suite.filename)) {
@@ -140,7 +145,7 @@ export default function get(entryLoc): Array<Suite> {
const taskOpts = cloneDeep(suite.options);
const taskOptsLoc = resolve(taskDir + "/options");
const taskOptsLoc = tryResolve(taskDir + "/options");
if (taskOptsLoc) extend(taskOpts, require(taskOptsLoc));
const test = {
@@ -275,7 +280,7 @@ export function multiple(entryLoc, ignore?: Array<string>) {
export function readFile(filename) {
if (fs.existsSync(filename)) {
let file = trimEnd(fs.readFileSync(filename, "utf8"));
let file = fs.readFileSync(filename, "utf8").trimRight();
file = file.replace(/\r\n/g, "\n");
return file;
} else {

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helpers",
"version": "7.6.0",
"version": "7.6.2",
"description": "Collection of helper functions used by Babel transforms.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -12,7 +12,7 @@
"main": "lib/index.js",
"dependencies": {
"@babel/template": "^7.6.0",
"@babel/traverse": "^7.6.0",
"@babel/traverse": "^7.6.2",
"@babel/types": "^7.6.0"
},
"devDependencies": {

View File

@@ -936,7 +936,7 @@ helpers.iterableToArrayLimit = helper("7.0.0-beta.0")`
export default function _iterableToArrayLimit(arr, i) {
// this is an expanded form of \`for...of\` that properly supports abrupt completions of
// iterators etc. variable names have been minimised to reduce the size of this massive
// helper. sometimes spec compliancy is annoying :(
// helper. sometimes spec compliance is annoying :(
//
// _n = _iteratorNormalCompletion
// _d = _didIteratorError

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/node",
"version": "7.6.1",
"version": "7.6.2",
"description": "Babel command line",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -19,19 +19,20 @@
"compiler"
],
"dependencies": {
"@babel/polyfill": "^7.6.0",
"@babel/register": "^7.6.0",
"@babel/register": "^7.6.2",
"commander": "^2.8.1",
"core-js": "^3.2.1",
"lodash": "^4.17.13",
"node-environment-flags": "^1.0.5",
"regenerator-runtime": "^0.13.3",
"v8flags": "^3.1.1"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/helper-fixtures": "^7.6.0",
"@babel/core": "^7.6.2",
"@babel/helper-fixtures": "^7.6.2",
"fs-readdir-recursive": "^1.0.0",
"output-file-sync": "^2.0.0"
},

View File

@@ -5,7 +5,8 @@ import path from "path";
import repl from "repl";
import * as babel from "@babel/core";
import vm from "vm";
import "@babel/polyfill";
import "core-js/stable";
import "regenerator-runtime/runtime";
import register from "@babel/register";
import pkg from "../package.json";

View File

@@ -2,7 +2,7 @@
> **Tags:**
> - :boom: [Breaking Change]
> - :eyeglasses: [Spec Compliancy]
> - :eyeglasses: [Spec Compliance]
> - :rocket: [New Feature]
> - :bug: [Bug Fix]
> - :memo: [Documentation]
@@ -56,7 +56,7 @@ See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.m
## 7.0.0-beta.7 (2017-03-22)
### Spec Compliancy
### Spec Compliance
* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu)
### Bug Fix
@@ -200,7 +200,7 @@ declare module "C" {
}
```
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons)
@@ -305,7 +305,7 @@ AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon
## 6.15.0 (2017-01-10)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
@@ -411,7 +411,7 @@ Will include all parser plugins instead of specifying each one individually. Use
## 6.14.0 (2016-11-16)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo)
@@ -491,7 +491,7 @@ With that test case, there was a ~95ms savings by removing the need for node to
## v6.13.0 (2016-10-21)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman)
@@ -549,7 +549,7 @@ Fixes two tests that are failing after the merge of #172 ([#177](https://github.
## v6.12.0 (2016-10-14)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler)
@@ -643,7 +643,7 @@ export const { foo: [ ,, qux7 ] } = bar;
## v6.11.5 (2016-10-12)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo)
@@ -689,7 +689,7 @@ Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu)
## v6.11.3 (2016-10-01)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Add static errors for object rest (#149) ([@danez](https://github.com/danez))
@@ -782,7 +782,7 @@ export toString from './toString';
## 6.11.0 (2016-09-22)
### Spec Compliancy (will break CI)
### Spec Compliance (will break CI)
- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo
@@ -862,9 +862,9 @@ for (+i in {});
## 6.10.0 (2016-09-19)
> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue.
> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue.
### Spec Compliancy
### Spec Compliance
* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu)
@@ -1023,7 +1023,7 @@ declare module "foo" {
- The existential type `*` is not a valid type parameter.
- The existential type `*` is a primary type
### Spec Compliancy
### Spec Compliance
- The param list for type parameter declarations now consists of `TypeParameter` nodes
- New `TypeParameter` AST Node (replaces using the `Identifier` node before)

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/parser",
"version": "7.6.0",
"version": "7.6.2",
"description": "A JavaScript parser",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -29,7 +29,7 @@
},
"devDependencies": {
"@babel/code-frame": "^7.5.5",
"@babel/helper-fixtures": "^7.6.0",
"@babel/helper-fixtures": "^7.6.2",
"charcodes": "^0.2.0",
"unicode-12.0.0": "^0.7.9"
},

View File

@@ -38,11 +38,24 @@ export default class CommentsParser extends BaseParser {
this.state.leadingComments.push(comment);
}
adjustCommentsAfterTrailingComma(node: Node, elements: Node[]) {
if (elements.length === 0) {
adjustCommentsAfterTrailingComma(
node: Node,
elements: Node[],
// When the current node is followed by a token which hasn't a respective AST node, we
// need to take all the trailing comments to prevent them from being attached to an
// unrelated node. e.g. in
// var { x } /* cmt */ = { y }
// we don't want /* cmt */ to be attached to { y }.
// On the other hand, in
// fn(x) [new line] /* cmt */ [new line] y
// /* cmt */ is both a trailing comment of fn(x) and a leading comment of y
takeAllComments?: boolean,
) {
if (this.state.leadingComments.length === 0) {
return;
}
if (this.state.leadingComments.length === 0) {
if (elements.length === 0) {
return;
}
@@ -58,10 +71,16 @@ export default class CommentsParser extends BaseParser {
}
const newTrailingComments = [];
while (this.state.leadingComments.length) {
const leadingComment = this.state.leadingComments.shift();
for (let i = 0; i < this.state.leadingComments.length; i++) {
const leadingComment = this.state.leadingComments[i];
if (leadingComment.end < node.end) {
newTrailingComments.push(leadingComment);
// Perf: we don't need to splice if we are going to reset the array anyway
if (!takeAllComments) {
this.state.leadingComments.splice(i, 1);
i--;
}
} else {
if (node.trailingComments === undefined) {
node.trailingComments = [];
@@ -69,6 +88,7 @@ export default class CommentsParser extends BaseParser {
node.trailingComments.push(leadingComment);
}
}
if (takeAllComments) this.state.leadingComments = [];
if (newTrailingComments.length > 0) {
lastElement.trailingComments = newTrailingComments;
@@ -129,16 +149,20 @@ export default class CommentsParser extends BaseParser {
if (firstChild) {
switch (node.type) {
case "ObjectExpression":
case "ObjectPattern":
this.adjustCommentsAfterTrailingComma(node, node.properties);
break;
case "ObjectPattern":
this.adjustCommentsAfterTrailingComma(node, node.properties, true);
break;
case "CallExpression":
this.adjustCommentsAfterTrailingComma(node, node.arguments);
break;
case "ArrayExpression":
case "ArrayPattern":
this.adjustCommentsAfterTrailingComma(node, node.elements);
break;
case "ArrayPattern":
this.adjustCommentsAfterTrailingComma(node, node.elements, true);
break;
}
} else if (
this.state.commentPreviousNode &&
@@ -147,9 +171,11 @@ export default class CommentsParser extends BaseParser {
(this.state.commentPreviousNode.type === "ExportSpecifier" &&
node.type !== "ExportSpecifier"))
) {
this.adjustCommentsAfterTrailingComma(node, [
this.state.commentPreviousNode,
]);
this.adjustCommentsAfterTrailingComma(
node,
[this.state.commentPreviousNode],
true,
);
}
if (lastChild) {

View File

@@ -655,6 +655,12 @@ export default class ExpressionParser extends LValParser {
node.object = base;
node.property = this.parseMaybePrivateName();
node.computed = false;
if (
node.property.type === "PrivateName" &&
node.object.type === "Super"
) {
this.raise(startPos, "Private fields can't be accessed on super");
}
if (state.optionalChainMember) {
node.optional = false;
return this.finishNode(node, "OptionalMemberExpression");
@@ -2066,6 +2072,11 @@ export default class ExpressionParser extends LValParser {
if (this.match(tt.name)) {
name = this.state.value;
// An escaped identifier whose value is the same as a keyword
if (!liberal && this.state.containsEsc && isKeyword(name)) {
this.raise(this.state.pos, `Escape sequence in keyword ${name}`);
}
} else if (this.state.type.keyword) {
name = this.state.type.keyword;

View File

@@ -1498,13 +1498,18 @@ export default class StatementParser extends ExpressionParser {
}
pushClassProperty(classBody: N.ClassBody, prop: N.ClassProperty) {
// This only affects properties, not methods.
if (this.isNonstaticConstructor(prop)) {
if (
!prop.computed &&
(prop.key.name === "constructor" || prop.key.value === "constructor")
) {
// Non-computed field, which is either an identifier named "constructor"
// or a string literal named "constructor"
this.raise(
prop.key.start,
"Classes may not have a non-static field named 'constructor'",
"Classes may not have a field named 'constructor'",
);
}
classBody.body.push(this.parseClassProperty(prop));
}

View File

@@ -234,8 +234,8 @@ export default class Tokenizer extends LocationParser {
skipBlockComment(): void {
const startLoc = this.state.curPosition();
const start = this.state.pos;
const end = this.input.indexOf("*/", (this.state.pos += 2));
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
const end = this.input.indexOf("*/", this.state.pos + 2);
if (end === -1) this.raise(start, "Unterminated comment");
this.state.pos = end + 2;
lineBreakG.lastIndex = start;
@@ -404,8 +404,10 @@ export default class Tokenizer extends LocationParser {
return;
}
const next2 = this.input.charCodeAt(this.state.pos + 2);
if (next === charCodes.dot && next2 === charCodes.dot) {
if (
next === charCodes.dot &&
this.input.charCodeAt(this.state.pos + 2) === charCodes.dot
) {
this.state.pos += 3;
this.finishToken(tt.ellipsis);
} else {
@@ -878,7 +880,11 @@ export default class Tokenizer extends LocationParser {
// were read, the integer value otherwise. When `len` is given, this
// will return `null` unless the integer has exactly `len` digits.
readInt(radix: number, len?: number): number | null {
readInt(
radix: number,
len?: number,
allowNumSeparator: boolean = true,
): number | null {
const start = this.state.pos;
const forbiddenSiblings =
radix === 16
@@ -900,9 +906,9 @@ export default class Tokenizer extends LocationParser {
let val;
if (this.hasPlugin("numericSeparator")) {
const prev = this.input.charCodeAt(this.state.pos - 1);
const next = this.input.charCodeAt(this.state.pos + 1);
if (code === charCodes.underscore) {
const prev = this.input.charCodeAt(this.state.pos - 1);
const next = this.input.charCodeAt(this.state.pos + 1);
if (allowedSiblings.indexOf(next) === -1) {
this.raise(this.state.pos, "Invalid or unexpected token");
}
@@ -915,6 +921,13 @@ export default class Tokenizer extends LocationParser {
this.raise(this.state.pos, "Invalid or unexpected token");
}
if (!allowNumSeparator) {
this.raise(
this.state.pos,
"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences",
);
}
// Ignore this _ character
++this.state.pos;
continue;
@@ -980,6 +993,7 @@ export default class Tokenizer extends LocationParser {
const start = this.state.pos;
let isFloat = false;
let isBigInt = false;
let isNonOctalDecimalInt = false;
if (!startsWithDot && this.readInt(10) === null) {
this.raise(start, "Invalid number");
@@ -996,6 +1010,7 @@ export default class Tokenizer extends LocationParser {
}
if (/[89]/.test(this.input.slice(start, this.state.pos))) {
octal = false;
isNonOctalDecimalInt = true;
}
}
@@ -1020,10 +1035,26 @@ export default class Tokenizer extends LocationParser {
next = this.input.charCodeAt(this.state.pos);
}
// disallow numeric separators in non octal decimals
if (this.hasPlugin("numericSeparator") && isNonOctalDecimalInt) {
const underscorePos = this.input
.slice(start, this.state.pos)
.indexOf("_");
if (underscorePos > 0) {
this.raise(
underscorePos + start,
"Numeric separator can not be used after leading 0",
);
}
}
if (this.hasPlugin("bigInt")) {
if (next === charCodes.lowercaseN) {
// disallow floats and legacy octal syntax, new style octal ("0o") is handled in this.readRadixNumber
if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral");
// disallow floats, legacy octal syntax and non octal decimals
// new style octal ("0o") is handled in this.readRadixNumber
if (isFloat || octal || isNonOctalDecimalInt) {
this.raise(start, "Invalid BigIntLiteral");
}
++this.state.pos;
isBigInt = true;
}
@@ -1250,7 +1281,7 @@ export default class Tokenizer extends LocationParser {
readHexChar(len: number, throwOnInvalid: boolean): number | null {
const codePos = this.state.pos;
const n = this.readInt(16, len);
const n = this.readInt(16, len, false);
if (n === null) {
if (throwOnInvalid) {
this.raise(codePos, "Bad character escape sequence");
@@ -1324,11 +1355,7 @@ export default class Tokenizer extends LocationParser {
readWord(): void {
const word = this.readWord1();
const type = keywordTypes.get(word) || tt.name;
if (type.keyword && this.state.containsEsc) {
this.raise(this.state.pos, `Escape sequence in keyword ${word}`);
}
const type = (!this.state.containsEsc && keywordTypes.get(word)) || tt.name;
// Allow @@iterator and @@asyncIterator as a identifier only inside type
if (

View File

@@ -250,7 +250,25 @@
"label": null
}
],
"test": null
"test": null,
"leadingComments": [
{
"type": "CommentLine",
"value": " comment",
"start": 47,
"end": 57,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 14
}
}
}
]
}
]
}

View File

@@ -215,7 +215,25 @@
"identifierName": "B"
},
"name": "B"
}
},
"leadingComments": [
{
"type": "CommentLine",
"value": " Two",
"start": 27,
"end": 33,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 6
}
}
}
]
}
],
"directives": []

View File

@@ -0,0 +1,5 @@
const socket = socketClient(address)
/* istanbul ignore next */
socket.on('connect', function () {
debug('Connected to ' + address)
})

View File

@@ -0,0 +1,431 @@
{
"type": "File",
"start": 0,
"end": 136,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"program": {
"type": "Program",
"start": 0,
"end": 136,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 6,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "socket"
},
"name": "socket"
},
"init": {
"type": "CallExpression",
"start": 15,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 36
}
},
"callee": {
"type": "Identifier",
"start": 15,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 27
},
"identifierName": "socketClient"
},
"name": "socketClient"
},
"arguments": [
{
"type": "Identifier",
"start": 28,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 35
},
"identifierName": "address"
},
"name": "address"
}
]
}
}
],
"kind": "const",
"trailingComments": [
{
"type": "CommentBlock",
"value": " istanbul ignore next ",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 64,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"expression": {
"type": "CallExpression",
"start": 64,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"callee": {
"type": "MemberExpression",
"start": 64,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 9
}
},
"object": {
"type": "Identifier",
"start": 64,
"end": 70,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 6
},
"identifierName": "socket"
},
"name": "socket"
},
"property": {
"type": "Identifier",
"start": 71,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 9
},
"identifierName": "on"
},
"name": "on"
},
"computed": false
},
"arguments": [
{
"type": "StringLiteral",
"start": 74,
"end": 83,
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 19
}
},
"extra": {
"rawValue": "connect",
"raw": "'connect'"
},
"value": "connect"
},
{
"type": "FunctionExpression",
"start": 85,
"end": 135,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 5,
"column": 1
}
},
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 97,
"end": 135,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 5,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 101,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 34
}
},
"expression": {
"type": "CallExpression",
"start": 101,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 34
}
},
"callee": {
"type": "Identifier",
"start": 101,
"end": 106,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 7
},
"identifierName": "debug"
},
"name": "debug"
},
"arguments": [
{
"type": "BinaryExpression",
"start": 107,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 33
}
},
"left": {
"type": "StringLiteral",
"start": 107,
"end": 122,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 23
}
},
"extra": {
"rawValue": "Connected to ",
"raw": "'Connected to '"
},
"value": "Connected to "
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 125,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 33
},
"identifierName": "address"
},
"name": "address"
}
}
]
}
}
],
"directives": []
}
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": " istanbul ignore next ",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": " istanbul ignore next ",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
}
}
]
}

View File

@@ -0,0 +1,3 @@
var a = {
br\u{65}ak
};

View File

@@ -0,0 +1,3 @@
{
"throws": "Unexpected keyword 'break' (2:2)"
}

View File

@@ -0,0 +1,3 @@
var a = {
br\u{65}ak: 2
};

View File

@@ -0,0 +1,157 @@
{
"type": "File",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 2
}
},
"program": {
"type": "Program",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 2
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 4,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 3,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 5,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 5
},
"identifierName": "a"
},
"name": "a"
},
"init": {
"type": "ObjectExpression",
"start": 8,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 3,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 12,
"end": 25,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 15
}
},
"method": false,
"key": {
"type": "Identifier",
"start": 12,
"end": 22,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 12
},
"identifierName": "break"
},
"name": "break"
},
"computed": false,
"shorthand": false,
"value": {
"type": "NumericLiteral",
"start": 24,
"end": 25,
"loc": {
"start": {
"line": 2,
"column": 14
},
"end": {
"line": 2,
"column": 15
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
}
}
]
}
}
],
"kind": "var"
}
],
"directives": []
}
}

View File

@@ -0,0 +1 @@
{ "throws": "Invalid BigIntLiteral (1:0)" }

View File

@@ -0,0 +1,7 @@
class A extends B {
#x;
method() {
super.#x;
}
}

View File

@@ -0,0 +1,6 @@
{
"plugins": [
"classPrivateProperties"
],
"throws": "Private fields can't be accessed on super (5:4)"
}

View File

@@ -1,4 +1,4 @@
{
"throws": "Classes may not have a non-static field named 'constructor' (2:2)",
"throws": "Classes may not have a field named 'constructor' (2:2)",
"plugins": ["classProperties"]
}

View File

@@ -1,4 +1,4 @@
{
"throws": "Classes may not have a non-static field named 'constructor' (2:2)",
"throws": "Classes may not have a field named 'constructor' (2:2)",
"plugins": ["classProperties"]
}

View File

@@ -0,0 +1,3 @@
class Foo {
static constructor;
}

View File

@@ -0,0 +1,4 @@
{
"throws": "Classes may not have a field named 'constructor' (2:11)",
"plugins": ["classProperties"]
}

View File

@@ -0,0 +1 @@
"\x1_0";

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences (1:4)" }

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separator can not be used after leading 0 (1:1)" }

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separator can not be used after leading 0 (1:2)" }

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences (1:5)" }

View File

@@ -0,0 +1 @@
"\u{1F_639}"

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences (1:6)" }

View File

@@ -1,3 +1,3 @@
{
"plugins": ["numericSeparator"]
"plugins": ["bigInt", "numericSeparator"]
}

View File

@@ -1,3 +1,4 @@
{
"throws": "Classes may not have a field named 'constructor' (2:2)",
"plugins": ["jsx", "flow", "classProperties"]
}

View File

@@ -1,169 +0,0 @@
{
"type": "File",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "Foo"
},
"name": "Foo"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 10,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 3,
"column": 1
}
},
"body": [
{
"type": "ClassProperty",
"start": 14,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 26
}
},
"static": false,
"key": {
"type": "Identifier",
"start": 14,
"end": 25,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 13
},
"identifierName": "constructor"
},
"name": "constructor"
},
"computed": false,
"variance": null,
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 25,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 25
}
},
"typeAnnotation": {
"type": "FunctionTypeAnnotation",
"start": 27,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 25
}
},
"params": [],
"rest": null,
"returnType": {
"type": "ThisTypeAnnotation",
"start": 33,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 25
}
}
},
"typeParameters": null
}
},
"value": null
}
]
}
}
],
"directives": []
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-proposal-object-rest-spread",
"version": "7.5.5",
"version": "7.6.2",
"description": "Compile object rest and spread to ES5",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread",
"license": "MIT",
@@ -19,7 +19,7 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -30,9 +30,20 @@ export default declare((api, opts) => {
function hasRestElement(path) {
let foundRestElement = false;
visitRestElements(path, () => {
visitRestElements(path, restElement => {
foundRestElement = true;
path.stop();
restElement.stop();
});
return foundRestElement;
}
function hasObjectPatternRestElement(path) {
let foundRestElement = false;
visitRestElements(path, restElement => {
if (restElement.parentPath.isObjectPattern()) {
foundRestElement = true;
restElement.stop();
}
});
return foundRestElement;
}
@@ -163,9 +174,9 @@ export default declare((api, opts) => {
];
}
function replaceRestElement(parentPath, paramPath, i, numParams) {
function replaceRestElement(parentPath, paramPath) {
if (paramPath.isAssignmentPattern()) {
replaceRestElement(parentPath, paramPath.get("left"), i, numParams);
replaceRestElement(parentPath, paramPath.get("left"));
return;
}
@@ -173,7 +184,7 @@ export default declare((api, opts) => {
const elements = paramPath.get("elements");
for (let i = 0; i < elements.length; i++) {
replaceRestElement(parentPath, elements[i], i, elements.length);
replaceRestElement(parentPath, elements[i]);
}
}
@@ -200,7 +211,7 @@ export default declare((api, opts) => {
Function(path) {
const params = path.get("params");
for (let i = params.length - 1; i >= 0; i--) {
replaceRestElement(params[i].parentPath, params[i], i, params.length);
replaceRestElement(params[i].parentPath, params[i]);
}
},
// adapted from transform-destructuring/src/index.js#pushObjectRest
@@ -380,8 +391,12 @@ export default declare((api, opts) => {
const leftPath = path.get("left");
const left = node.left;
// for ({a, ...b} of []) {}
if (t.isObjectPattern(left) && hasRestElement(leftPath)) {
if (!hasObjectPatternRestElement(leftPath)) {
return;
}
if (!t.isVariableDeclaration(left)) {
// for ({a, ...b} of []) {}
const temp = scope.generateUidIdentifier("ref");
node.left = t.variableDeclaration("var", [
@@ -401,27 +416,54 @@ export default declare((api, opts) => {
t.assignmentExpression("=", left, t.cloneNode(temp)),
),
);
} else {
// for (var {a, ...b} of []) {}
const pattern = left.declarations[0].id;
return;
const key = scope.generateUidIdentifier("ref");
node.left = t.variableDeclaration(left.kind, [
t.variableDeclarator(key, null),
]);
path.ensureBlock();
node.body.body.unshift(
t.variableDeclaration(node.left.kind, [
t.variableDeclarator(pattern, t.cloneNode(key)),
]),
);
}
},
// [{a, ...b}] = c;
ArrayPattern(path) {
const objectPatterns = [];
if (!t.isVariableDeclaration(left)) return;
visitRestElements(path, path => {
if (!path.parentPath.isObjectPattern()) {
// Return early if the parent is not an ObjectPattern, but
// (for example) an ArrayPattern or Function, because that
// means this RestElement is an not an object property.
return;
}
const pattern = left.declarations[0].id;
if (!t.isObjectPattern(pattern)) return;
const objectPattern = path.parentPath;
const key = scope.generateUidIdentifier("ref");
node.left = t.variableDeclaration(left.kind, [
t.variableDeclarator(key, null),
]);
const uid = path.scope.generateUidIdentifier("ref");
objectPatterns.push(t.variableDeclarator(objectPattern.node, uid));
path.ensureBlock();
objectPattern.replaceWith(t.cloneNode(uid));
path.skip();
});
node.body.body.unshift(
t.variableDeclaration(node.left.kind, [
t.variableDeclarator(pattern, t.cloneNode(key)),
]),
);
if (objectPatterns.length > 0) {
const statementPath = path.getStatementParent();
statementPath.insertAfter(
t.variableDeclaration(
statementPath.node.kind || "var",
objectPatterns,
),
);
}
},
// var a = { ...b, ...c }
ObjectExpression(path, file) {

View File

@@ -0,0 +1,19 @@
// ForXStatement
for (const [{a, ...b}] of []) {}
for ([{a, ...b}] of []) {}
async function a() {
for await ([{a, ...b}] of []) {}
}
// skip
for ([{a}] in {}) {}
for ([{a}] of []) {}
async function a() {
for await ([{a}] of []) {}
}
for ([a, ...b] in {}) {}
for ([a, ...b] of []) {}
async function a() {
for await ([a, ...b] of []) {}
}

View File

@@ -0,0 +1,49 @@
// ForXStatement
for (const _ref of []) {
const [_ref2] = _ref;
const {
a
} = _ref2,
b = babelHelpers.objectWithoutProperties(_ref2, ["a"]);
}
for (var _ref3 of []) {
[_ref4] = _ref3;
var {
a
} = _ref4,
b = babelHelpers.objectWithoutProperties(_ref4, ["a"]);
}
async function a() {
for await (var _ref5 of []) {
[_ref6] = _ref5;
var {
a
} = _ref6,
b = babelHelpers.objectWithoutProperties(_ref6, ["a"]);
}
} // skip
for ([{
a
}] in {}) {}
for ([{
a
}] of []) {}
async function a() {
for await ([{
a
}] of []) {}
}
for ([a, ...b] in {}) {}
for ([a, ...b] of []) {}
async function a() {
for await ([a, ...b] of []) {}
}

View File

@@ -0,0 +1 @@
const [a, [{b, ...c}], {d, ...e}, [{ f, ...g}, {h: [i, {j, ...k}] }]] = x;

View File

@@ -0,0 +1,19 @@
const [a, [_ref], _ref2, [_ref3, {
h: [i, _ref4]
}]] = x;
const {
b
} = _ref,
c = babelHelpers.objectWithoutProperties(_ref, ["b"]),
{
d
} = _ref2,
e = babelHelpers.objectWithoutProperties(_ref2, ["d"]),
{
f
} = _ref3,
g = babelHelpers.objectWithoutProperties(_ref3, ["f"]),
{
j
} = _ref4,
k = babelHelpers.objectWithoutProperties(_ref4, ["j"]);

View File

@@ -0,0 +1,6 @@
const [a, {b, ...c}] = x;
let [d, {e, ...f}] = x;
[g, {h, ...i}] = x;

View File

@@ -0,0 +1,15 @@
const [a, _ref] = x;
const {
b
} = _ref,
c = babelHelpers.objectWithoutProperties(_ref, ["b"]);
let [d, _ref2] = x;
let {
e
} = _ref2,
f = babelHelpers.objectWithoutProperties(_ref2, ["e"]);
[g, _ref3] = x;
var {
h
} = _ref3,
i = babelHelpers.objectWithoutProperties(_ref3, ["h"]);

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-proposal-unicode-property-regex",
"version": "7.4.4",
"version": "7.6.2",
"description": "Compile Unicode property escapes in Unicode regular expressions to ES5.",
"homepage": "https://babeljs.io/",
"license": "MIT",
@@ -24,13 +24,13 @@
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-regex": "^7.4.4",
"regexpu-core": "^4.5.4"
"regexpu-core": "^4.6.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-block-scoping",
"version": "7.6.0",
"version": "7.6.2",
"description": "Compile ES2015 block scoping (const and let) to ES5",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-block-scoping",
"license": "MIT",
@@ -19,7 +19,7 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -0,0 +1,14 @@
import { foo } from "somewhere";
// foo might call "bar"
foo();
a;
let a;
a;
export function bar() {
return a;
}

View File

@@ -0,0 +1,10 @@
var a = babelHelpers.temporalUndefined;
import { foo } from "somewhere"; // foo might call "bar"
foo();
babelHelpers.tdz("a");
a = void 0;
a;
export function bar() {
return babelHelpers.temporalRef(a, "a");
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-dotall-regex",
"version": "7.4.4",
"version": "7.6.2",
"description": "Compile regular expressions using the `s` (`dotAll`) flag to ES5.",
"homepage": "https://babeljs.io/",
"license": "MIT",
@@ -23,13 +23,13 @@
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-regex": "^7.4.4",
"regexpu-core": "^4.5.4"
"regexpu-core": "^4.6.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -1,2 +1,2 @@
var a = /./;
var b = /[\0-\uFFFF]/;
var b = /[\s\S]/;

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-named-capturing-groups-regex",
"version": "7.6.0",
"version": "7.6.2",
"description": "Compile regular expressions using named groups to ES5.",
"homepage": "https://babeljs.io/",
"license": "MIT",
@@ -11,17 +11,22 @@
"regexp",
"regular expressions"
],
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-named-capturing-groups-regex",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-transform-named-capturing-groups-regex"
},
"bugs": "https://github.com/babel/babel/issues",
"dependencies": {
"regexp-tree": "^0.1.13"
"regexpu-core": "^4.6.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0",
"core-js-pure": "^3.0.0"
"core-js": "^3.2.1",
"core-js-pure": "^3.2.1"
}
}

View File

@@ -1,4 +1,4 @@
import regexpTree from "regexp-tree";
import rewritePattern from "regexpu-core";
export default function({ types: t }, options) {
const { runtime = true } = options;
@@ -19,16 +19,18 @@ export default function({ types: t }, options) {
return;
}
const result = regexpTree.compatTranspile(node.extra.raw, [
"namedCapturingGroups",
]);
const { namedCapturingGroups } = result.getExtra();
const namedCapturingGroups = {};
const result = rewritePattern(node.pattern, node.flags, {
namedGroup: true,
//todo: consider refactor `lookbehind` true as modular plugin
lookbehind: true,
onNamedGroup(name, index) {
namedCapturingGroups[name] = index;
},
});
if (
namedCapturingGroups &&
Object.keys(namedCapturingGroups).length > 0
) {
node.pattern = result.getSource();
if (Object.keys(namedCapturingGroups).length > 0) {
node.pattern = result;
if (runtime && !isRegExpTest(path)) {
path.replaceWith(

View File

@@ -1,3 +1,3 @@
{
"throws": "invalid group Unicode name \"\\u{41}\", use `u` flag."
"throws": "Invalid escape sequence at position 3"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-runtime",
"version": "7.6.0",
"version": "7.6.2",
"description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime",
"license": "MIT",
@@ -21,12 +21,11 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0",
"@babel/helpers": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@babel/runtime": "^7.6.0",
"@babel/helpers": "^7.6.2",
"@babel/preset-env": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@babel/template": "^7.6.0",
"@babel/types": "7.0.0-beta.53"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-spread",
"version": "7.2.2",
"version": "7.6.2",
"description": "Compile ES2015 spread to ES5",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-spread",
"license": "MIT",
@@ -18,7 +18,7 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -0,0 +1,6 @@
const E_ARR = [];
export default function () {
const someVar = E_ARR;
return [...someVar];
}

View File

@@ -0,0 +1,5 @@
const E_ARR = [];
export default function () {
const someVar = E_ARR;
return babelHelpers.toConsumableArray(someVar);
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-unicode-regex",
"version": "7.4.4",
"version": "7.6.2",
"description": "Compile ES2015 Unicode regex to ES5",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-unicode-regex",
"license": "MIT",
@@ -14,13 +14,13 @@
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-regex": "^7.4.4",
"regexpu-core": "^4.5.4"
"regexpu-core": "^4.6.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/preset-env-standalone",
"version": "7.6.0",
"version": "7.6.2",
"description": "Standalone build of babel-prest-env for use in non-Node.js environments.",
"main": "babel-preset-env.js",
"files": [
@@ -11,10 +11,10 @@
"devDependencies": {
"@babel/plugin-proposal-dynamic-import": "^7.5.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.6.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.6.2",
"@babel/plugin-transform-new-target": "^7.4.4",
"@babel/preset-env": "^7.6.0",
"@babel/standalone": "^7.6.0"
"@babel/preset-env": "^7.6.2",
"@babel/standalone": "^7.6.2"
},
"keywords": [
"babel",

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/preset-env",
"version": "7.6.0",
"version": "7.6.2",
"description": "A Babel preset for each environment.",
"author": "Henry Zhu <hi@henryzoo.com>",
"homepage": "https://babeljs.io/",
@@ -19,9 +19,9 @@
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
"@babel/plugin-proposal-dynamic-import": "^7.5.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0",
"@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
"@babel/plugin-proposal-unicode-property-regex": "^7.6.2",
"@babel/plugin-syntax-async-generators": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-json-strings": "^7.2.0",
@@ -30,11 +30,11 @@
"@babel/plugin-transform-arrow-functions": "^7.2.0",
"@babel/plugin-transform-async-to-generator": "^7.5.0",
"@babel/plugin-transform-block-scoped-functions": "^7.2.0",
"@babel/plugin-transform-block-scoping": "^7.6.0",
"@babel/plugin-transform-block-scoping": "^7.6.2",
"@babel/plugin-transform-classes": "^7.5.5",
"@babel/plugin-transform-computed-properties": "^7.2.0",
"@babel/plugin-transform-destructuring": "^7.6.0",
"@babel/plugin-transform-dotall-regex": "^7.4.4",
"@babel/plugin-transform-dotall-regex": "^7.6.2",
"@babel/plugin-transform-duplicate-keys": "^7.5.0",
"@babel/plugin-transform-exponentiation-operator": "^7.2.0",
"@babel/plugin-transform-for-of": "^7.4.4",
@@ -45,7 +45,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.6.0",
"@babel/plugin-transform-modules-systemjs": "^7.5.0",
"@babel/plugin-transform-modules-umd": "^7.2.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.6.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.6.2",
"@babel/plugin-transform-new-target": "^7.4.4",
"@babel/plugin-transform-object-super": "^7.5.5",
"@babel/plugin-transform-parameters": "^7.4.4",
@@ -53,11 +53,11 @@
"@babel/plugin-transform-regenerator": "^7.4.5",
"@babel/plugin-transform-reserved-words": "^7.2.0",
"@babel/plugin-transform-shorthand-properties": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.0",
"@babel/plugin-transform-spread": "^7.6.2",
"@babel/plugin-transform-sticky-regex": "^7.2.0",
"@babel/plugin-transform-template-literals": "^7.4.4",
"@babel/plugin-transform-typeof-symbol": "^7.2.0",
"@babel/plugin-transform-unicode-regex": "^7.4.4",
"@babel/plugin-transform-unicode-regex": "^7.6.2",
"@babel/types": "^7.6.0",
"browserslist": "^4.6.0",
"core-js-compat": "^3.1.1",
@@ -69,9 +69,9 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/helper-fixtures": "^7.6.0",
"@babel/cli": "^7.6.2",
"@babel/core": "^7.6.2",
"@babel/helper-fixtures": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"caniuse-db": "1.0.30000969",

View File

@@ -1,9 +1,8 @@
import "core-js/modules/es7.string.pad-end";
import "core-js/modules/es7.string.pad-start";
for (const _ref of foo) {
const {
padStart
} = _ref;
for (const {
padStart
} of foo) {
console.log('b'.padEnd(5));
}

View File

@@ -2,9 +2,8 @@ import "core-js/modules/es.array.iterator";
import "core-js/modules/es.string.pad-end";
import "core-js/modules/es.string.pad-start";
for (const _ref of foo) {
const {
padStart
} = _ref;
for (const {
padStart
} of foo) {
console.log('b'.padEnd(5));
}

View File

@@ -1,2 +1,2 @@
/[\0-\uFFFF]/;
/[\s\S]/;
/(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/register",
"version": "7.6.0",
"version": "7.6.2",
"description": "babel require hook",
"license": "MIT",
"publishConfig": {
@@ -23,7 +23,7 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/core": "^7.6.2",
"default-require-extensions": "^2.0.0"
}
}

View File

@@ -6,7 +6,7 @@ let currentOptions;
let sourceMapSupport = false;
const registerFile = require.resolve("../lib/node");
const testFile = require.resolve("./__data__/es2015");
const testFile = require.resolve("./fixtures/babelrc/es2015");
const testFileContent = fs.readFileSync(testFile);
jest.mock("pirates", () => {

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/runtime-corejs2",
"version": "7.6.0",
"version": "7.6.2",
"description": "babel's modular runtime helpers with core-js@2 polyfilling",
"license": "MIT",
"publishConfig": {
@@ -13,6 +13,6 @@
"regenerator-runtime": "^0.13.2"
},
"devDependencies": {
"@babel/helpers": "^7.6.0"
"@babel/helpers": "^7.6.2"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/runtime-corejs3",
"version": "7.6.0",
"version": "7.6.2",
"description": "babel's modular runtime helpers with core-js@3 polyfilling",
"license": "MIT",
"publishConfig": {

Some files were not shown because too many files have changed in this diff Show More