Compare commits

..

26 Commits

Author SHA1 Message Date
Nicolò Ribaudo
c1499b13ac v7.2.2 2018-12-15 10:59:56 +01:00
Nicolò Ribaudo
7bcd62cfee Build standalone on prepublish 2018-12-15 10:52:23 +01:00
Daniel Tschinder
47da5cf75a Correctly transform spreads to use proper concat method (#9108)
* Correctly transform spreads to use proper concat method

* Add tests to ensure array spread clones elements
2018-12-13 23:24:43 -08:00
Vikram Rangaraj
72471aff63 Handle flow comments with leading spaces (#9168)
* check for spaces and tabs before a flow comment

* fix issue with using string index and shift interchangably

* update tests

* Use update charcodes version

* Disallow flow-comments in flow-comments and check for unterminated comments
2018-12-13 22:10:01 -08:00
Patrick Eriksson
b9340bc597 Fix package.json repository URLs (#9176) 2018-12-13 21:15:40 +01:00
Thiago Arrais
731182eee4 Types for pipeline operator (smart proposal) (#9122) 2018-12-13 06:58:58 +01:00
Daniel Tschinder
f4eec5ca79 Add new flag that indicates if a module has exports (#9171) 2018-12-12 21:24:44 -08:00
Nicolò Ribaudo
b60adce4cb Update CHANGELOG.md 2018-12-12 23:56:33 +01:00
Henry Zhu
66c4bc8f64 update list of sponsors [skip ci] 2018-12-12 16:07:49 -05:00
Daniel Tschinder
d2dc28ed2b add triage label to new issues [skip ci] (#9158) 2018-12-12 10:23:54 -08:00
Brian Ng
0514a9f903 Update v7 regression issue template link (#9157) 2018-12-10 12:00:52 -06:00
Nicolò Ribaudo
d1d3c823cc Move decorators transform to @babel/helper-create-class-features-plugin (#9059)
* Move decorators to @babel/plugin-class-features

* Minor refactoring

* Use the new helper package
2018-12-09 12:30:25 +01:00
Nicolò Ribaudo
9b005dedfd Fix --root-mode option in babel-node (#9148) 2018-12-07 22:47:56 +01:00
Rubén Norte
4fdb71151f Inherit properties in function from method in loose mode (#9135) 2018-12-07 15:57:48 +01:00
Brian Ng
f611bb016b Bump Babel deps (#9145) 2018-12-07 08:55:06 -06:00
Kagami Sascha Rosylight
4dff205dc1 Disable parameter-destructuring in Edge 18 (#9140) 2018-12-07 08:14:08 -06:00
Kagami Sascha Rosylight
72fd2d192c Add missing colon to issue template (#9143) 2018-12-07 13:32:36 +01:00
Daniel Tschinder
35815832b5 Move to travis vm based builds (#9133) 2018-12-05 15:02:37 -08:00
Daniel Tschinder
9c45b8faf7 Ensure we always use local versions of babel dependencies in tests (#9132) 2018-12-05 14:14:16 -08:00
Daniel Tschinder
ca2918ab13 Test local version of babel/types 2018-12-05 13:34:36 -08:00
Daniel Tschinder
d915f31bcb Add tests for createTypeAnnotationBasedOnTypeof 2018-12-05 13:24:55 -08:00
Daniel Tschinder
4ca35ef8b9 Fix running flow on travis and update flow (#9128)
* Fix running flow on travis and update flow

- ensure bootstrap is run before running flow as we need some generated files for correctly doing typechecks
- ensure that we only ignore the build directory inside the babel folder as currently we ignore everything because travis checks out into ‘/home/travis/build/’

* Fix all flow errors
2018-12-05 12:30:30 -08:00
Henry Zhu
4b73818c87 Update issue templates [skip ci] (#9131) 2018-12-05 13:58:53 -05:00
Joel Denning
d305419da6 Not depending on return value of super(). Fixes #9020. (#9060)
* Not depending on return value of super(). Fixes #9020.

* Feedback from nicolo-ribaudo

* Feedback -- fixing bad call to replaceWithMultiple
2018-12-04 21:50:17 +01:00
Nicolò Ribaudo
8b132c0889 v7.2.1 2018-12-04 16:21:47 +01:00
Nicolò Ribaudo
b927fb2a7e Don't use isClassPrivateMethod because is isn't supported in <7.2.0 (#9121) 2018-12-04 08:35:10 +01:00
107 changed files with 1653 additions and 873 deletions

View File

@@ -1,11 +1,10 @@
[ignore]
.*/build/.*
.*/packages/.*/lib
.*/packages/.*/test
.*/codemods/.*/lib
.*/codemods/.*/test
.*/node_modules/conventional-changelog-core/
.*/node_modules/module-deps/
<PROJECT_ROOT>/build/.*
<PROJECT_ROOT>/packages/.*/lib
<PROJECT_ROOT>/packages/.*/test
<PROJECT_ROOT>/codemods/.*/lib
<PROJECT_ROOT>/codemods/.*/test
<PROJECT_ROOT>/node_modules/module-deps/
[include]
packages/*/src

View File

@@ -1,6 +1,9 @@
---
name: 🐛 Bug Report
about: If something isn't working as expected 🤔.
name: "\U0001F41B Bug Report"
about: "If something isn't working as expected \U0001F914."
title: ''
labels: 'i: bug, i: needs triage'
assignees: ''
---
@@ -31,7 +34,7 @@ A clear and concise description of what you expected to happen (or code).
- Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34]
- Node/npm version: [e.g. Node 8/npm 5]
- OS: [e.g. OSX 10.13.4, Windows 10]
- Monorepo [e.g. yes/no/Lerna]
- Monorepo: [e.g. yes/no/Lerna]
- How you are using Babel: [e.g. `cli`, `register`, `loader`]
**Possible Solution**

View File

@@ -1,6 +1,9 @@
---
name: 🚀 Feature Request
about: I have a suggestion (and may want to implement it 🙂)!
name: "\U0001F680 Feature Request"
about: "I have a suggestion (and may want to implement it \U0001F642)!"
title: ''
labels: 'i: enhancement, i: needs triage'
assignees: ''
---

View File

@@ -1,12 +1,16 @@
---
name: 💥 v7 Regression
about: Report an unexpected behavior in v7 from v6 (Check the upgrade guide first ✌️)
name: "\U0001F4A5 v7 Regression"
about: Report an unexpected behavior in v7 from v6 (Check the upgrade guide first
✌️)
title: ''
labels: 'i: bug, 7.x: regression, i: needs triage'
assignees: ''
---
# v7 Regression
> First check out: https://new.babeljs.io/docs/en/next/v7-migration.html
> First check out: https://babeljs.io/docs/en/v7-migration
> Also a partial upgrade tool: https://github.com/babel/babel-upgrade
**Potential Commit/PR that introduced the regression**

View File

@@ -1,6 +1,9 @@
---
name: 🤗 Support Question
about: If you have a question 💬, please check out our Slack or StackOverflow!
name: "\U0001F917 Support Question"
about: "If you have a question \U0001F4AC, please check out our Slack or StackOverflow!"
title: ''
labels: 'i: question, i: needs triage'
assignees: ''
---

View File

@@ -1,6 +1,10 @@
---
name: 🤝 Support us on Babel
about: If you would like to support our efforts in maintaining this community-driven project 🙌!
name: "\U0001F91D Support us on Babel"
about: "If you would like to support our efforts in maintaining this community-driven
project \U0001F64C!"
title: ''
labels: ''
assignees: ''
---

View File

@@ -1,6 +1,5 @@
git:
depth: 5
sudo: false
language: node_js
cache:
yarn: true
@@ -20,17 +19,18 @@ before_install:
install:
# the `make test-ci` script runs this command already
- if [ "$JOB" != "test" ]; then yarn install; fi
- if [ "$JOB" != "test" ] && [ "$JOB" != "lint" ]; then yarn install; fi
- if [ "$JOB" = "lint" ]; then make bootstrap; fi
before_script:
- 'if [ "$JOB" = "babel-parser-flow-tests" ]; then make bootstrap-flow; fi'
- 'if [ "$JOB" = "babel-parser-test262-tests" ]; then make bootstrap-test262; fi'
- if [ "$JOB" = "babel-parser-flow-tests" ]; then make bootstrap-flow; fi
- if [ "$JOB" = "babel-parser-test262-tests" ]; then make bootstrap-test262; fi
script:
- 'if [ "$JOB" = "test" ]; then make test-ci; fi'
- 'if [ "$JOB" = "lint" ]; then make lint && make flow; fi'
- 'if [ "$JOB" = "babel-parser-flow-tests" ]; then make test-flow-ci; fi'
- 'if [ "$JOB" = "babel-parser-test262-tests" ]; then make test-test262-ci; fi'
- if [ "$JOB" = "test" ]; then make test-ci; fi
- if [ "$JOB" = "lint" ]; then make lint && make flow; fi
- if [ "$JOB" = "babel-parser-flow-tests" ]; then make test-flow-ci; fi
- if [ "$JOB" = "babel-parser-test262-tests" ]; then make test-test262-ci; fi
matrix:
fast_finish: true

View File

@@ -15,6 +15,164 @@ See [CHANGELOG - v4](/.github/CHANGELOG-v4.md), [CHANGELOG - v5](/.github/CHANGE
See [CHANGELOG - 6to5](/.github/CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0.0-beta.29 version changelog.
## v7.2.1 (2018-12-04)
This release fixes a regression introduced in v7.2.0 (https://github.com/babel/babel/issues/9120)
#### :bug: Bug Fix
* `babel-helper-create-class-features-plugin`
* [#9121](https://github.com/babel/babel/pull/9121) Don't use isClassPrivateMethod because it isn't supported in <7.2.0. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
## v7.2.0 (2018-12-03)
You can read more about this release at https://babeljs.io/blog/2018/12/03/7.2.0.
#### :rocket: New Feature
* `babel-parser`
* [#8289](https://github.com/babel/babel/pull/8289) Implement Smart Pipeline proposal in @babel/parser. ([@mAAdhaTTah](https://github.com/mAAdhaTTah))
* `babel-core`
* [#8986](https://github.com/babel/babel/pull/8986) Export @babel/parser#tokTypes in @babel/core. ([@kaicataldo](https://github.com/kaicataldo))
* `babel-node`
* [#9078](https://github.com/babel/babel/pull/9078) Pass `rootMode` from `@babel/node`.. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg))
* `babel-generator`, `babel-helpers`, `babel-plugin-class-features`, `babel-plugin-proposal-private-methods`, `babel-plugin-syntax-class-properties`, `babel-types`
* [#8654](https://github.com/babel/babel/pull/8654) Private class methods stage 3. ([@tim-mc](https://github.com/tim-mc))
* `babel-preset-env`
* [#9048](https://github.com/babel/babel/pull/9048) Update mappings for node 10 in preset-env. ([@existentialism](https://github.com/existentialism))
#### :bug: Bug Fix
* `babel-parser`
* [#9114](https://github.com/babel/babel/pull/9114) Parse non-octals with leading zeros in non strict mode correctly. ([@danez](https://github.com/danez))
* [#9074](https://github.com/babel/babel/pull/9074) Disallow await inside arrow functions. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* [#9069](https://github.com/babel/babel/pull/9069) [flow] Allow type casts in array patterns inside arrow parameters. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* [#9058](https://github.com/babel/babel/pull/9058) Fix compatibility between typescript and jsx plugins in interface declarations. ([@danez](https://github.com/danez))
* [#9055](https://github.com/babel/babel/pull/9055) Fix bug with parsing TS generic async arrow function. ([@existentialism](https://github.com/existentialism))
* [#9035](https://github.com/babel/babel/pull/9035) Fix parsing typescript function types with destructuring. ([@danez](https://github.com/danez))
* `babel-helper-fixtures`, `babel-parser`
* [#9113](https://github.com/babel/babel/pull/9113) Ignore empty fixture directories and fix fixtures in the parser. ([@danez](https://github.com/danez))
* `babel-preset-env`
* [#9091](https://github.com/babel/babel/pull/9091) Update mapping for regex unicode plugin in preset-env. ([@existentialism](https://github.com/existentialism))
* `babel-plugin-transform-destructuring`
* [#8916](https://github.com/babel/babel/pull/8916) Fix destructuring assignment in arrow functions without block. ([@RubenVerborgh](https://github.com/RubenVerborgh))
* `babel-plugin-proposal-optional-chaining`
* [#9073](https://github.com/babel/babel/pull/9073) Microbouji patch/8136. ([@jridgewell](https://github.com/jridgewell))
* `babel-core`, `babel-helper-wrap-function`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-function-sent`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-classes`
* [#9039](https://github.com/babel/babel/pull/9039) Fix recursive async function expressions. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-core`
* [#9034](https://github.com/babel/babel/pull/9034) Normalize presets before merging config with others.. ([@loganfsmyth](https://github.com/loganfsmyth))
#### :nail_care: Polish
* `babel-generator`
* [#9089](https://github.com/babel/babel/pull/9089) Remove unused variable. ([@Gcaufy](https://github.com/Gcaufy))
* `babel-node`
* [#9079](https://github.com/babel/babel/pull/9079) Move `fs-readdir-recursive` and `output-file-sync` to `devDependencies` for `@babel/node`.. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg))
* `babel-parser`
* [#9046](https://github.com/babel/babel/pull/9046) a better error message for disallowed trailing commas/additional parameters after rest elements in function params. ([@morozRed](https://github.com/morozRed))
* `babel-*`
* [#8769](https://github.com/babel/babel/pull/8769) Add plugins name. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
#### :house: Internal
* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`
* [#9083](https://github.com/babel/babel/pull/9083) Make @babel/plugin-class-features a normal helper package. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* Other
* [#9096](https://github.com/babel/babel/pull/9096) Add node 11 to CI and remove node 9. ([@danez](https://github.com/danez))
* [#9094](https://github.com/babel/babel/pull/9094) Skip minifying standalone in non-publish runs. ([@danez](https://github.com/danez))
* `babel-types`
* [#9093](https://github.com/babel/babel/pull/9093) Fix warning when using prettier in code generators. ([@danez](https://github.com/danez))
* `babel-generator`
* [#9089](https://github.com/babel/babel/pull/9089) Remove unused variable. ([@Gcaufy](https://github.com/Gcaufy))
## v7.1.6 (2018-11-13)
#### :bug: Bug Fix
* `babel-generator`
* [#9003](https://github.com/babel/babel/pull/9003) Fix retainLines regression for arrow functions. ([@loganfsmyth](https://github.com/loganfsmyth))
* `babel-types`
* [#8997](https://github.com/babel/babel/pull/8997) Fix cloneNode with typeAnnotation.. ([@neoziro](https://github.com/neoziro))
* `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-react-jsx`
* [#8701](https://github.com/babel/babel/pull/8701) Fix "TypeError: comments is not iterable". ([@AlicanC](https://github.com/AlicanC))
* `babel-core`
* [#9004](https://github.com/babel/babel/pull/9004) Fix browser files to have the same API as the nodejs ones. ([@danez](https://github.com/danez))
* Other
* [#9007](https://github.com/babel/babel/pull/9007) [Types] fix generated TS/Flow comment types. ([@ljqx](https://github.com/ljqx))
* `babel-preset-env`
* [#8555](https://github.com/babel/babel/pull/8555) preset-env: fix `opera` from `esmodules` target and Browserslist not used. ([@ylemkimon](https://github.com/ylemkimon))
* `babel-plugin-proposal-decorators`, `babel-traverse`
* [#8970](https://github.com/babel/babel/pull/8970) [decorators] Correctly insert `_initialize(this)` after `super()`.. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-parser`
* [#8972](https://github.com/babel/babel/pull/8972) Fix several edge cases with context expression state. ([@danez](https://github.com/danez))
#### :nail_care: Polish
* `babel-parser`
* [#8984](https://github.com/babel/babel/pull/8984) Rename primitive types to reserved types. ([@danez](https://github.com/danez))
#### :house: Internal
* [#8982](https://github.com/babel/babel/pull/8982) fix publish command [skip ci]. ([@hzoo](https://github.com/hzoo))
* [#8988](https://github.com/babel/babel/pull/8988) Remove definition of micromatch which was removed.. ([@danez](https://github.com/danez))
## v7.1.5 (2018-11-06)
#### :eyeglasses: Spec Compliancy
* `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))
#### :rocket: New Feature
* `babel-parser`
* [#8828](https://github.com/babel/babel/pull/8828) Typescript: Validate tuple type element positions. ([@Retsam](https://github.com/Retsam))
* [#8883](https://github.com/babel/babel/pull/8883) [flow] Add support for parsing `_` as implicit instantiation in call/new. ([@jbrown215](https://github.com/jbrown215))
* `babel-core`, `babel-generator`, `babel-parser`, `babel-plugin-syntax-typescript`, `babel-traverse`
* [#8448](https://github.com/babel/babel/pull/8448) Remove Babylon plugins for features already merged to the ECMAScript spec. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-parser`, `babel-types`
* [#8884](https://github.com/babel/babel/pull/8884) [flow] Explicit inexact objects with `...`. ([@jbrown215](https://github.com/jbrown215))
* `babel-preset-env`
* [#8898](https://github.com/babel/babel/pull/8898) Update preset-env data. ([@existentialism](https://github.com/existentialism))
#### :bug: Bug Fix
* `babel-parser`
* [#8956](https://github.com/babel/babel/pull/8956) Do not allow TypeCastExpressions w/o parens . ([@danez](https://github.com/danez))
* [#8954](https://github.com/babel/babel/pull/8954) Allow function types in type params within arrow return types. ([@danez](https://github.com/danez))
* [#8866](https://github.com/babel/babel/pull/8866) Closes [#8865](https://github.com/babel/babel/issues/8865). ([@byronluk](https://github.com/byronluk))
* `babel-core`
* [#8910](https://github.com/babel/babel/pull/8910) Resolve babel.config.js 'babelrcRoots' values relative to the config file.. ([@loganfsmyth](https://github.com/loganfsmyth))
* [#8950](https://github.com/babel/babel/pull/8950) Fix message when plugin of a wrong type is passed. ([@everdimension](https://github.com/everdimension))
* `babel-plugin-transform-block-scoping`
* [#8937](https://github.com/babel/babel/pull/8937) rename colliding let bindings with for loop init. ([@byronluk](https://github.com/byronluk))
* [#8914](https://github.com/babel/babel/pull/8914) Treat break inside block inside loop. ([@thiagoarrais](https://github.com/thiagoarrais))
* `babel-preset-env`
* [#8926](https://github.com/babel/babel/pull/8926) preset-env: Edge support for arrow param destructuring. ([@benmosher](https://github.com/benmosher))
* `babel-generator`
* [#8868](https://github.com/babel/babel/pull/8868) fix single-arg async arrows when retainLines=true. ([@ryanwmarsh](https://github.com/ryanwmarsh))
* `babel-traverse`
* [#8880](https://github.com/babel/babel/pull/8880) fix: Expression x === 'y' && '' should not evaluate to undefined.. ([@Cyp](https://github.com/Cyp))
#### :nail_care: Polish
* [#8873](https://github.com/babel/babel/pull/8873) fixed an extra word. ([@vvyomjjain](https://github.com/vvyomjjain))
## v7.1.4 (2018-10-11)
Just re-published `@babel/traverse` without `**` so that it works in Node 6.
## v7.1.3 (2018-10-11)
#### :bug: Bug Fix
* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types`
* [#8720](https://github.com/babel/babel/pull/8720) Typescript - Tuple elements can be optional. ([@Retsam](https://github.com/Retsam))
* `babel-traverse`
* [#8833](https://github.com/babel/babel/pull/8833) Insertafter jsx fix. ([@kevintab95](https://github.com/kevintab95))
* `babel-parser`
* [#8830](https://github.com/babel/babel/pull/8830) Correct handling of newline after async with paren-less arrow func. ([@Retsam](https://github.com/Retsam))
* [#8756](https://github.com/babel/babel/pull/8756) class private methods and properties: should not allow spaces between # and identifier. ([@macabeus](https://github.com/macabeus))
* [#8804](https://github.com/babel/babel/pull/8804) Fix parsing of slash after class expression. ([@existentialism](https://github.com/existentialism))
* [#8767](https://github.com/babel/babel/pull/8767) [decorators] [typescript] Parse type parameters. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* [#8792](https://github.com/babel/babel/pull/8792) Fix perf issue in typescript parser plugin. ([@matthewrobertson](https://github.com/matthewrobertson))
* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types`
* [#8805](https://github.com/babel/babel/pull/8805) Typescript - Tuples can include rest elements. ([@Retsam](https://github.com/Retsam))
* `babel-types`
* [#8791](https://github.com/babel/babel/pull/8791) types: allow jsxEmptyExpression inside jsxExpressionContainer. ([@tvooo](https://github.com/tvooo))
* `babel-plugin-transform-modules-systemjs`
* [#8820](https://github.com/babel/babel/pull/8820) System module format - fixes function hoisting failure case. ([@guybedford](https://github.com/guybedford))
* `babel-plugin-transform-destructuring`
* [#8793](https://github.com/babel/babel/pull/8793) Ensure destructuring's computed key handling matches object-rest-spread. ([@existentialism](https://github.com/existentialism))
## 7.1.2 (2018-09-28)
Same as v7.1.1, except compiled against Node 6 instead of Node 8 by accident (e.g had `async functions`).

View File

@@ -28,6 +28,12 @@ build-standalone:
build-preset-env-standalone:
./node_modules/.bin/gulp build-babel-preset-env-standalone
prepublish-build-standalone:
BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-standalone
prepublish-build-preset-env-standalone:
BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-preset-env-standalone
build-dist: build
cd packages/babel-polyfill; \
scripts/build-dist.sh
@@ -115,7 +121,7 @@ prepublish-build:
rm -rf packages/babel-runtime/helpers
rm -rf packages/babel-runtime-corejs2/helpers
rm -rf packages/babel-runtime-corejs2/core-js
BABEL_ENV=production IS_PUBLISH=true make build-dist
BABEL_ENV=production make build-dist
make clone-license
prepublish:

View File

@@ -48,35 +48,15 @@ Become a sponsor and get your logo on our README on Github with a link to your s
<a href="https://opencollective.com/babel/sponsor/12/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/13/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/14/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/15/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/16/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/17/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/18/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/19/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/20/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/21/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/22/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/23/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/24/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/25/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/26/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/27/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/28/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/babel/sponsor/29/website" target="_blank"><img src="https://opencollective.com/babel/sponsor/29/avatar.svg"></a>
## Patreon Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://www.patreon.com/henryzhu)]
## Silver
<a href="https://issue.sh/?utm_medium=github&utm_campaign=babel" target="_blank"><img src="https://user-images.githubusercontent.com/5557143/43912065-c8cdff78-9c33-11e8-829a-0b4166ccc215.png"></a>
## Bronze
<a href="http://teamextension.io/" target="_blank"><img src="https://teamextension.io/dist/img/logo/te-logo-compact.png" height="64"></a>
<a href="https://webflow.com/" target="_blank"><img src="https://opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F4a5024b0-8cf2-11e7-b1a2-b30b1de1463c.png&height=64"></a>
<p><a href="https://twitter.com/mikesherov">Mike Sherov</a></p>
## Intro

View File

@@ -1,6 +1,6 @@
{
"lerna": "2.11.0",
"version": "7.2.0",
"version": "7.2.2",
"changelog": {
"repo": "babel/babel",
"cacheDir": ".changelog",

View File

@@ -9,26 +9,26 @@
"test": "make test"
},
"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.6",
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.2.1",
"@babel/plugin-proposal-export-namespace-from": "^7.2.0",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"@babel/preset-flow": "^7.0.0",
"@babel/register": "^7.0.0",
"@babel/runtime": "^7.1.5",
"@babel/runtime": "^7.2.0",
"babel-core": "^7.0.0-0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.4",
"babel-plugin-transform-charcodes": "^0.1.0",
"babel-plugin-transform-charcodes": "^0.1.1",
"browserify": "^16.2.2",
"bundle-collapser": "^1.2.1",
"chalk": "^2.3.2",
"charcodes": "^0.1.0",
"charcodes": "^0.1.1",
"derequire": "^2.0.2",
"enhanced-resolve": "^3.0.0",
"eslint": "^5.9.0",
@@ -36,7 +36,7 @@
"eslint-plugin-flowtype": "^3.2.0",
"eslint-plugin-local-rules": "0.1.0",
"eslint-plugin-prettier": "^3.0.0",
"flow-bin": "^0.82.0",
"flow-bin": "^0.87.0",
"graceful-fs": "^4.1.11",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0",
@@ -124,6 +124,9 @@
"/test/tmp/",
"/test/__data__/",
"<rootDir>/build/"
]
],
"moduleNameMapper": {
"^@babel/([a-zA-Z0-9_-]+)$": "<rootDir>/packages/babel-$1/"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/core",
"version": "7.2.0",
"version": "7.2.2",
"description": "Babel compiler core.",
"main": "lib/index.js",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
@@ -34,12 +34,12 @@
},
"dependencies": {
"@babel/code-frame": "^7.0.0",
"@babel/generator": "^7.2.0",
"@babel/generator": "^7.2.2",
"@babel/helpers": "^7.2.0",
"@babel/parser": "^7.2.0",
"@babel/template": "^7.1.2",
"@babel/traverse": "^7.1.6",
"@babel/types": "^7.2.0",
"@babel/parser": "^7.2.2",
"@babel/template": "^7.2.2",
"@babel/traverse": "^7.2.2",
"@babel/types": "^7.2.2",
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",

View File

@@ -43,6 +43,7 @@ export function makeWeakCache<
>(
handler: (ArgT, CacheConfigurator<SideChannel>) => ResultT,
): (ArgT, SideChannel) => ResultT {
// $FlowIssue https://github.com/facebook/flow/issues/4528
return makeCachedFunction(new WeakMap(), handler);
}
@@ -54,6 +55,7 @@ function makeCachedFunction<
ArgT,
ResultT,
SideChannel,
// $FlowIssue https://github.com/facebook/flow/issues/4528
Cache: CacheMap<ArgT, ResultT, SideChannel>,
>(
callCache: Cache,

View File

@@ -350,7 +350,7 @@ function validateNested(loc: NestingPath, opts: {}) {
NONPRESET_VALIDATORS[key] ||
BABELRC_VALIDATORS[key] ||
ROOT_VALIDATORS[key] ||
throwUnknownError;
(throwUnknownError: Validator<void>);
validator(optLoc, opts[key]);
});

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/generator",
"version": "7.2.0",
"version": "7.2.2",
"description": "Turns an AST into code.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -14,7 +14,7 @@
"lib"
],
"dependencies": {
"@babel/types": "^7.2.0",
"@babel/types": "^7.2.2",
"jsesc": "^2.5.1",
"lodash": "^4.17.10",
"source-map": "^0.5.0",
@@ -22,6 +22,6 @@
},
"devDependencies": {
"@babel/helper-fixtures": "^7.2.0",
"@babel/parser": "^7.2.0"
"@babel/parser": "^7.2.2"
}
}

View File

@@ -151,3 +151,15 @@ export function BigIntLiteral(node: Object) {
}
this.token(node.value);
}
export function PipelineTopicExpression(node: Object) {
this.print(node.expression, node);
}
export function PipelineBareFunction(node: Object) {
this.print(node.callee, node);
}
export function PipelinePrimaryTopicReference() {
this.token("#");
}

View File

@@ -0,0 +1 @@
let result = "hello" |> doubleSay |> text.capitalize |> a.b.exclaim;

View File

@@ -0,0 +1,3 @@
{
"plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"]
}

View File

@@ -0,0 +1 @@
let result = "hello" |> doubleSay |> text.capitalize |> a.b.exclaim;

View File

@@ -0,0 +1,8 @@
value |> # + 1;
value |> 1 + #;
value |> do {
#;
};
value |> do {
if (yes) #;
};

View File

@@ -0,0 +1,3 @@
{
"plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"]
}

View File

@@ -0,0 +1,8 @@
value |> # + 1;
value |> 1 + #;
value |> do {
#;
};
value |> do {
if (yes) #;
};

View File

@@ -1,10 +1,10 @@
{
"name": "@babel/helper-create-class-features-plugin",
"version": "7.2.0",
"version": "7.2.2",
"author": "The Babel Team (https://babeljs.io/team)",
"license": "MIT",
"description": "Compile class public and private fields, private methods and decorators to ES6",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-class-features",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-create-class-features-plugin",
"main": "lib/index.js",
"publishConfig": {
"access": "public"
@@ -24,7 +24,7 @@
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -1,3 +1,154 @@
export function hasDecorators(path) {
return !!(path.node.decorators && path.node.decorators.length);
import { types as t, template } from "@babel/core";
import ReplaceSupers from "@babel/helper-replace-supers";
export function hasOwnDecorators(node) {
return !!(node.decorators && node.decorators.length);
}
export function hasDecorators(node) {
return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators);
}
function prop(key, value) {
if (!value) return null;
return t.objectProperty(t.identifier(key), value);
}
function value(body, params = [], async, generator) {
const method = t.objectMethod("method", t.identifier("value"), params, body);
method.async = !!async;
method.generator = !!generator;
return method;
}
function takeDecorators(node) {
let result;
if (node.decorators && node.decorators.length > 0) {
result = t.arrayExpression(
node.decorators.map(decorator => decorator.expression),
);
}
node.decorators = undefined;
return result;
}
function getKey(node) {
if (node.computed) {
return node.key;
} else if (t.isIdentifier(node.key)) {
return t.stringLiteral(node.key.name);
} else {
return t.stringLiteral(String(node.key.value));
}
}
// NOTE: This function can be easily bound as .bind(file, classRef, superRef)
// to make it easier to use it in a loop.
function extractElementDescriptor(/* this: File, */ classRef, superRef, path) {
const { node, scope } = path;
const isMethod = path.isClassMethod();
if (path.isPrivate()) {
throw path.buildCodeFrameError(
`Private ${
isMethod ? "methods" : "fields"
} in decorated classes are not supported yet.`,
);
}
new ReplaceSupers(
{
methodPath: path,
methodNode: node,
objectRef: classRef,
isStatic: node.static,
superRef,
scope,
file: this,
},
true,
).replace();
const properties = [
prop("kind", t.stringLiteral(isMethod ? node.kind : "field")),
prop("decorators", takeDecorators(node)),
prop("static", node.static && t.booleanLiteral(true)),
prop("key", getKey(node)),
isMethod
? value(node.body, node.params, node.async, node.generator)
: node.value
? value(template.ast`{ return ${node.value} }`)
: prop("value", scope.buildUndefinedNode()),
].filter(Boolean);
path.remove();
return t.objectExpression(properties);
}
function addDecorateHelper(file) {
try {
return file.addHelper("decorate");
} catch (err) {
if (err.code === "BABEL_HELPER_UNKNOWN") {
err.message +=
"\n '@babel/plugin-transform-decorators' in non-legacy mode" +
" requires '@babel/core' version ^7.0.2 and you appear to be using" +
" an older version.";
}
throw err;
}
}
export function buildDecoratedClass(ref, path, elements, file) {
const { node, scope } = path;
const initializeId = scope.generateUidIdentifier("initialize");
const isDeclaration = node.id && path.isDeclaration();
const isStrict = path.isInStrictMode();
const { superClass } = node;
node.type = "ClassDeclaration";
if (!node.id) node.id = t.cloneNode(ref);
let superId;
if (superClass) {
superId = scope.generateUidIdentifierBasedOnNode(node.superClass, "super");
node.superClass = superId;
}
const classDecorators = takeDecorators(node);
const definitions = t.arrayExpression(
elements.map(extractElementDescriptor.bind(file, node.id, superId)),
);
let replacement = template.expression.ast`
${addDecorateHelper(file)}(
${classDecorators || t.nullLiteral()},
function (${initializeId}, ${superClass ? superId : null}) {
${node}
return { F: ${t.cloneNode(node.id)}, d: ${definitions} };
},
${superClass}
)
`;
let classPathDesc = "arguments.1.body.body.0";
if (!isStrict) {
replacement.arguments[1].body.directives.push(
t.directive(t.directiveLiteral("use strict")),
);
}
if (isDeclaration) {
replacement = template.ast`let ${ref} = ${replacement}`;
classPathDesc = "declarations.0.init." + classPathDesc;
}
return {
instanceNodes: [template.statement.ast`${initializeId}(this)`],
wrapClass(path) {
path.replaceWith(replacement);
return path.get(classPathDesc);
},
};
}

View File

@@ -1,4 +1,4 @@
import { hasDecorators } from "./decorators";
import { hasOwnDecorators } from "./decorators";
export const FEATURES = Object.freeze({
//classes: 1 << 0,
@@ -39,17 +39,22 @@ export function isLoose(file, feature) {
}
export function verifyUsedFeatures(path, file) {
if (hasDecorators(path) && !hasFeature(file, FEATURES.decorators)) {
throw path.buildCodeFrameError("Decorators are not enabled.");
if (hasOwnDecorators(path)) {
if (!hasFeature(file, FEATURES.decorators)) {
throw path.buildCodeFrameError("Decorators are not enabled.");
}
if (path.isPrivate()) {
throw path.buildCodeFrameError(
`Private ${
path.isClassMethod() ? "methods" : "fields"
} in decorated classes are not supported yet.`,
);
}
}
if (hasFeature(file, FEATURES.decorators)) {
throw new Error(
"@babel/plugin-class-features doesn't support decorators yet.",
);
}
if (path.isClassPrivateMethod()) {
// NOTE: We can't use path.isPrivateMethod() because it isn't supported in <7.2.0
if (path.isPrivate() && path.isMethod()) {
if (!hasFeature(file, FEATURES.privateMethods)) {
throw path.buildCodeFrameError("Class private methods are not enabled.");
}

View File

@@ -11,8 +11,8 @@ export function buildPrivateNamesMap(props) {
privateNamesMap.set(name, {
id: prop.scope.generateUidIdentifier(name),
static: !!prop.node.static,
method: prop.isClassPrivateMethod(),
methodId: prop.isClassPrivateMethod()
method: prop.isMethod(),
methodId: prop.isMethod()
? prop.scope.generateUidIdentifier(name)
: undefined,
});
@@ -318,37 +318,45 @@ export function buildFieldsInitNodes(
) {
const staticNodes = [];
const instanceNodes = [];
let needsClassRef = false;
for (const prop of props) {
const isStatic = prop.node.static;
const isPrivateField = prop.isClassPrivateProperty();
const isPrivateMethod = prop.isClassPrivateMethod();
const isInstance = !isStatic;
const isPrivate = prop.isPrivate();
const isPublic = !isPrivate;
const isField = prop.isProperty();
const isMethod = !isField;
switch (true) {
case isStatic && isPrivateField && loose:
case isStatic && isPrivate && isField && loose:
needsClassRef = true;
staticNodes.push(
buildPrivateFieldInitLoose(t.cloneNode(ref), prop, privateNamesMap),
);
break;
case isStatic && isPrivateField && !loose:
case isStatic && isPrivate && isField && !loose:
needsClassRef = true;
staticNodes.push(
buildPrivateStaticFieldInitSpec(prop, privateNamesMap),
);
break;
case isStatic && !isPrivateField && loose:
case isStatic && isPublic && isField && loose:
needsClassRef = true;
staticNodes.push(buildPublicFieldInitLoose(t.cloneNode(ref), prop));
break;
case isStatic && !isPrivateField && !loose:
case isStatic && isPublic && isField && !loose:
needsClassRef = true;
staticNodes.push(
buildPublicFieldInitSpec(t.cloneNode(ref), prop, state),
);
break;
case !isStatic && isPrivateField && loose:
case isInstance && isPrivate && isField && loose:
instanceNodes.push(
buildPrivateFieldInitLoose(t.thisExpression(), prop, privateNamesMap),
);
break;
case !isStatic && isPrivateField && !loose:
case isInstance && isPrivate && isField && !loose:
instanceNodes.push(
buildPrivateInstanceFieldInitSpec(
t.thisExpression(),
@@ -357,7 +365,7 @@ export function buildFieldsInitNodes(
),
);
break;
case !isStatic && isPrivateMethod && loose:
case isInstance && isPrivate && isMethod && loose:
instanceNodes.push(
buildPrivateMethodInitLoose(
t.thisExpression(),
@@ -369,7 +377,7 @@ export function buildFieldsInitNodes(
buildPrivateInstanceMethodDeclaration(prop, privateNamesMap),
);
break;
case !isStatic && isPrivateMethod && !loose:
case isInstance && isPrivate && isMethod && !loose:
instanceNodes.push(
buildPrivateInstanceMethodInitSpec(
t.thisExpression(),
@@ -381,10 +389,10 @@ export function buildFieldsInitNodes(
buildPrivateInstanceMethodDeclaration(prop, privateNamesMap),
);
break;
case !isStatic && !isPrivateField && loose:
case isInstance && isPublic && isField && loose:
instanceNodes.push(buildPublicFieldInitLoose(t.thisExpression(), prop));
break;
case !isStatic && !isPrivateField && !loose:
case isInstance && isPublic && isField && !loose:
instanceNodes.push(
buildPublicFieldInitSpec(t.thisExpression(), prop, state),
);
@@ -394,5 +402,27 @@ export function buildFieldsInitNodes(
}
}
return { staticNodes, instanceNodes };
return {
staticNodes,
instanceNodes,
wrapClass(path) {
for (const prop of props) {
prop.remove();
}
if (!needsClassRef) return path;
if (path.isClassExpression()) {
path.scope.push({ id: ref });
path.replaceWith(
t.assignmentExpression("=", t.cloneNode(ref), path.node),
);
} else if (!path.node.id) {
// Anonymous class declaration
path.node.id = ref;
}
return path;
},
};
}

View File

@@ -1,11 +1,16 @@
import nameFunction from "@babel/helper-function-name";
import { types as t } from "@babel/core";
import splitExportDeclaration from "@babel/helper-split-export-declaration";
import {
buildPrivateNamesNodes,
buildPrivateNamesMap,
transformPrivateNamesUsage,
buildFieldsInitNodes,
} from "./fields";
import {
hasOwnDecorators,
buildDecoratedClass,
hasDecorators,
} from "./decorators";
import { injectInitialization, extractComputedKeys } from "./misc";
import {
enableFeature,
@@ -54,7 +59,9 @@ export function createClassFeaturePlugin({
const loose = isLoose(this.file, FEATURES.fields);
let constructor;
let isDecorated = hasOwnDecorators(path.node);
const props = [];
const elements = [];
const computedPaths = [];
const privateNames = new Set();
const body = path.get("body");
@@ -75,14 +82,19 @@ export function createClassFeaturePlugin({
privateNames.add(name);
}
if (path.isProperty() || path.isClassPrivateMethod()) {
props.push(path);
} else if (path.isClassMethod({ kind: "constructor" })) {
if (path.isClassMethod({ kind: "constructor" })) {
constructor = path;
} else {
elements.push(path);
if (path.isProperty() || path.isPrivate()) {
props.push(path);
}
}
if (!isDecorated) isDecorated = hasOwnDecorators(path.node);
}
if (!props.length) return;
if (!props.length && !isDecorated) return;
let ref;
@@ -93,13 +105,9 @@ export function createClassFeaturePlugin({
ref = path.node.id;
}
const keysNodes = extractComputedKeys(
ref,
path,
computedPaths,
this.file,
);
// NODE: These three functions don't support decorators yet,
// but verifyUsedFeatures throws if there are both
// decorators and private fields.
const privateNamesMap = buildPrivateNamesMap(props);
const privateNamesNodes = buildPrivateNamesNodes(
privateNamesMap,
@@ -109,19 +117,34 @@ export function createClassFeaturePlugin({
transformPrivateNamesUsage(ref, path, privateNamesMap, loose, state);
const { staticNodes, instanceNodes } = buildFieldsInitNodes(
ref,
props,
privateNamesMap,
state,
loose,
);
let keysNodes, staticNodes, instanceNodes, wrapClass;
if (isDecorated) {
staticNodes = keysNodes = [];
({ instanceNodes, wrapClass } = buildDecoratedClass(
ref,
path,
elements,
this.file,
));
} else {
keysNodes = extractComputedKeys(ref, path, computedPaths, this.file);
({ staticNodes, instanceNodes, wrapClass } = buildFieldsInitNodes(
ref,
props,
privateNamesMap,
state,
loose,
));
}
if (instanceNodes.length > 0) {
injectInitialization(
path,
constructor,
instanceNodes,
(referenceVisitor, state) => {
if (isDecorated) return;
for (const prop of props) {
if (prop.node.static) continue;
prop.traverse(referenceVisitor, state);
@@ -130,28 +153,7 @@ export function createClassFeaturePlugin({
);
}
for (const prop of props) {
prop.remove();
}
if (
keysNodes.length === 0 &&
staticNodes.length === 0 &&
privateNamesNodes.length === 0
) {
return;
}
if (path.isClassExpression()) {
path.scope.push({ id: ref });
path.replaceWith(
t.assignmentExpression("=", t.cloneNode(ref), path.node),
);
} else if (!path.node.id) {
// Anonymous class declaration
path.node.id = ref;
}
path = wrapClass(path);
path.insertBefore(keysNodes);
path.insertAfter([...privateNamesNodes, ...staticNodes]);
},
@@ -161,6 +163,25 @@ export function createClassFeaturePlugin({
throw path.buildCodeFrameError(`Unknown PrivateName "${path}"`);
},
ExportDefaultDeclaration(path) {
if (this.file.get(versionKey) !== version) return;
const decl = path.get("declaration");
if (decl.isClassDeclaration() && hasDecorators(decl.node)) {
if (decl.node.id) {
// export default class Foo {}
// -->
// class Foo {} export { Foo as default }
splitExportDeclaration(path);
} else {
// Annyms class declarations can be
// transformed as if they were expressions
decl.node.type = "ClassExpression";
}
}
},
},
};
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-module-transforms",
"version": "7.1.0",
"version": "7.2.2",
"description": "Babel helper functions for implementing ES6 module transformations",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -14,8 +14,8 @@
"@babel/helper-module-imports": "^7.0.0",
"@babel/helper-simple-access": "^7.1.0",
"@babel/helper-split-export-declaration": "^7.0.0",
"@babel/template": "^7.1.0",
"@babel/types": "^7.0.0",
"@babel/template": "^7.2.2",
"@babel/types": "^7.2.2",
"lodash": "^4.17.10"
}
}

View File

@@ -8,6 +8,8 @@ export type ModuleMetadata = {
// The name of the variable that will reference an object containing export names.
exportNameListName: null | string,
hasExports: boolean,
// Lookup from local binding to export information.
local: Map<string, LocalExportMetadata>,
@@ -52,18 +54,7 @@ export type LocalExportMetadata = {
* Check if the module has any exports that need handling.
*/
export function hasExports(metadata: ModuleMetadata) {
const { local, source } = metadata;
return (
local.size > 0 ||
Array.from(source).some(([, meta]) => {
return (
meta.reexports.size > 0 ||
meta.reexportNamespace.size > 0 ||
!!meta.reexportAll
);
})
);
return metadata.hasExports;
}
/**
@@ -99,7 +90,10 @@ export default function normalizeModuleAndLoadMetadata(
nameAnonymousExports(programPath);
const { local, source } = getModuleMetadata(programPath, { loose, lazy });
const { local, source, hasExports } = getModuleMetadata(programPath, {
loose,
lazy,
});
removeModuleDeclarations(programPath);
@@ -127,6 +121,7 @@ export default function normalizeModuleAndLoadMetadata(
return {
exportName,
exportNameListName: null,
hasExports,
local,
source,
};
@@ -171,6 +166,7 @@ function getModuleMetadata(
}
return data;
};
let hasExports = false;
programPath.get("body").forEach(child => {
if (child.isImportDeclaration()) {
const data = getData(child.node.source);
@@ -219,6 +215,7 @@ function getModuleMetadata(
}
});
} else if (child.isExportAllDeclaration()) {
hasExports = true;
const data = getData(child.node.source);
if (!data.loc) data.loc = child.node.loc;
@@ -226,6 +223,7 @@ function getModuleMetadata(
loc: child.node.loc,
};
} else if (child.isExportNamedDeclaration() && child.node.source) {
hasExports = true;
const data = getData(child.node.source);
if (!data.loc) data.loc = child.node.loc;
@@ -242,6 +240,11 @@ function getModuleMetadata(
throw exportName.buildCodeFrameError('Illegal export "__esModule".');
}
});
} else if (
child.isExportNamedDeclaration() ||
child.isExportDefaultDeclaration()
) {
hasExports = true;
}
});
@@ -295,6 +298,7 @@ function getModuleMetadata(
}
return {
hasExports,
local: localData,
source: sourceData,
};

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/node",
"version": "7.2.0",
"version": "7.2.2",
"description": "Babel command line",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -29,7 +29,7 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/helper-fixtures": "^7.2.0",
"fs-readdir-recursive": "^1.0.0",
"output-file-sync": "^2.0.0"

View File

@@ -52,7 +52,7 @@ program.option(
"The name of the 'env' to use when loading configs and plugins. " +
"Defaults to the value of BABEL_ENV, or else NODE_ENV, or else 'development'.",
);
commander.option(
program.option(
"--root-mode [mode]",
"The project-root resolution mode. " +
"One of 'root' (the default), 'upward', or 'upward-optional'.",

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/parser",
"version": "7.2.0",
"version": "7.2.2",
"description": "A JavaScript parser",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",

View File

@@ -1759,7 +1759,7 @@ export default class ExpressionParser extends LValParser {
parseArrowExpression(
node: N.ArrowFunctionExpression,
params?: ?(N.Expression[]),
isAsync?: boolean,
isAsync?: boolean = false,
): N.ArrowFunctionExpression {
// if we got there, it's no more "yield in possible arrow parameters";
// it's just "yield in arrow parameters"

View File

@@ -896,9 +896,9 @@ export default class StatementParser extends ExpressionParser {
parseFunction<T: N.NormalFunction>(
node: T,
isStatement: boolean,
allowExpressionBody?: boolean,
isAsync?: boolean,
optionalId?: boolean,
allowExpressionBody?: boolean = false,
isAsync?: boolean = false,
optionalId?: boolean = false,
): T {
const oldInFunc = this.state.inFunction;
const oldInMethod = this.state.inMethod;

View File

@@ -300,7 +300,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
if (node) {
node.type = "Property";
if (node.kind === "method") node.kind = "init";
if (((node: any): N.ClassMethod).kind === "method") node.kind = "init";
node.shorthand = false;
}

View File

@@ -1842,7 +1842,9 @@ export default (superClass: Class<Parser>): Class<Parser> =>
super.assertModuleNodeAllowed(node);
}
parseExport(node: N.ExportNamedDeclaration): N.ExportNamedDeclaration {
parseExport(
node: N.ExportNamedDeclaration | N.ExportAllDeclaration,
): N.ExportNamedDeclaration | N.ExportAllDeclaration {
node = super.parseExport(node);
if (
node.type === "ExportNamedDeclaration" ||
@@ -2695,21 +2697,34 @@ export default (superClass: Class<Parser>): Class<Parser> =>
super.readToken_mult_modulo(code);
}
parseTopLevel(file: N.File, program: N.Program): N.File {
const fileNode = super.parseTopLevel(file, program);
if (this.state.hasFlowComment) {
this.unexpected(null, "Unterminated flow-comment");
}
return fileNode;
}
skipBlockComment(): void {
if (
this.hasPlugin("flow") &&
this.hasPlugin("flowComments") &&
this.skipFlowComment()
) {
if (this.state.hasFlowComment) {
this.unexpected(
null,
"Cannot have a flow comment inside another flow comment",
);
}
this.hasFlowCommentCompletion();
this.state.pos += this.skipFlowComment();
this.state.hasFlowComment = true;
return;
}
let end;
if (this.hasPlugin("flow") && this.state.hasFlowComment) {
end = this.input.indexOf("*-/", (this.state.pos += 2));
const end = this.input.indexOf("*-/", (this.state.pos += 2));
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
this.state.pos = end + 3;
return;
@@ -2719,17 +2734,32 @@ export default (superClass: Class<Parser>): Class<Parser> =>
}
skipFlowComment(): number | boolean {
const ch2 = this.input.charCodeAt(this.state.pos + 2);
const ch3 = this.input.charCodeAt(this.state.pos + 3);
const { pos } = this.state;
let shiftToFirstNonWhiteSpace = 2;
while (
[charCodes.space, charCodes.tab].includes(
this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace),
)
) {
shiftToFirstNonWhiteSpace++;
}
const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
if (ch2 === charCodes.colon && ch3 === charCodes.colon) {
return 4; // check for /*::
return shiftToFirstNonWhiteSpace + 2; // check for /*::
}
if (this.input.slice(this.state.pos + 2, 14) === "flow-include") {
return 14; // check for /*flow-include
if (
this.input.slice(
shiftToFirstNonWhiteSpace + pos,
shiftToFirstNonWhiteSpace + pos + 12,
) === "flow-include"
) {
return shiftToFirstNonWhiteSpace + 12; // check for /*flow-include
}
if (ch2 === charCodes.colon && ch3 !== charCodes.colon) {
return 2; // check for /*:, advance only 2 steps
return shiftToFirstNonWhiteSpace; // check for /*:, advance up to :
}
return false;
}

View File

@@ -140,7 +140,10 @@ export default class State {
// The first yield or await expression inside parenthesized expressions
// and arrow function parameters. It is used to disallow yield and await in
// arrow function parameters.
yieldOrAwaitInPossibleArrowParameters: ?N.YieldExpression;
yieldOrAwaitInPossibleArrowParameters:
| N.YieldExpression
| N.AwaitExpression
| null;
// Token store.
tokens: Array<Token | N.Comment>;

View File

@@ -1,3 +1,4 @@
class MyClass {
/*:: prop: string; */
/* :: foo: number; */
}

View File

@@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 41,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 41,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -32,14 +32,14 @@
{
"type": "ClassDeclaration",
"start": 0,
"end": 41,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -64,14 +64,14 @@
"body": {
"type": "ClassBody",
"start": 14,
"end": 41,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -92,6 +92,22 @@
"column": 23
}
}
},
{
"type": "CommentBlock",
"value": " :: foo: number; ",
"start": 42,
"end": 66,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 26
}
}
}
]
}
@@ -115,6 +131,22 @@
"column": 23
}
}
},
{
"type": "CommentBlock",
"value": " :: foo: number; ",
"start": 42,
"end": 66,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 26
}
}
}
]
}

View File

@@ -1,4 +1,4 @@
/*flow-include
/* flow-include
type Foo = {
foo: number,
bar: boolean,

View File

@@ -1,7 +1,7 @@
{
"type": "File",
"start": 0,
"end": 78,
"end": 79,
"loc": {
"start": {
"line": 1,
@@ -15,7 +15,7 @@
"program": {
"type": "Program",
"start": 0,
"end": 78,
"end": 79,
"loc": {
"start": {
"line": 1,
@@ -33,9 +33,9 @@
"innerComments": [
{
"type": "CommentBlock",
"value": "flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n",
"value": " flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n",
"start": 0,
"end": 78,
"end": 79,
"loc": {
"start": {
"line": 1,
@@ -52,9 +52,9 @@
"comments": [
{
"type": "CommentBlock",
"value": "flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n",
"value": " flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n",
"start": 0,
"end": 78,
"end": 79,
"loc": {
"start": {
"line": 1,

View File

@@ -1,3 +1,4 @@
class MyClass {
/*flow-include prop: string; */
/* flow-include foo: number; */
}

View File

@@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 51,
"end": 90,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 51,
"end": 90,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -32,14 +32,14 @@
{
"type": "ClassDeclaration",
"start": 0,
"end": 51,
"end": 90,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -64,14 +64,14 @@
"body": {
"type": "ClassBody",
"start": 14,
"end": 51,
"end": 90,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -92,6 +92,22 @@
"column": 33
}
}
},
{
"type": "CommentBlock",
"value": " flow-include foo: number; ",
"start": 52,
"end": 88,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 38
}
}
}
]
}
@@ -115,6 +131,22 @@
"column": 33
}
}
},
{
"type": "CommentBlock",
"value": " flow-include foo: number; ",
"start": 52,
"end": 88,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 38
}
}
}
]
}

View File

@@ -1,3 +1,4 @@
class MyClass {
/*:: prop: string; */
/* :: prop: string; */
/* :: prop2: number; */
}

View File

@@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 41,
"end": 74,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 41,
"end": 74,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -32,14 +32,14 @@
{
"type": "ClassDeclaration",
"start": 0,
"end": 41,
"end": 74,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -64,45 +64,45 @@
"body": {
"type": "ClassBody",
"start": 14,
"end": 41,
"end": 74,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
"body": [
{
"type": "ClassProperty",
"start": 23,
"end": 36,
"start": 26,
"end": 39,
"loc": {
"start": {
"line": 2,
"column": 7
"column": 10
},
"end": {
"line": 2,
"column": 20
"column": 23
}
},
"static": false,
"key": {
"type": "Identifier",
"start": 23,
"end": 27,
"start": 26,
"end": 30,
"loc": {
"start": {
"line": 2,
"column": 7
"column": 10
},
"end": {
"line": 2,
"column": 11
"column": 14
},
"identifierName": "prop"
},
@@ -112,30 +112,96 @@
"variance": null,
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 27,
"end": 35,
"start": 30,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 11
"column": 14
},
"end": {
"line": 2,
"column": 19
"column": 22
}
},
"typeAnnotation": {
"type": "StringTypeAnnotation",
"start": 29,
"end": 35,
"start": 32,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 13
"column": 16
},
"end": {
"line": 2,
"column": 22
}
}
}
},
"value": null
},
{
"type": "ClassProperty",
"start": 55,
"end": 69,
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 26
}
},
"static": false,
"key": {
"type": "Identifier",
"start": 55,
"end": 60,
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 17
},
"identifierName": "prop2"
},
"name": "prop2"
},
"computed": false,
"variance": null,
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 60,
"end": 68,
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 25
}
},
"typeAnnotation": {
"type": "NumberTypeAnnotation",
"start": 62,
"end": 68,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 25
}
}
}

View File

@@ -1,4 +1,4 @@
/*flow-include
/* flow-include
type Foo = {
foo: number,
bar: boolean,

View File

@@ -1,7 +1,7 @@
{
"type": "File",
"start": 0,
"end": 78,
"end": 79,
"loc": {
"start": {
"line": 1,
@@ -15,7 +15,7 @@
"program": {
"type": "Program",
"start": 0,
"end": 78,
"end": 79,
"loc": {
"start": {
"line": 1,
@@ -31,8 +31,8 @@
"body": [
{
"type": "TypeAlias",
"start": 15,
"end": 75,
"start": 16,
"end": 76,
"loc": {
"start": {
"line": 2,
@@ -45,8 +45,8 @@
},
"id": {
"type": "Identifier",
"start": 20,
"end": 23,
"start": 21,
"end": 24,
"loc": {
"start": {
"line": 2,
@@ -63,8 +63,8 @@
"typeParameters": null,
"right": {
"type": "ObjectTypeAnnotation",
"start": 26,
"end": 74,
"start": 27,
"end": 75,
"loc": {
"start": {
"line": 2,
@@ -79,8 +79,8 @@
"properties": [
{
"type": "ObjectTypeProperty",
"start": 30,
"end": 41,
"start": 31,
"end": 42,
"loc": {
"start": {
"line": 3,
@@ -93,8 +93,8 @@
},
"key": {
"type": "Identifier",
"start": 30,
"end": 33,
"start": 31,
"end": 34,
"loc": {
"start": {
"line": 3,
@@ -114,8 +114,8 @@
"method": false,
"value": {
"type": "NumberTypeAnnotation",
"start": 35,
"end": 41,
"start": 36,
"end": 42,
"loc": {
"start": {
"line": 3,
@@ -132,8 +132,8 @@
},
{
"type": "ObjectTypeProperty",
"start": 45,
"end": 57,
"start": 46,
"end": 58,
"loc": {
"start": {
"line": 4,
@@ -146,8 +146,8 @@
},
"key": {
"type": "Identifier",
"start": 45,
"end": 48,
"start": 46,
"end": 49,
"loc": {
"start": {
"line": 4,
@@ -167,8 +167,8 @@
"method": false,
"value": {
"type": "BooleanTypeAnnotation",
"start": 50,
"end": 57,
"start": 51,
"end": 58,
"loc": {
"start": {
"line": 4,
@@ -185,8 +185,8 @@
},
{
"type": "ObjectTypeProperty",
"start": 61,
"end": 72,
"start": 62,
"end": 73,
"loc": {
"start": {
"line": 5,
@@ -199,8 +199,8 @@
},
"key": {
"type": "Identifier",
"start": 61,
"end": 64,
"start": 62,
"end": 65,
"loc": {
"start": {
"line": 5,
@@ -220,8 +220,8 @@
"method": false,
"value": {
"type": "StringTypeAnnotation",
"start": 66,
"end": 72,
"start": 67,
"end": 73,
"loc": {
"start": {
"line": 5,

View File

@@ -1,3 +1,4 @@
class MyClass {
/*flow-include prop: string; */
/* flow-include prop: string; */
/* flow-include prop2: number; */
}

View File

@@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 51,
"end": 99,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 51,
"end": 99,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -32,14 +32,14 @@
{
"type": "ClassDeclaration",
"start": 0,
"end": 51,
"end": 99,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
@@ -64,57 +64,154 @@
"body": {
"type": "ClassBody",
"start": 14,
"end": 51,
"end": 99,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 3,
"line": 4,
"column": 1
}
},
"body": [],
"innerComments": [
"body": [
{
"type": "CommentBlock",
"value": "flow-include prop: string; ",
"start": 18,
"end": 49,
"type": "ClassProperty",
"start": 39,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 2
"column": 23
},
"end": {
"line": 2,
"column": 33
"column": 36
}
}
},
"static": false,
"key": {
"type": "Identifier",
"start": 39,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 27
},
"identifierName": "prop"
},
"name": "prop"
},
"computed": false,
"variance": null,
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 43,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 27
},
"end": {
"line": 2,
"column": 35
}
},
"typeAnnotation": {
"type": "StringTypeAnnotation",
"start": 45,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 35
}
}
}
},
"value": null
},
{
"type": "ClassProperty",
"start": 80,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 38
}
},
"static": false,
"key": {
"type": "Identifier",
"start": 80,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 29
},
"identifierName": "prop2"
},
"name": "prop2"
},
"computed": false,
"variance": null,
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 85,
"end": 93,
"loc": {
"start": {
"line": 3,
"column": 29
},
"end": {
"line": 3,
"column": 37
}
},
"typeAnnotation": {
"type": "NumberTypeAnnotation",
"start": 87,
"end": 93,
"loc": {
"start": {
"line": 3,
"column": 31
},
"end": {
"line": 3,
"column": 37
}
}
}
},
"value": null
}
]
}
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "flow-include prop: string; ",
"start": 18,
"end": 49,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 33
}
}
}
]
}
}

View File

@@ -1,3 +1,3 @@
class MyClass {
/*:: prop: string;
/* :: prop: string;
}

View File

@@ -1,4 +1,4 @@
/*flow-include
/* flow-include
type Foo = {
foo: number,
bar: boolean,

View File

@@ -0,0 +1 @@
/*:: /*asd */

View File

@@ -0,0 +1,3 @@
{
"throws": "Unterminated comment (1:5)"
}

View File

@@ -0,0 +1 @@
/*:: //asd */

View File

@@ -0,0 +1,3 @@
{
"throws": "Unterminated flow-comment (1:13)"
}

View File

@@ -0,0 +1 @@
/*:: /*flow-include */

View File

@@ -0,0 +1,3 @@
{
"throws": "Cannot have a flow comment inside another flow comment (1:0)"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-proposal-class-properties",
"version": "7.2.0",
"version": "7.2.1",
"description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties",
"license": "MIT",
@@ -12,7 +12,7 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.2.0",
"@babel/helper-create-class-features-plugin": "^7.2.1",
"@babel/helper-plugin-utils": "^7.0.0"
},
"peerDependencies": {

View File

@@ -1,5 +1,3 @@
var _class;
class MyClass {
constructor() {
var _this = this;
@@ -22,7 +20,7 @@ class MyClass {
var _myAsyncMethod = new WeakMap();
_class = class MyClass2 {
(class MyClass2 {
constructor() {
var _this2 = this;
@@ -40,7 +38,7 @@ _class = class MyClass2 {
});
}
};
});
var _myAsyncMethod2 = new WeakMap();

View File

@@ -1,4 +1,4 @@
var _class, _descriptor, _class2, _Symbol$search, _temp;
var _class, _descriptor, _Symbol$search, _temp;
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
@@ -14,7 +14,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
function dec() {}
let A = (_class = (_temp = (_Symbol$search = Symbol.search, _class2 =
let A = (_class = (_temp = (_Symbol$search = Symbol.search,
/*#__PURE__*/
function () {
"use strict";

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-proposal-decorators",
"version": "7.2.0",
"version": "7.2.2",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"license": "MIT",
"publishConfig": {
@@ -15,16 +15,15 @@
"decorators"
],
"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.2.2",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-replace-supers": "^7.1.0",
"@babel/helper-split-export-declaration": "^7.0.0",
"@babel/plugin-syntax-decorators": "^7.2.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -1,6 +1,11 @@
/* eslint-disable local-rules/plugin-name */
import { declare } from "@babel/helper-plugin-utils";
import syntaxDecorators from "@babel/plugin-syntax-decorators";
import visitor from "./transformer";
import {
createClassFeaturePlugin,
FEATURES,
} from "@babel/helper-create-class-features-plugin";
import legacyVisitor from "./transformer-legacy";
export default declare((api, options) => {
@@ -31,14 +36,26 @@ export default declare((api, options) => {
}
}
return {
name: "proposal-decorators",
inherits: syntaxDecorators,
if (legacy) {
return {
name: "proposal-decorators",
inherits: syntaxDecorators,
manipulateOptions({ generatorOpts }) {
generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
},
visitor: legacyVisitor,
};
}
manipulateOptions({ generatorOpts }) {
return createClassFeaturePlugin({
name: "proposal-decorators",
feature: FEATURES.decorators,
// loose: options.loose, Not supported
manipulateOptions({ generatorOpts, parserOpts }) {
parserOpts.plugins.push(["decorators", { decoratorsBeforeExport }]);
generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
},
visitor: legacy ? legacyVisitor : visitor,
};
});
});

View File

@@ -1,239 +0,0 @@
import { types as t, template } from "@babel/core";
import splitExportDeclaration from "@babel/helper-split-export-declaration";
import ReplaceSupers from "@babel/helper-replace-supers";
function prop(key, value) {
if (!value) return null;
return t.objectProperty(t.identifier(key), value);
}
function value(body, params = [], async, generator) {
const method = t.objectMethod("method", t.identifier("value"), params, body);
method.async = !!async;
method.generator = !!generator;
return method;
}
function hasDecorators({ node }) {
if (node.decorators && node.decorators.length > 0) return true;
const body = node.body.body;
for (let i = 0; i < body.length; i++) {
const method = body[i];
if (method.decorators && method.decorators.length > 0) {
return true;
}
}
return false;
}
function takeDecorators({ node }) {
let result;
if (node.decorators && node.decorators.length > 0) {
result = t.arrayExpression(
node.decorators.map(decorator => decorator.expression),
);
}
node.decorators = undefined;
return result;
}
function getKey(node) {
if (node.computed) {
return node.key;
} else if (t.isIdentifier(node.key)) {
return t.stringLiteral(node.key.name);
} else {
return t.stringLiteral(String(node.key.value));
}
}
function getSingleElementDefinition(path, superRef, classRef, file) {
const { node, scope } = path;
const isMethod = path.isClassMethod();
if (path.isPrivate()) {
throw path.buildCodeFrameError(
`Private ${
isMethod ? "methods" : "fields"
} in decorated classes are not supported yet.`,
);
}
new ReplaceSupers(
{
methodPath: path,
methodNode: node,
objectRef: classRef,
isStatic: node.static,
superRef,
scope,
file,
},
true,
).replace();
const properties = [
prop("kind", t.stringLiteral(isMethod ? node.kind : "field")),
prop("decorators", takeDecorators(path)),
prop("static", node.static && t.booleanLiteral(true)),
prop("key", getKey(node)),
isMethod
? value(node.body, node.params, node.async, node.generator)
: node.value
? value(template.ast`{ return ${node.value} }`)
: prop("value", scope.buildUndefinedNode()),
].filter(Boolean);
return t.objectExpression(properties);
}
function getElementsDefinitions(path, fId, file) {
const elements = [];
for (const p of path.get("body.body")) {
if (!p.isClassMethod({ kind: "constructor" })) {
elements.push(
getSingleElementDefinition(p, path.node.superClass, fId, file),
);
p.remove();
}
}
return t.arrayExpression(elements);
}
function getConstructorPath(path) {
return path
.get("body.body")
.find(path => path.isClassMethod({ kind: "constructor" }));
}
const bareSupersVisitor = {
CallExpression(path, { initializeInstanceElements }) {
if (path.get("callee").isSuper()) {
path.insertAfter(t.cloneNode(initializeInstanceElements));
// Sometimes this path gets requeued (e.g. in (super(), foo)), and
// it leads to infinite recursion.
path.skip();
}
},
Function(path) {
if (!path.isArrowFunctionExpression()) path.skip();
},
};
function insertInitializeInstanceElements(path, initializeInstanceId) {
const isBase = !path.node.superClass;
const initializeInstanceElements = t.callExpression(initializeInstanceId, [
t.thisExpression(),
]);
const constructorPath = getConstructorPath(path);
if (constructorPath) {
if (isBase) {
constructorPath
.get("body")
.unshiftContainer("body", [
t.expressionStatement(initializeInstanceElements),
]);
} else {
constructorPath.traverse(bareSupersVisitor, {
initializeInstanceElements,
});
}
} else {
const constructor = isBase
? t.classMethod(
"constructor",
t.identifier("constructor"),
[],
t.blockStatement([t.expressionStatement(initializeInstanceElements)]),
)
: t.classMethod(
"constructor",
t.identifier("constructor"),
[t.restElement(t.identifier("args"))],
t.blockStatement([
t.expressionStatement(
t.callExpression(t.Super(), [
t.spreadElement(t.identifier("args")),
]),
),
t.expressionStatement(initializeInstanceElements),
]),
);
path.node.body.body.push(constructor);
}
}
function transformClass(path, file) {
const isDeclaration = path.node.id && path.isDeclaration();
const isStrict = path.isInStrictMode();
const { superClass } = path.node;
path.node.type = "ClassDeclaration";
if (!path.node.id) path.node.id = path.scope.generateUidIdentifier("class");
const initializeId = path.scope.generateUidIdentifier("initialize");
const superId =
superClass &&
path.scope.generateUidIdentifierBasedOnNode(path.node.superClass, "super");
if (superClass) path.node.superClass = superId;
const classDecorators = takeDecorators(path);
const definitions = getElementsDefinitions(path, path.node.id, file);
insertInitializeInstanceElements(path, initializeId);
const expr = template.expression.ast`
${addDecorateHelper(file)}(
${classDecorators || t.nullLiteral()},
function (${initializeId}, ${superClass ? superId : null}) {
${path.node}
return { F: ${t.cloneNode(path.node.id)}, d: ${definitions} };
},
${superClass}
)
`;
if (!isStrict) {
expr.arguments[1].body.directives.push(
t.directive(t.directiveLiteral("use strict")),
);
}
return isDeclaration ? template.ast`let ${path.node.id} = ${expr}` : expr;
}
function addDecorateHelper(file) {
try {
return file.addHelper("decorate");
} catch (err) {
if (err.code === "BABEL_HELPER_UNKNOWN") {
err.message +=
"\n '@babel/plugin-transform-decorators' in non-legacy mode" +
" requires '@babel/core' version ^7.0.2 and you appear to be using" +
" an older version.";
}
throw err;
}
}
export default {
ExportDefaultDeclaration(path) {
let decl = path.get("declaration");
if (!decl.isClassDeclaration() || !hasDecorators(decl)) return;
if (decl.node.id) decl = splitExportDeclaration(path);
decl.replaceWith(transformClass(decl, this.file));
},
Class(path) {
if (hasDecorators(path)) {
path.replaceWith(transformClass(path, this.file));
}
},
};

View File

@@ -2,7 +2,7 @@
"name": "@babel/plugin-proposal-nullish-coalescing-operator",
"version": "7.2.0",
"description": "Remove nullish coalescing operator",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-nullish-coalescing-opearator",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-nullish-coalescing-operator",
"license": "MIT",
"publishConfig": {
"access": "public"

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-proposal-private-methods",
"version": "7.2.0",
"version": "7.2.1",
"description": "This plugin transforms private class methods",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-private-methods",
"license": "MIT",
@@ -12,7 +12,7 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.2.0",
"@babel/helper-create-class-features-plugin": "^7.2.1",
"@babel/helper-plugin-utils": "^7.0.0"
},
"peerDependencies": {

View File

@@ -2,7 +2,7 @@
"name": "@babel/plugin-syntax-bigint",
"version": "7.2.0",
"description": "Allow parsing of BigInt literals",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-bigint",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-bigint",
"license": "MIT",
"publishConfig": {
"access": "public"

View File

@@ -15,9 +15,10 @@ class Foo extends function () {} {
};
if (true) {
console.log(_this2 = super(), foo());
console.log((super(), _this2 = this), foo());
} else {
_this2 = super();
super();
_this2 = this;
console.log(foo());
}
}

View File

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

View File

@@ -494,7 +494,8 @@ export default function transformClass(
node.generator,
node.async,
);
func.returnType = node.returnType;
t.inherits(func, node);
const key = t.toComputedKey(node, node.key);
if (t.isStringLiteral(key)) {
func = nameFunction({

View File

@@ -21,7 +21,7 @@ var _ref4 = [a[1], a[0]];
a[0] = _ref4[0];
a[1] = _ref4[1];
var _ref5 = babelHelpers.toConsumableArray(foo).concat([bar]),
var _ref5 = [].concat(babelHelpers.toConsumableArray(foo), [bar]),
a = _ref5[0],
b = _ref5[1];

View File

@@ -18,10 +18,7 @@
"regular expressions",
"dotall"
],
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-dotall-regex.git"
},
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-dotall-regex",
"bugs": "https://github.com/babel/babel/issues",
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",

View File

@@ -2,6 +2,8 @@
var _interopRequireDefault3 = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
var _interopRequireDefault2 = _interopRequireDefault3(require("@babel/runtime/helpers/interopRequireDefault"));
console.log(_interopRequireDefault2.default);

View File

@@ -2,6 +2,10 @@
var _interopRequireDefault3 = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
var _interopRequireDefault2 = _interopRequireDefault3(require("@babel/runtime/helpers/interopRequireDefault"));
console.log(_interopRequireDefault2.default);

View File

@@ -0,0 +1,5 @@
{
"plugins": [
"transform-modules-commonjs"
]
}

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-spread",
"version": "7.2.0",
"version": "7.2.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.0",
"@babel/core": "^7.2.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}

View File

@@ -57,13 +57,29 @@ export default declare((api, options) => {
if (!hasSpread(elements)) return;
const nodes = build(elements, scope);
const first = nodes.shift();
let first = nodes[0];
if (nodes.length === 0 && first !== elements[0].argument) {
// If there is only one element in the ArrayExpression and
// the element was transformed (Array.prototype.slice.call or toConsumableArray)
// we know that the transformed code already takes care of cloning the array.
// So we can simply return that element.
if (nodes.length === 1 && first !== elements[0].argument) {
path.replaceWith(first);
return;
}
// If the first element is a ArrayExpression we can directly call
// concat on it.
// `[..].concat(..)`
// If not then we have to use `[].concat(arr)` and not `arr.concat`
// because `arr` could be extended/modified (e.g. Immutable) and we do not know exactly
// what concat would produce.
if (!t.isArrayExpression(first)) {
first = t.arrayExpression([]);
} else {
nodes.shift();
}
path.replaceWith(
t.callExpression(
t.memberExpression(first, t.identifier("concat")),

View File

@@ -0,0 +1,11 @@
const arr = [];
arr.concat = () => {
throw new Error('Should not be called');
};
let x;
expect(() => {
x = [...arr];
}).not.toThrow();
expect(x).not.toBe(arr);

View File

@@ -0,0 +1,7 @@
const arr = [];
arr.concat = () => {
throw new Error('Should not be called');
};
const x = [...arr];

View File

@@ -0,0 +1,7 @@
const arr = [];
arr.concat = () => {
throw new Error('Should not be called');
};
const x = [].concat(arr);

View File

@@ -0,0 +1,9 @@
// test that toConsumableArray clones the array.
function foo() {
const x = [...arguments];
expect(x).not.toBe(arguments);
}
foo(1,2);

View File

@@ -1 +1 @@
var lyrics = babelHelpers.toConsumableArray(parts).concat(["head", "and", "toes"]);
var lyrics = [].concat(babelHelpers.toConsumableArray(parts), ["head", "and", "toes"]);

View File

@@ -3,5 +3,5 @@ function foo() {
bar[_key] = arguments[_key];
}
return bar.concat();
return [].concat(bar);
}

View File

@@ -0,0 +1,7 @@
// test that toConsumableArray clones the array.
const arr = [];
const foo = () => arr;
const x = [...foo()];
expect(x).not.toBe(arr);

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/preset-env-standalone",
"version": "7.0.0",
"version": "7.2.2",
"description": "Standalone build of babel-prest-env for use in non-Node.js environments.",
"main": "babel-preset-env.js",
"files": [
@@ -12,7 +12,7 @@
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-transform-new-target": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/standalone": "^7.0.0"
"@babel/standalone": "^7.2.2"
},
"keywords": [
"babel",

View File

@@ -0,0 +1,11 @@
// This file is executed by lerna before publishing,
// @babel/preset-env-standalone so that it has the
// new version and not the old one.
require("child_process").execSync(
"make prepublish-build-preset-env-standalone",
{
cwd: require("path").resolve(__dirname, "../../.."),
stdio: "inherit",
}
);

View File

@@ -149,6 +149,7 @@
},
"transform-parameters": {
"chrome": "49",
"edge": "18",
"firefox": "53",
"safari": "10",
"node": "6",
@@ -158,6 +159,7 @@
},
"transform-destructuring": {
"chrome": "51",
"edge": "18",
"firefox": "53",
"safari": "10",
"node": "6.5",

View File

@@ -65,7 +65,7 @@
"@babel/helper-fixtures": "^7.2.0",
"@babel/helper-plugin-test-runner": "^7.0.0",
"caniuse-db": "1.0.30000851",
"compat-table": "kangax/compat-table#29ec2bed5a475b42388866cfc7d24f3f44b12eba",
"compat-table": "kangax/compat-table#7655c84581184806d4f94ef97fbaac7abd5852d8",
"electron-to-chromium": "1.3.79"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/standalone",
"version": "7.2.0",
"version": "7.2.2",
"description": "Standalone build of Babel for use in non-Node.js environments.",
"main": "babel.js",
"files": [
@@ -9,12 +9,12 @@
"src"
],
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.2.0",
"@babel/plugin-proposal-decorators": "^7.2.0",
"@babel/plugin-proposal-decorators": "^7.2.2",
"@babel/plugin-proposal-do-expressions": "^7.2.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-export-namespace-from": "^7.2.0",
@@ -50,7 +50,7 @@
"@babel/plugin-transform-async-to-generator": "^7.2.0",
"@babel/plugin-transform-block-scoped-functions": "^7.2.0",
"@babel/plugin-transform-block-scoping": "^7.2.0",
"@babel/plugin-transform-classes": "^7.2.0",
"@babel/plugin-transform-classes": "^7.2.2",
"@babel/plugin-transform-computed-properties": "^7.2.0",
"@babel/plugin-transform-destructuring": "^7.2.0",
"@babel/plugin-transform-dotall-regex": "^7.2.0",
@@ -86,7 +86,7 @@
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/plugin-transform-shorthand-properties": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.2",
"@babel/plugin-transform-sticky-regex": "^7.2.0",
"@babel/plugin-transform-strict-mode": "^7.2.0",
"@babel/plugin-transform-template-literals": "^7.2.0",

View File

@@ -0,0 +1,7 @@
// This file is executed by lerna before publishing @babel/standalone,
// so that it has the new version and not the old one.
require("child_process").execSync("make prepublish-build-standalone", {
cwd: require("path").resolve(__dirname, "../../.."),
stdio: "inherit",
});

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/template",
"version": "7.1.2",
"version": "7.2.2",
"description": "Generate an AST from a string template.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -12,7 +12,7 @@
"main": "lib/index.js",
"dependencies": {
"@babel/code-frame": "^7.0.0",
"@babel/parser": "^7.1.2",
"@babel/types": "^7.1.2"
"@babel/parser": "^7.2.2",
"@babel/types": "^7.2.2"
}
}

View File

@@ -3,11 +3,11 @@
import * as formatters from "./formatters";
import createTemplateBuilder from "./builder";
export const smart = createTemplateBuilder(formatters.smart);
export const statement = createTemplateBuilder(formatters.statement);
export const statements = createTemplateBuilder(formatters.statements);
export const expression = createTemplateBuilder(formatters.expression);
export const program = createTemplateBuilder(formatters.program);
export const smart = createTemplateBuilder<*>(formatters.smart);
export const statement = createTemplateBuilder<*>(formatters.statement);
export const statements = createTemplateBuilder<*>(formatters.statements);
export const expression = createTemplateBuilder<*>(formatters.expression);
export const program = createTemplateBuilder<*>(formatters.program);
type DefaultTemplateBuilder = typeof smart & {
smart: typeof smart,

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/traverse",
"version": "7.1.6",
"version": "7.2.2",
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -12,11 +12,11 @@
"main": "lib/index.js",
"dependencies": {
"@babel/code-frame": "^7.0.0",
"@babel/generator": "^7.1.6",
"@babel/generator": "^7.2.2",
"@babel/helper-function-name": "^7.1.0",
"@babel/helper-split-export-declaration": "^7.0.0",
"@babel/parser": "^7.1.6",
"@babel/types": "^7.1.6",
"@babel/parser": "^7.2.2",
"@babel/types": "^7.2.2",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.10"

View File

@@ -461,9 +461,14 @@ function getThisBinding(thisEnvFn, inConstructor) {
if (supers.has(child.node)) return;
supers.add(child.node);
child.replaceWith(
t.assignmentExpression("=", t.identifier(thisBinding), child.node),
);
child.replaceWithMultiple([
child.node,
t.assignmentExpression(
"=",
t.identifier(thisBinding),
t.identifier("this"),
),
]);
},
});
});

View File

@@ -82,8 +82,8 @@ describe("arrow function conversion", () => {
() => this;
`,
`
var _supercall = (..._args) => _this = super(..._args),
_this;
var _supercall = (..._args) => (super(..._args), _this = this),
_this;
(function () {
_supercall(345);
@@ -115,9 +115,10 @@ describe("arrow function conversion", () => {
(function () {
_this;
});
_this = super();
super();
_this = this;
this;
() => _this = super();
() => (super(), _this = this);
() => this;
`,
{ methodName: "constructor", extend: true },
@@ -144,9 +145,10 @@ describe("arrow function conversion", () => {
_this;
}).bind(_arrowCheckId);
_this = super();
super();
_this = this;
this;
() => _this = super();
() => (super(), _this = this);
() => this;
`,
{

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/types",
"version": "7.2.0",
"version": "7.2.2",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -14,7 +14,7 @@
"to-fast-properties": "^2.0.0"
},
"devDependencies": {
"@babel/generator": "^7.2.0",
"@babel/parser": "^7.2.0"
"@babel/generator": "^7.2.2",
"@babel/parser": "^7.2.2"
}
}

View File

@@ -675,6 +675,24 @@ export function assertOptionalMemberExpression(
): void {
assert("OptionalMemberExpression", node, opts);
}
export function assertPipelineTopicExpression(
node: Object,
opts?: Object = {},
): void {
assert("PipelineTopicExpression", node, opts);
}
export function assertPipelineBareFunction(
node: Object,
opts?: Object = {},
): void {
assert("PipelineBareFunction", node, opts);
}
export function assertPipelinePrimaryTopicReference(
node: Object,
opts?: Object = {},
): void {
assert("PipelinePrimaryTopicReference", node, opts);
}
export function assertOptionalCallExpression(
node: Object,
opts?: Object = {},

View File

@@ -612,6 +612,18 @@ export function OptionalMemberExpression(...args: Array<any>): Object {
return builder("OptionalMemberExpression", ...args);
}
export { OptionalMemberExpression as optionalMemberExpression };
export function PipelineTopicExpression(...args: Array<any>): Object {
return builder("PipelineTopicExpression", ...args);
}
export { PipelineTopicExpression as pipelineTopicExpression };
export function PipelineBareFunction(...args: Array<any>): Object {
return builder("PipelineBareFunction", ...args);
}
export { PipelineBareFunction as pipelineBareFunction };
export function PipelinePrimaryTopicReference(...args: Array<any>): Object {
return builder("PipelinePrimaryTopicReference", ...args);
}
export { PipelinePrimaryTopicReference as pipelinePrimaryTopicReference };
export function OptionalCallExpression(...args: Array<any>): Object {
return builder("OptionalCallExpression", ...args);
}

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