Compare commits

...

89 Commits

Author SHA1 Message Date
Henry Zhu
f03adbadf4 v7.0.0-beta.47 2018-05-14 17:15:44 -07:00
Henry Zhu
97145ad01e add publishConfig for new packages [skip ci] 2018-05-14 17:12:13 -07:00
Caleb Eby
25810d2609 Fix handling of different JSX pragmas in Typescript (#7878)
Fixes #7631

Before, if a JSX pragma was imported, the import was removed because
it did not think it was used as a value. This changes it so it knows
that the import is being used as a JSX pragma
2018-05-14 15:01:45 -07:00
pravdomil
5f58117790 update @babel/preset-latest docs (#7854) [skip ci] 2018-05-14 14:59:21 -07:00
Logan Smyth
dca2631ef0 Merge pull request #7911 from loganfsmyth/config-babelrcroots
Allow 'babelrc' and 'babelrcRoots' in config files (but not .babelrc/extends)
2018-05-14 10:41:22 -07:00
Nicolò Ribaudo
ba11d9fa7c Update test262 and flow tests (#7925) 2018-05-14 12:26:28 -05:00
Stian Håklev
e06cf20d2e Update babel/core README.md (#7913) [skip ci] 2018-05-14 10:25:53 -07:00
Logan Smyth
df1afa3160 Fix watch bug with output-dir paths. (#7875) 2018-05-13 08:54:04 -05:00
Karl Alnebratt
cec93c01ce Babel-cli update dependencie chokidar (#7853) 2018-05-13 10:58:33 +02:00
Nicolò Ribaudo
0a8367c979 Use the correct Babylon plugins for Test262 tests (#7916) 2018-05-13 10:52:19 +02:00
Mathias Bynens
ac5d2ba984 Update regexpu-core to v4.1.4 (#7917)
Fixes #7891.
2018-05-12 18:46:11 -07:00
Dennis Czombera
040ba2bf53 Remove no longer needed #__PURE__ annotations for taggedTemplateLiteral helper (#7914)
* Remove pure comment annotation

* Update outputs
2018-05-12 15:19:33 +02:00
Logan Smyth
98f0808a22 Ensure the the config file isn't re-processed when users load a partial config and then pass it back to Babel. 2018-05-11 17:49:12 -07:00
Logan Smyth
bdcfb697a6 Use 'babelrc' and 'babelrcRoots' from config file, if not specified. 2018-05-11 17:49:11 -07:00
Logan Smyth
0341d299c8 Validate different file types with different rules. 2018-05-11 16:51:43 -07:00
Logan Smyth
1a7765712e Validate the file before loading chain. 2018-05-11 15:29:28 -07:00
Nicolò Ribaudo
b87c43d894 Update @babel/plugin-codemod-object-assign-to-object-spread version (#7906) 2018-05-11 13:14:17 -04:00
Brian Ng
02c4a28608 Fix typescript decorator test (#7904) 2018-05-10 17:31:38 -05:00
Dennis Czombera
4260ffd7ec Lazy load tagged template literal strings (#7855)
* Lazy load tagged template literal strings

* Update snapshots to reflect lazy loading

* Use pure annotation and remove unnecessary parenthesized expression

* Update snapshots

* Optimize lazy loading by doing assignment within logical expression

* Update snapshots to reflect optimization

* Use re-define function pattern to avoid hitting function size deopts

* Update snapshots to reflect the usage of the redefining function pattern
2018-05-10 14:54:10 -04:00
Nicolò Ribaudo
25c3f0d689 Rename decorators&decorators2 plugins to decorators-legacy&decorators. (#7821)
Reasons:
1) Naming consistency with Babel plugins
2) Sooner or later the decorators2 plugin should become decorators anyway
2018-05-10 20:01:35 +02:00
Brian Ng
21b03c35d3 Fix lint and yarn.lock 2018-05-10 09:22:45 -05:00
Brian Ng
ee1ee0e7ae Clean up and add some additional polyfill mappings in preset-env (#7809) 2018-05-10 09:09:38 -05:00
Willa Wang
73f8059ea0 Fix typo in rewrite-live-references.js (#7896) [skip ci] 2018-05-09 20:30:02 -04:00
Daniel Taveras
70e3454d7a Fix a typo in a babylon flow plugin comment [skip ci] (#7898) 2018-05-09 20:29:22 -04:00
Rocky Meza
9dab691302 Fix typo [skip-ci] (#7897)
Thanks!
2018-05-09 20:28:34 -04:00
Carlos Villavicencio
95fc38cecf Bumped lodash version (#7895)
* Bumped lodash version

* Fixed typo

* Fixed typos

* Revert "Fixed typo"

This reverts commit 06cfe9d4edba0b99257cbffc6dc08ae2f3460d78.

* Revert "Fixed typos"

This reverts commit ec3975c7392df9a0a42682ee4f32eadd2615c69c.

* Fixed json typos
2018-05-09 15:47:52 -07:00
Michael Mantel
84e76e2d49 TypeScript: Allow non-null and type assertions as lvalues. (Fixes #7638) (#7888) 2018-05-09 16:45:50 -05:00
Sven SAULEAU
0d9eef4750 Merge pull request #7893 from aaronabramov/patch-1
fix typo in a comment
2018-05-09 18:30:59 +02:00
Sven SAULEAU
d2ed7bbc8d Update output.js 2018-05-09 18:21:14 +02:00
Aaron Abramov
5b5ac1f366 fix typo in a comment
as title
2018-05-09 12:09:45 -04:00
Tim Seckinger
fa1547d8f8 fix(transform-typescript): do not elide injected imports (#7833) 2018-05-09 10:05:29 -05:00
Brian Ng
b42b21f25c Fix bug with handling minor versions when parsing compat-data (#7884) 2018-05-08 10:52:44 -05:00
Brian Ng
6dca0ff9bf Improve useBuiltIns: usage mappins in preset-env (#7810) 2018-05-07 11:45:09 -05:00
Henry Zhu
3e9b59c0f1 reorg lock yml [skip ci] 2018-05-07 11:28:25 -04:00
Henry Zhu
3f6c475aae update patreon sponsors [skip ci] 2018-05-07 11:04:05 -04:00
Henry Zhu
5c31e501d7 update issue templates [skip ci] 2018-05-04 09:40:18 -07:00
Henry Zhu
ed6b4e0e40 fix line endings [skip ci] 2018-05-04 09:37:42 -07:00
Henry Zhu
8615b6fe57 Support issue template [skip ci] (#7863) 2018-05-03 16:45:00 -07:00
Henry Zhu
95fa5a66b1 issue templates [skip ci] (#7862) 2018-05-03 15:09:25 -07:00
Henry Zhu
c94355c1c9 update issue templates [skip ci] (#7861) 2018-05-03 15:00:33 -07:00
Henry Zhu
839bf68d1f [skip ci] 2018-05-03 14:44:19 -07:00
Henry Zhu
8198b1b334 lock old issues only (temporary) [skip ci] 2018-05-03 14:26:58 -07:00
Brian Ng
d608535719 Allow parsing of decorators with TypeScript abstract classes (#7850)
* Allow parsing of decorators with TypeScript abstract classes

* avoid lookahead
2018-05-02 13:49:46 -05:00
Brian Ng
0353ce9ed5 Disallow flow type parameter defaults in some cases 2018-05-02 08:56:54 -05:00
Brian Ng
65ca968f8b Allow static? as identifier in ObjectTypeProperty 2018-05-02 08:56:54 -05:00
Brian Ng
77445cb044 Enable dynamicImport plugin for flow tests 2018-05-02 08:56:54 -05:00
Brian Ng
7c4509e280 Retry flow tests in script mode only if it is supposed to succeed 2018-05-02 08:56:54 -05:00
Henry Zhu
87ae286bc3 changed to 3 months of no-activity on a closed issue [skip ci] 2018-05-01 22:33:37 -07:00
Henry Zhu
9c1b3e8dc1 Add support/regression issue templates [skip ci] (#7851) 2018-05-01 22:06:11 -07:00
Henry Zhu
39d07638cf remove custom [skip ci] 2018-05-01 20:48:55 -07:00
Henry Zhu
e887eecda4 Update issue templates [skip ci] 2018-05-01 20:47:02 -07:00
Logan Smyth
a3e622ad15 Fix inputSourcemapMerge when no JS content is output. 2018-05-01 20:31:29 -07:00
Hana Shiro
494a56df5f Unify main property in package.json [skip ci] (#7825) 2018-05-01 09:15:02 -07:00
Michael Mantel
8060ae5dae Improve README's for several plugins. [skip ci] (#7844) 2018-05-01 10:24:53 -05:00
Henry Zhu
bd4ebc11c1 add a label when locking old issues [skip ci] 2018-05-01 07:16:26 -07:00
Henry Zhu
80cefaff2f add lock bot for old closed issues [skip ci] (#7839) 2018-04-30 22:28:23 -07:00
Brian Ng
e9d5073af1 Remove duplicate text in browserslist rec inside preset-env [skip ci] 2018-04-30 17:01:34 -05:00
Andrey Sitnik
c8fb48ffd6 Change babel-preset-env docs according Browserslist best practices (#7835) 2018-04-30 16:25:32 -05:00
jugglinmike
55ef39eb87 Correct typo [skip ci] (#7834) 2018-04-28 15:48:53 -07:00
Andrey Sitnik
91e1e1728c Use queries according Browserslist Best Practices (#7828) [skip ci] 2018-04-27 18:50:26 -04:00
Logan Smyth
acf509bab5 Upgrade Babel to self-host with beta.46 (#7784) 2018-04-27 15:04:37 -07:00
James DiGioia
4f312f5739 Add syntax error test for arrow w/ paren'd args 2018-04-27 23:15:21 +02:00
James DiGioia
696f84468e Add test for params w/ parens around them 2018-04-27 23:15:21 +02:00
James DiGioia
71fd37067e Avoid lookahead when parsing pipeline
The error message is worse, but it is much more performant.
2018-04-27 23:15:21 +02:00
James DiGioia
7142a79eb9 Bring pipelineOperator flag in line with minimal
The minimal proposal requires parentheses around arrow functions
and bans await from the pipeline.
2018-04-27 23:15:21 +02:00
Renée Kooi
1a6855eff2 Fix default sourceFileName. (#7764)
* Fix default sourceFileName.

This deals with a problem mentioned in [babel/babelify#255][0]. I'm not
super sure about the implications, but it seems this may have been a
regression from Babel 6.

In babel@6, the default `sourceFileName` was the basename of the input
file:

```js
require('babel-core').transform('var a = 10', {
  filename: __filename,
  sourceMaps: true
}).map
// { version: 3,
//   sources: [ 'index.js' ],
//   names: [ 'a' ],
//   mappings: 'AAAA,IAAIA,IAAI,EAAR',
//   file: 'index.js',
//   sourcesContent: [ 'var a = 10' ] } }
```

Currently however, the full file path is used:

```js
require('@babel/core').transformSync('var a = 10', {
  filename: __filename,
  sourceMaps: true
}).map
// { version: 3,
//   sources: [ '/home/goto-bus-stop/Code/babel/repro-babelify-255/index.js' ],
//   names: [ 'a' ],
//   mappings: 'AAAA,IAAIA,IAAI,EAAR',
//   file: '/home/goto-bus-stop/Code/babel/repro-babelify-255/index.js',
//   sourcesContent: [ 'var a = 10' ] } }
```

This patch adds the `path.basename()` call that [Babel 6 used][1] to
@babel/core's default options, so it's the same as back then.

```js
require('../babel/packages/babel-core').transform('var a = 10', {
  filename: __filename,
  sourceMaps: true
}).map
// { version: 3,
//   sources: [ 'index.js' ],
//   names: [ 'a' ],
//   mappings: 'AAAA,IAAIA,IAAI,EAAR',
//   sourcesContent: [ 'var a = 10' ] }
```

This is the desired behaviour for browserify at least, as it expects
relative paths in the source maps and rebases them to a root directory
when generating the final source map.

[0]: https://github.com/babel/babelify/pull/255
[1]: 6689d2d23c/packages/babel-core/src/transformation/file/index.js (L163-L172)

* Use cwd-relative path for sourceFileName.

* Revert sourceMap `file` property change.

* fixup! Revert sourceMap `file` property change.

* Fix whitespace change from merge conflict

* Revert to using basename in source map outputs.
2018-04-27 13:28:23 -07:00
Michael Mantel
1de36948ac Expand README for plugin-transform-instanceof [skip ci] (#7827) 2018-04-27 15:21:09 -05:00
Hana Shiro
b28ffedead Fix configuration of lerna-changelog (#7803) [skip ci] 2018-04-26 22:52:02 -04:00
Michael McGlynn
a5edab7393 Change const to var inside helper 2018-04-26 23:33:12 +02:00
Justin Ridgewell
725e6a01c0 Don't fold class property calls (#7814)
This undoes the property call folding from #6656.

It complicates the private property transforms, since they boil down to `map.set(this, vlaue)` and we definitely don't want the next call define a property on the map.

/cc @Andarist
2018-04-26 15:06:18 -05:00
Evan You
224ce38882 fix(preset-stage-3): pass along loose flag to proposal-object-rest-spread (#7819) 2018-04-26 11:04:34 -05:00
Justin Ridgewell
8c46fd159f Class Props: Don't rename constructor collisions with static props (#7813)
Static props aren't evaluated inside the constructor, so there can't be a collision.
2018-04-25 23:45:52 -04:00
Brian Ng
47201db61e Bump compat-table for preset-env (#7808) 2018-04-25 16:23:49 -05:00
Logan Smyth
138d60922c Merge pull request #7761 from loganfsmyth/bad-map-merge
Reimplement input sourcemap merging using range matching instead of closest-position matching
2018-04-25 12:29:19 -07:00
Logan Smyth
cfb386ff03 Reimplement input sourcemap merging. 2018-04-25 12:02:05 -07:00
Logan Smyth
9e7fe0ab49 Add type definitions for source-map library. 2018-04-25 12:02:05 -07:00
Logan Smyth
e31e907d5f Split sourcemap merging logic into its own file. 2018-04-25 12:02:05 -07:00
Logan Smyth
4da4728bf5 Add an example of an extremely bad sourcemap merge. 2018-04-25 12:02:05 -07:00
Brian Ng
0112479ba9 Upgrade to gulp@4 (#7811) 2018-04-25 15:01:35 -04:00
Brian Ng
408124438a Update shippedProposals in preset-env docs [skip ci] (#7807) 2018-04-25 09:16:03 -05:00
chocolateboy
eab4c0e93e Fix typo [skip ci] (#7805) 2018-04-25 09:06:12 -05:00
Lars Willighagen
d06bf993db Change SO link to HTTPS
Since SO supports HTTPS now.
2018-04-25 11:53:15 +02:00
Henry Zhu
1076018c4c Internal: compile with loose to object rest/spread (#7794) 2018-04-24 10:41:05 -04:00
Henry Zhu
07ff8f30f5 preset-env update targets recommendation [skip ci] (#7790) 2018-04-24 10:33:52 -04:00
Hana Shiro
e6ba0ab82c Fix indent in .travis.yml (#7792) 2018-04-24 08:47:20 -05:00
Justin Ridgewell
2afe9404fe Use Object Spread Syntax (#7777)
* Use Object Spread Syntax

* Nits
2018-04-23 21:44:27 -04:00
Henry Zhu
037fee8ffb Target Node 6 in production (#7782) 2018-04-23 17:20:48 -04:00
Logan Smyth
3a2aa9b862 v7.0.0-beta.46 2018-04-22 21:29:42 -07:00
Logan Smyth
c8b57f777a Ensure that the internal plugin load does not read the user's config. (#7783) 2018-04-22 20:32:52 -07:00
418 changed files with 8257 additions and 5852 deletions

View File

@@ -1,5 +0,0 @@
# Ensure babel-register won't compile fixtures, or try to recompile compiled code.
packages/*/test/fixtures
packages/*/lib
packages/babel-standalone/babel.js
packages/babel-preset-env-standalone/babel-preset-env.js

View File

@@ -1,63 +1,6 @@
<!---
Thanks for filing an issue 😄 ! Before you submit, please read the following:
Check the other issue templates if you are trying to submit a bug report, feature request, or question
Search open/closed issues before submitting since someone might have asked the same thing before!
If you have a support request or question please submit them to one of this resources:
* Slack Community: https://babeljs.slack.com (you can sign-up at https://slack.babeljs.io/ for an invite)
* StackOverflow: http://stackoverflow.com/questions/tagged/babeljs using the tag `babeljs`
* Also have a look at the readme for more information on how to get support:
https://github.com/babel/babel/blob/master/README.md
Issues on GitHub are only related to problems of Babel itself and we cannot answer
support questions here.
-->
Choose one: is this a bug report or feature request?
<!--- Provide a general summary of the issue in the title above -->
### Input Code
<!--- If you're describing a bug, please let us know which sample code reproduces your problem -->
<!--- If you have link to our REPL or a standalone repo please link that! -->
```js
var your => (code) => here;
```
### Babel/Babylon Configuration (.babelrc, package.json, cli command)
<!--- If describing a bug, tell us what your babel configuration looks like -->
```js
{
"your": { "config": "here" }
}
```
### Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
### Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
### Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
### Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
### Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
| software | version(s)
| ---------------- | -------
| Babel |
| Babylon | <!-- This is only needed if you are using Babylon directly -->
| node |
| npm |
| Operating System |

41
.github/ISSUE_TEMPLATE/Bug_report.md vendored Normal file
View File

@@ -0,0 +1,41 @@
---
name: 🐛 Bug Report
about: If something isn't working as expected 🤔.
---
## Bug Report
**Current Behavior**
A clear and concise description of the behavior.
**Input Code**
- REPL or Repo link if applicable:
```js
var your => (code) => here;
```
**Expected behavior/code**
A clear and concise description of what you expected to happen (or code).
**Babel Configuration (.babelrc, package.json, cli command)**
```js
{
"your": { "config": "here" }
}
```
**Environment**
- 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]
- How you are using Babel: [e.g. `cli`, `register`, `loader`]
**Possible Solution**
<!--- Only if you have suggestions on a fix for the bug -->
**Additional context/Screenshots**
Add any other context about the problem here. If applicable, add screenshots to help explain.

View File

@@ -0,0 +1,20 @@
---
name: 🚀 Feature Request
about: I have a suggestion (and may want to implement it 🙂)!
---
## Feature Request
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I have an issue when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen. Add any considered drawbacks.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Teachability, Documentation, Adoption, Migration Strategy**
If you can, explain how users will be able to use this and possibly write out a version the docs.
Maybe a screenshot or design?

41
.github/ISSUE_TEMPLATE/Regression-v7.md vendored Normal file
View File

@@ -0,0 +1,41 @@
---
name: 💥 v7 Regression
about: Report an unexpected behavior in v7 from v6 (Check the upgrade guide first ✌️)
---
# v7 Regression
> First check out: https://new.babeljs.io/docs/en/next/v7-migration.html
> Also a partial upgrade tool: https://github.com/babel/babel-upgrade
**Potential Commit/PR that introduced the regression**
If you have time to investigate, what PR/date introduced this issue.
**Describe the regression**
A clear and concise description of what the regression is.
**Input Code**
<!--- If you have link to our REPL or a standalone repo please link that! -->
```js
var your => (code) => here;
```
**Babel Configuration (.babelrc, package.json, cli command)**
```js
{
"your": { "config": "here" }
}
```
**Expected behavior/code**
A clear and concise description of what you expected to happen (or code).
**Environment**
- 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]
- How you are using Babel: [e.g. `cli`, `register`, `loader`]

View File

@@ -0,0 +1,16 @@
---
name: 🤗 Support Question
about: If you have a question 💬, please check out our Slack or StackOverflow!
---
--------------^ Click "Preview" for a nicer view!
We primarily use GitHub as an issue tracker; for usage and support questions, please check out these resources below. Thanks! 😁.
---
* Slack Community Chat: https://babeljs.slack.com (you can sign-up at https://slack.babeljs.io/ for an invite)
* StackOverflow: https://stackoverflow.com/questions/tagged/babeljs using the tag `babeljs`
* Twitter: If it's just a quick question you can ping our Twitter: https://twitter.com/babeljs
* Also have a look at the readme for more information on how to get support:
https://github.com/babel/babel/blob/master/README.md

24
.github/ISSUE_TEMPLATE/Support_us.md vendored Normal file
View File

@@ -0,0 +1,24 @@
---
name: 🤝 Support us on Babel
about: If you would like to support our efforts in maintaining this community-driven project 🙌!
---
--------------^ Click "Preview" for a nicer view!
> Open Collective: https://opencollective.com/babel
> Henry's Patreon: https://www.patreon.com/henryzhu
Help support Babel!
Babel has always been a community project, not really backed or owned by any single (or group) of companies. While some maintainers used to work at Facebook (and Henry at Adobe) no one was working on it full time and there certainly isn't a huge company or team anywhere doing all this work.
---
As a group of volunteers you can help us in a few ways
- Giving developer time on the project. (Message us on [Twitter](https://twitter.com/babeljs) or [Slack](https://slack.babeljs.io/) for guidance). Companies should be paying their employees to contribute back to the open source projects they use everyday.
- Giving funds by becoming one of our sponsors/donators!
If you'd like to sustain the future of the project as a whole, we have an [Open Collective](https://opencollective.com/babel) that you can donate to. This is a way for funds to be allocated to the core team.
You can also support [Henry](https://github.com/hzoo) directly since I [left my job to work on Babel and Open Source full time](https://twitter.com/left_pad/status/969793227862790144) at my [Patreon](https://www.patreon.com/henryzhu).

12
.github/lock.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# Configuration for lock-threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 91
# Comment to post before locking. Set to `false` to disable
lockComment: false
only: issues
lockLabel: 'outdated'
# Issues or pull requests with these labels will not be locked
# exemptLabels:
# - no-locking

1
.gitignore vendored
View File

@@ -44,3 +44,4 @@ packages/babel-preset-env-standalone/babel-preset-env.min.js
/codemods/*/node_modules
/packages/babylon/build
.idea/
/.changelog

View File

@@ -1 +1,2 @@
package.json
packages/babel-preset-env/data

View File

@@ -5,7 +5,7 @@ language: node_js
cache:
yarn: true
directories:
- node_modules
- node_modules
node_js:
# We test the latest version on circleci
- '8'

View File

@@ -5,7 +5,7 @@ const through = require("through2");
const chalk = require("chalk");
const newer = require("gulp-newer");
const babel = require("gulp-babel");
const watch = require("gulp-watch");
const gulpWatch = require("gulp-watch");
const gutil = require("gulp-util");
const filter = require("gulp-filter");
const gulp = require("gulp");
@@ -99,8 +99,6 @@ function buildRollup(packages) {
plugins: [
rollupBabel({
envName: "babylon",
babelrc: false,
extends: "./.babelrc.js",
}),
rollupNodeResolve(),
],
@@ -114,21 +112,26 @@ function buildRollup(packages) {
);
}
gulp.task("default", ["build"]);
gulp.task("build", function() {
const bundles = ["packages/babylon"];
return merge([buildBabel(/* exclude */ bundles), buildRollup(bundles)]);
});
gulp.task("default", gulp.series("build"));
gulp.task("build-no-bundle", () => buildBabel());
gulp.task("watch", ["build-no-bundle"], function() {
watch(sources.map(getGlobFromSource), { debounceDelay: 200 }, function() {
gulp.start("build-no-bundle");
});
});
gulp.task(
"watch",
gulp.series("build-no-bundle", function watch() {
gulpWatch(
sources.map(getGlobFromSource),
{ debounceDelay: 200 },
gulp.task("build-no-bundle")
);
})
);
registerStandalonePackageTask(
gulp,

View File

@@ -1,6 +1,6 @@
MAKEFLAGS = -j1
FLOW_COMMIT = f193e19cf2185006ea9139bb0e71f31ea93e7b72
TEST262_COMMIT = 52f70e2f637731aae92a9c9a2d831310c3ab2e1e
FLOW_COMMIT = 395e045c18d537fcbbc552a96ef2cdcd70b4ab52
TEST262_COMMIT = 40883f4c6ae17e073dfd03e34f73a6bf8c855595
# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
export FORCE_COLOR = true
@@ -134,6 +134,7 @@ clean-lib:
clean-all:
rm -rf node_modules
rm -rf package-lock.json
rm -rf .changelog
$(foreach source, $(SOURCES), \
$(call clean-source-all, $(source)))

View File

@@ -68,11 +68,6 @@ Become a sponsor and get your logo on our README on Github with a link to your s
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)]
## Gold
<a href="https://vueschool.io/?babel" target="_blank"><img src="http://new.babeljs.io/img/sponsors/vueschool.png" height="64"></a>
<a href="https://devrant.com/?babel" target="_blank"><img src="http://new.babeljs.io/img/sponsors/devRant.png" height="64"></a>
## Bronze
<a href="http://teamextension.io/" target="_blank"><img src="https://teamextension.io/dist/img/logo/te-logo-compact.png" height="64"></a>

View File

@@ -12,15 +12,20 @@ module.exports = function(api) {
};
let convertESM = true;
let ignoreLib = true;
switch (env) {
// Configs used during bundling builds.
case "babylon":
case "standalone":
convertESM = false;
ignoreLib = false;
break;
case "production":
// Config during builds before publish.
envOpts.targets = {
node: 6,
};
break;
case "development":
envOpts.debug = true;
@@ -37,6 +42,15 @@ module.exports = function(api) {
const config = {
comments: false,
ignore: [
// These may not be strictly necessary with the newly-limited scope of
// babelrc searching, but including them for now because we had them
// in our .babelignore before.
"packages/*/test/fixtures",
ignoreLib ? "packages/*/lib" : null,
"packages/babel-standalone/babel.js",
"packages/babel-preset-env-standalone/babel-preset-env.js",
].filter(Boolean),
presets: [["@babel/env", envOpts]],
plugins: [
// TODO: Use @babel/preset-flow when
@@ -45,7 +59,10 @@ module.exports = function(api) {
["@babel/proposal-class-properties", { loose: true }],
"@babel/proposal-export-namespace-from",
"@babel/proposal-numeric-separator",
["@babel/proposal-object-rest-spread", { useBuiltIns: true }],
[
"@babel/proposal-object-rest-spread",
{ useBuiltIns: true, loose: true },
],
// Explicitly use the lazy version of CommonJS modules.
convertESM ? ["@babel/transform-modules-commonjs", { lazy: true }] : null,

View File

@@ -0,0 +1,3 @@
src
test
*.log

View File

@@ -0,0 +1,57 @@
# @babel/plugin-codemod-object-assign-to-object-spread
Transforms old code that uses `Object.assign` with an Object Literal as
the first param to use Object Spread syntax.
## Examples
```js
const obj = Object.assign({
test1: 1,
}, other, {
test2: 2,
}, other2);
```
Is transformed to:
```js
const obj = {
test1: 1,
...other,
test2: 2,
...other2,
};
```
## Installation
```sh
npm install --save-dev @babel/plugin-codemod-object-assign-to-object-spread
```
## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["@babel/plugin-codemod-object-assign-to-object-spread"]
}
```
### Via CLI
```sh
babel --plugins @babel/plugin-codemod-object-assign-to-object-spread script.js
```
### Via Node API
```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-codemod-object-assign-to-object-spread"]
});
```

View File

@@ -0,0 +1,25 @@
{
"name": "@babel/plugin-codemod-object-assign-to-object-spread",
"version": "7.0.0-beta.47",
"description": "Transforms Object.assign into object spread syntax",
"repository": "https://github.com/babel/babel/tree/master/codemods/babel-plugin-codemod-object-assign-to-object-spread",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
"@babel/codemod",
"@babel/plugin"
],
"dependencies": {
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.47"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.47"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.47",
"@babel/helper-plugin-test-runner": "7.0.0-beta.47"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,35 @@
import syntaxObjectRestSpread from "@babel/plugin-syntax-object-rest-spread";
export default function({ types: t }) {
return {
inherits: syntaxObjectRestSpread,
visitor: {
CallExpression(path) {
if (!path.get("callee").matchesPattern("Object.assign")) return;
const args = path.get("arguments");
if (args.length === 0) return;
const [objPath] = args;
if (!objPath.isObjectExpression()) return;
const obj = objPath.node;
const { properties } = obj;
for (let i = 1; i < args.length; i++) {
const arg = args[i];
const { node } = arg;
if (arg.isObjectExpression()) {
properties.push(...node.properties);
} else {
properties.push(t.spreadElement(node));
}
}
path.replaceWith(obj);
},
},
};
}

View File

@@ -0,0 +1 @@
Object.assign({test: 1}, test2, {test: 2}, test3);

View File

@@ -0,0 +1,3 @@
{
"plugins": ["../../../../lib"]
}

View File

@@ -0,0 +1,6 @@
({
test: 1,
...test2,
test: 2,
...test3
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["../../../../lib"]
}

View File

@@ -0,0 +1,3 @@
import runner from "@babel/helper-plugin-test-runner";
runner(__dirname);

View File

@@ -1,21 +1,22 @@
{
"name": "@babel/plugin-codemod-optional-catch-binding",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Remove unused catch bindings",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-remove-unused-catch-binding",
"repository": "https://github.com/babel/babel/tree/master/codemods/babel-plugin-codemod-remove-unused-catch-binding",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
"@babel/codemod",
"@babel/plugin"
],
"dependencies": {
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.45"
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.47"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.45"
"@babel/core": "7.0.0-beta.47"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.45",
"@babel/helper-plugin-test-runner": "7.0.0-beta.45"
"@babel/core": "7.0.0-beta.47",
"@babel/helper-plugin-test-runner": "7.0.0-beta.47"
}
}

View File

@@ -1,7 +1,6 @@
import syntaxOptionalCatchBinding from "@babel/plugin-syntax-optional-catch-binding";
import { types as t } from "@babel/core";
export default function() {
export default function({ types: t }) {
return {
inherits: syntaxOptionalCatchBinding,

View File

@@ -1,8 +1,9 @@
{
"lerna": "2.0.0-rc.4",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"changelog": {
"repo": "babel/babel",
"cacheDir": ".changelog",
"labels": {
"PR: Spec Compliancy :eyeglasses:": ":eyeglasses: Spec Compliancy",
"PR: Breaking Change :boom:": ":boom: Breaking Change",
@@ -13,7 +14,6 @@
"PR: Internal :house:": ":house: Internal"
}
},
"cacheDir": ".changelog",
"commands": {
"publish": {
"ignore": [

View File

@@ -26,22 +26,124 @@ declare module "lodash/defaults" {
declare module "lodash/clone" {
declare export default <T>(obj: T) => T;
}
}
declare module "lodash/merge" {
declare export default <T: Object>(T, Object) => T;
}
declare module "convert-source-map" {
declare module "source-map" {
declare export type SourceMap = {
version: 3,
file: ?string,
sourceRoot: ?string,
sources: [?string],
sourcesContent: [?string],
names: [?string],
mappings: string,
};
declare module.exports: {
SourceMapConsumer: typeof SourceMapConsumer,
SourceMapGenerator: typeof SourceMapGenerator,
}
declare class SourceMapConsumer {
static GENERATED_ORDER: 1;
static ORIGINAL_ORDER: 2;
file: string | null;
sourceRoot: string | null;
sources: Array<string>;
constructor(?SourceMap): this;
computeColumnSpans(): string;
originalPositionFor({
line: number,
column: number,
}): {|
source: string,
line: number,
column: number,
name: string | null
|} | {|
source: null,
line: null,
column: null,
name: null
|};
generatedPositionFor({
source: string,
line: number,
column: number,
}): {|
line: number,
column: number,
lastColumn: number | null | void,
|} | {|
line: null,
column: null,
lastColumn: null | void,
|};
allGeneratedPositionsFor({
source: string,
line: number,
column: number,
}): Array<{|
line: number,
column: number,
lastColumn: number,
|}>;
sourceContentFor(string, boolean | void): string | null;
eachMapping(
({|
generatedLine: number,
generatedColumn: number,
source: string,
originalLine: number,
originalColumn: number,
name: string | null,
|} | {|
generatedLine: number,
generatedColumn: number,
source: null,
originalLine: null,
originalColumn: null,
name: null,
|}) => mixed,
context: mixed,
order: ?(1 | 2),
): void;
}
declare class SourceMapGenerator {
constructor(?{
file?: string | null,
sourceRoot?: string | null,
skipValidation?: boolean | null,
}): this;
addMapping({
generated: {
line: number,
column: number,
}
}): void;
setSourceContent(string, string): void;
toJSON(): SourceMap;
}
}
declare module "convert-source-map" {
import type { SourceMap } from "source-map";
declare class Converter {
toJSON(): string;
toBase64(): string;

View File

@@ -10,19 +10,19 @@
"test": "make test"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.44",
"@babel/core": "7.0.0-beta.44",
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.44",
"@babel/preset-env": "7.0.0-beta.44",
"@babel/preset-flow": "7.0.0-beta.44",
"@babel/preset-stage-0": "7.0.0-beta.44",
"@babel/register": "7.0.0-beta.44",
"@babel/cli": "7.0.0-beta.46",
"@babel/core": "7.0.0-beta.46",
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.46",
"@babel/preset-env": "7.0.0-beta.46",
"@babel/preset-flow": "7.0.0-beta.46",
"@babel/preset-stage-0": "7.0.0-beta.46",
"@babel/register": "7.0.0-beta.46",
"babel-core": "^7.0.0-0",
"babel-eslint": "^8.0.1",
"babel-jest": "^22.4.1",
"babel-loader": "8.0.0-beta.0",
"babel-plugin-transform-charcodes": "^0.1.0",
"babylon": "7.0.0-beta.44",
"babylon": "7.0.0-beta.46",
"browserify": "^13.1.1",
"bundle-collapser": "^1.2.1",
"chalk": "^2.3.2",
@@ -35,7 +35,7 @@
"eslint-plugin-prettier": "^2.5.0",
"flow-bin": "^0.66.0",
"graceful-fs": "^4.1.11",
"gulp": "^3.9.0",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0-beta.2",
"gulp-filter": "^5.1.0",
"gulp-newer": "^1.0.0",
@@ -43,13 +43,13 @@
"gulp-rename": "^1.2.2",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"gulp-watch": "^5.0.0",
"husky": "^0.14.3",
"jest": "^22.4.2",
"lerna": "2.0.0",
"lerna-changelog": "^0.5.0",
"lint-staged": "^6.0.1",
"lodash": "^4.2.0",
"lodash": "^4.17.5",
"merge-stream": "^1.0.1",
"output-file-sync": "^2.0.0",
"prettier": "1.11.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/cli",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Babel command line.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -20,20 +20,20 @@
"convert-source-map": "^1.1.0",
"fs-readdir-recursive": "^1.0.0",
"glob": "^7.0.0",
"lodash": "^4.2.0",
"lodash": "^4.17.5",
"output-file-sync": "^2.0.0",
"slash": "^1.0.0",
"source-map": "^0.5.0"
},
"optionalDependencies": {
"chokidar": "^1.6.1"
"chokidar": "^2.0.3"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.45"
"@babel/core": "7.0.0-beta.47"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.45",
"@babel/helper-fixtures": "7.0.0-beta.45"
"@babel/core": "7.0.0-beta.47",
"@babel/helper-fixtures": "7.0.0-beta.47"
},
"bin": {
"babel": "./bin/babel.js",

View File

@@ -9,11 +9,8 @@ import * as util from "./util";
let compiledFiles = 0;
export default function(commander, filenames, opts) {
function write(src, relative, base, callback) {
if (typeof base === "function") {
callback = base;
base = undefined;
}
function write(src, base, callback) {
let relative = path.relative(base, src);
if (!util.isCompilableExtension(relative, commander.extensions)) {
return process.nextTick(callback);
}
@@ -70,15 +67,11 @@ export default function(commander, filenames, opts) {
}
}
function handleFile(src, filename, base, callback) {
if (typeof base === "function") {
callback = base;
base = undefined;
}
write(src, filename, base, function(err, res) {
function handleFile(src, base, callback) {
write(src, base, function(err, res) {
if (err) return callback(err);
if (!res && commander.copyFiles) {
const filename = path.relative(base, src);
const dest = getDest(commander, filename, base);
outputFileSync(dest, fs.readFileSync(src));
util.chmod(src, dest);
@@ -102,7 +95,7 @@ export default function(commander, filenames, opts) {
const filename = files[index];
const src = path.join(dirname, filename);
handleFile(src, filename, dirname, function(err) {
handleFile(src, dirname, function(err) {
if (err) return callback(err);
index++;
if (index !== files.length) {
@@ -128,12 +121,7 @@ export default function(commander, filenames, opts) {
const files = util.readdir(dirname, commander.includeDotfiles);
sequentialHandleFile(files, dirname, callback);
} else {
write(
filename,
path.basename(filename),
path.dirname(filename),
callback,
);
write(filename, path.dirname(filename), callback);
}
}
@@ -163,8 +151,8 @@ export default function(commander, filenames, opts) {
if (commander.watch) {
const chokidar = util.requireChokidar();
filenames.forEach(function(dirname) {
const watcher = chokidar.watch(dirname, {
filenames.forEach(function(filenameOrDir) {
const watcher = chokidar.watch(filenameOrDir, {
persistent: true,
ignoreInitial: true,
awaitWriteFinish: {
@@ -175,14 +163,15 @@ export default function(commander, filenames, opts) {
["add", "change"].forEach(function(type) {
watcher.on(type, function(filename) {
const relative = path.relative(dirname, filename) || filename;
try {
handleFile(filename, relative, function(err) {
if (err) throw err;
});
} catch (err) {
console.error(err.stack);
}
handleFile(
filename,
filename === filenameOrDir
? path.dirname(filenameOrDir)
: filenameOrDir,
function(err) {
if (err) console.error(err.stack);
},
);
});
});
});

View File

@@ -51,9 +51,10 @@ export function log(msg, force) {
}
export function transform(filename, code, opts, callback) {
opts = Object.assign({}, opts, {
opts = {
...opts,
filename,
});
};
babel.transform(code, opts, callback);
}

View File

@@ -4,4 +4,4 @@ var foo = function foo() {
return 4;
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsVUFBVSxlO1MsQUFBTTtBQUFDIiwiZmlsZSI6InNjcmlwdDIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZm9vID0gKCkgPT4gNDsiXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBQSxNQUFVLFNBQVYsR0FBVSxHO1NBQU0sQztBQUFDLENBQWpCIiwiZmlsZSI6InNjcmlwdDIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZm9vID0gKCkgPT4gNDsiXX0=

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/code-frame",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Generate errors that contain a code frame that point to source locations.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,7 +8,7 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-code-frame",
"main": "lib/index.js",
"dependencies": {
"@babel/highlight": "7.0.0-beta.45"
"@babel/highlight": "7.0.0-beta.47"
},
"devDependencies": {
"chalk": "^2.0.0",

View File

@@ -38,12 +38,15 @@ function getMarkerLines(
source: Array<string>,
opts: Object,
): { start: number, end: number, markerLines: Object } {
const startLoc: Location = Object.assign(
{},
{ column: 0, line: -1 },
loc.start,
);
const endLoc: Location = Object.assign({}, startLoc, loc.end);
const startLoc: Location = {
column: 0,
line: -1,
...loc.start,
};
const endLoc: Location = {
...startLoc,
...loc.end,
};
const { linesAbove = 2, linesBelow = 3 } = opts || {};
const startLine = startLoc.line;
const startColumn = startLoc.column;

View File

@@ -205,7 +205,7 @@ Each `ConfigItem` exposes all of the information Babel knows. The fields are:
You can pass these options from the Babel CLI like so:
</p>
<p>
<code>babel --name<span class="o">=</span>value</code>
<code>babel --option-name<span class="o">=</span>value</code>
</p>
</blockquote>

View File

@@ -1,8 +1,8 @@
{
"name": "@babel/core",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Babel compiler core.",
"main": "./lib/index.js",
"main": "lib/index.js",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
@@ -28,24 +28,24 @@
"./lib/transform-file-sync.js": "./lib/transform-file-sync-browser.js"
},
"dependencies": {
"@babel/code-frame": "7.0.0-beta.45",
"@babel/generator": "7.0.0-beta.45",
"@babel/helpers": "7.0.0-beta.45",
"@babel/template": "7.0.0-beta.45",
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45",
"babylon": "7.0.0-beta.45",
"@babel/code-frame": "7.0.0-beta.47",
"@babel/generator": "7.0.0-beta.47",
"@babel/helpers": "7.0.0-beta.47",
"@babel/template": "7.0.0-beta.47",
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47",
"babylon": "7.0.0-beta.47",
"convert-source-map": "^1.1.0",
"debug": "^3.1.0",
"json5": "^0.5.0",
"lodash": "^4.2.0",
"lodash": "^4.17.5",
"micromatch": "^2.3.11",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
},
"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.45",
"@babel/register": "7.0.0-beta.45"
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.47",
"@babel/register": "7.0.0-beta.47"
}
}

View File

@@ -130,12 +130,8 @@ export function buildRootChain(
);
if (!programmaticChain) return null;
const {
root: rootDir = ".",
babelrc = true,
babelrcRoots,
configFile: configFileName = true,
} = opts;
const { root: rootDir = ".", configFile: configFileName = true } = opts;
let { babelrc, babelrcRoots } = opts;
const absoluteRoot = path.resolve(context.cwd, rootDir);
@@ -148,9 +144,19 @@ export function buildRootChain(
const configFileChain = emptyChain();
if (configFile) {
const result = loadFileChain(configFile, context);
const validatedFile = validateConfigFile(configFile);
const result = loadFileChain(validatedFile, context);
if (!result) return null;
// Allow config files to toggle `.babelrc` resolution on and off and
// specify where the roots are.
if (babelrc === undefined) {
babelrc = validatedFile.options.babelrc;
}
if (babelrcRoots === undefined) {
babelrcRoots = validatedFile.options.babelrcRoots;
}
mergeChain(configFileChain, result);
}
@@ -163,7 +169,7 @@ export function buildRootChain(
const fileChain = emptyChain();
// resolve all .babelrc files
if (
babelrc &&
(babelrc === true || babelrc === undefined) &&
pkgData &&
babelrcLoadEnabled(context, pkgData, babelrcRoots, absoluteRoot)
) {
@@ -180,7 +186,7 @@ export function buildRootChain(
}
if (babelrcFile) {
const result = loadFileChain(babelrcFile, context);
const result = loadFileChain(validateBabelrcFile(babelrcFile), context);
if (!result) return null;
mergeChain(fileChain, result);
@@ -231,11 +237,30 @@ function babelrcLoadEnabled(
return micromatch(pkgData.directories, babelrcPatterns).length > 0;
}
const validateConfigFile = makeWeakCache((file: ConfigFile): ValidatedFile => ({
filepath: file.filepath,
dirname: file.dirname,
options: validate("configfile", file.options),
}));
const validateBabelrcFile = makeWeakCache(
(file: ConfigFile): ValidatedFile => ({
filepath: file.filepath,
dirname: file.dirname,
options: validate("babelrcfile", file.options),
}),
);
const validateExtendFile = makeWeakCache((file: ConfigFile): ValidatedFile => ({
filepath: file.filepath,
dirname: file.dirname,
options: validate("extendsfile", file.options),
}));
/**
* Build a config chain for just the programmatic options passed into Babel.
*/
const loadProgrammaticChain = makeChainWalker({
init: arg => arg,
root: input => buildRootDescriptors(input, "base", createCachedDescriptors),
env: (input, envName) =>
buildEnvDescriptors(input, "base", createCachedDescriptors, envName),
@@ -255,18 +280,12 @@ const loadProgrammaticChain = makeChainWalker({
* Build a config chain for a given file.
*/
const loadFileChain = makeChainWalker({
init: input => validateFile(input),
root: file => loadFileDescriptors(file),
env: (file, envName) => loadFileEnvDescriptors(file)(envName),
overrides: (file, index) => loadFileOverridesDescriptors(file)(index),
overridesEnv: (file, index, envName) =>
loadFileOverridesEnvDescriptors(file)(index)(envName),
});
const validateFile = makeWeakCache((file: ConfigFile): ValidatedFile => ({
filepath: file.filepath,
dirname: file.dirname,
options: validate("file", file.options),
}));
const loadFileDescriptors = makeWeakCache((file: ValidatedFile) =>
buildRootDescriptors(file, file.filepath, createUncachedDescriptors),
);
@@ -350,25 +369,18 @@ function buildOverrideEnvDescriptors(
: null;
}
function makeChainWalker<
ArgT,
InnerT: { options: ValidatedOptions, dirname: string },
>({
init,
function makeChainWalker<ArgT: { options: ValidatedOptions, dirname: string }>({
root,
env,
overrides,
overridesEnv,
}: {
init: ArgT => InnerT,
root: InnerT => OptionsAndDescriptors,
env: (InnerT, string) => OptionsAndDescriptors | null,
overrides: (InnerT, number) => OptionsAndDescriptors,
overridesEnv: (InnerT, number, string) => OptionsAndDescriptors | null,
root: ArgT => OptionsAndDescriptors,
env: (ArgT, string) => OptionsAndDescriptors | null,
overrides: (ArgT, number) => OptionsAndDescriptors,
overridesEnv: (ArgT, number, string) => OptionsAndDescriptors | null,
}): (ArgT, ConfigContext, Set<ConfigFile> | void) => ConfigChain | null {
return (arg, context, files = new Set()) => {
const input = init(arg);
return (input, context, files = new Set()) => {
const { dirname } = input;
const flattenedConfigs = [];
@@ -442,7 +454,7 @@ function mergeExtendsChain(
}
files.add(file);
const fileChain = loadFileChain(file, context, files);
const fileChain = loadFileChain(validateExtendFile(file), context, files);
files.delete(file);
if (!fileChain) return false;
@@ -480,7 +492,9 @@ function emptyChain(): ConfigChain {
}
function normalizeOptions(opts: ValidatedOptions): ValidatedOptions {
const options = Object.assign({}, opts);
const options = {
...opts,
};
delete options.extends;
delete options.env;
delete options.plugins;

View File

@@ -174,7 +174,10 @@ const loadDescriptor = makeWeakCache(
let item = value;
if (typeof value === "function") {
const api = Object.assign({}, context, makeAPI(cache));
const api = {
...context,
...makeAPI(cache),
};
try {
item = value(api, options, dirname);
} catch (e) {
@@ -229,9 +232,13 @@ const instantiatePlugin = makeWeakCache(
): Plugin => {
const pluginObj = validatePluginObject(value);
const plugin = Object.assign({}, pluginObj);
const plugin = {
...pluginObj,
};
if (plugin.visitor) {
plugin.visitor = traverse.explode(Object.assign({}, plugin.visitor));
plugin.visitor = traverse.explode({
...plugin.visitor,
});
}
if (plugin.inherits) {

View File

@@ -49,6 +49,7 @@ export default function loadPrivatePartialConfig(
// passed back to Babel a second time, it will be in the right structure
// to not change behavior.
options.babelrc = false;
options.configFile = false;
options.envName = envName;
options.cwd = absoluteCwd;
options.passPerPreset = false;

View File

@@ -36,12 +36,6 @@ const ROOT_VALIDATORS: ValidatorSet = {
filenameRelative: (assertString: Validator<
$PropertyType<ValidatedOptions, "filenameRelative">,
>),
babelrc: (assertBoolean: Validator<
$PropertyType<ValidatedOptions, "babelrc">,
>),
babelrcRoots: (assertBabelrcSearch: Validator<
$PropertyType<ValidatedOptions, "babelrcRoots">,
>),
code: (assertBoolean: Validator<$PropertyType<ValidatedOptions, "code">>),
ast: (assertBoolean: Validator<$PropertyType<ValidatedOptions, "ast">>),
@@ -50,6 +44,15 @@ const ROOT_VALIDATORS: ValidatorSet = {
>),
};
const BABELRC_VALIDATORS: ValidatorSet = {
babelrc: (assertBoolean: Validator<
$PropertyType<ValidatedOptions, "babelrc">,
>),
babelrcRoots: (assertBabelrcSearch: Validator<
$PropertyType<ValidatedOptions, "babelrcRoots">,
>),
};
const NONPRESET_VALIDATORS: ValidatorSet = {
extends: (assertString: Validator<
$PropertyType<ValidatedOptions, "extends">,
@@ -243,7 +246,14 @@ export type SourceTypeOption = "module" | "script" | "unambiguous";
export type CompactOption = boolean | "auto";
export type RootInputSourceMapOption = {} | boolean;
export type OptionsType = "arguments" | "file" | "env" | "preset" | "override";
export type OptionsType =
| "arguments"
| "env"
| "preset"
| "override"
| "configfile"
| "babelrcfile"
| "extendsfile";
export function validate(type: OptionsType, opts: {}): ValidatedOptions {
assertNoDuplicateSourcemap(opts);
@@ -255,6 +265,22 @@ export function validate(type: OptionsType, opts: {}): ValidatedOptions {
if (type !== "arguments" && ROOT_VALIDATORS[key]) {
throw new Error(`.${key} is only allowed in root programmatic options`);
}
if (
type !== "arguments" &&
type !== "configfile" &&
BABELRC_VALIDATORS[key]
) {
if (type === "babelrcfile" || type === "extendsfile") {
throw new Error(
`.${key} is not allowed in .babelrc or "extend"ed files, only in root programmatic options, ` +
`or babel.config.js/config file options`,
);
}
throw new Error(
`.${key} is only allowed in root programmatic options, or babel.config.js/config file options`,
);
}
if (type === "env" && key === "env") {
throw new Error(`.${key} is not allowed inside another env block`);
}
@@ -268,6 +294,7 @@ export function validate(type: OptionsType, opts: {}): ValidatedOptions {
const validator =
COMMON_VALIDATORS[key] ||
NONPRESET_VALIDATORS[key] ||
BABELRC_VALIDATORS[key] ||
ROOT_VALIDATORS[key];
if (validator) validator(key, opts[key]);

View File

@@ -12,7 +12,10 @@ export default function transformFileSync(
if (opts == null) {
options = { filename };
} else if (opts && typeof opts === "object") {
options = Object.assign({}, opts, { filename });
options = {
...opts,
filename,
};
}
const config = loadConfig(options);

View File

@@ -19,7 +19,10 @@ export default ((function transformFile(filename, opts, callback) {
if (opts == null) {
options = { filename };
} else if (opts && typeof opts === "object") {
options = Object.assign({}, opts, { filename });
options = {
...opts,
filename,
};
}
process.nextTick(() => {

View File

@@ -13,6 +13,7 @@ export default function loadBlockHoistPlugin(): Plugin {
// which loads this file, and this 'loadConfig' loading plugins.
const config = loadConfig({
babelrc: false,
configFile: false,
plugins: [blockHoistPlugin],
});
LOADED_PLUGIN = config ? config.passes[0][0] : undefined;

View File

@@ -2,10 +2,10 @@
import type { PluginPasses } from "../../config";
import convertSourceMap, { type SourceMap } from "convert-source-map";
import sourceMap from "source-map";
import generate from "@babel/generator";
import type File from "./file";
import mergeSourceMap from "./merge-map";
export default function generateCode(
pluginPasses: PluginPasses,
@@ -72,46 +72,3 @@ export default function generateCode(
return { outputCode, outputMap };
}
function mergeSourceMap(inputMap: SourceMap, map: SourceMap): SourceMap {
const inputMapConsumer = new sourceMap.SourceMapConsumer(inputMap);
const outputMapConsumer = new sourceMap.SourceMapConsumer(map);
const mergedGenerator = new sourceMap.SourceMapGenerator({
file: inputMapConsumer.file,
sourceRoot: inputMapConsumer.sourceRoot,
});
// This assumes the output map always has a single source, since Babel always compiles a
// single source file to a single output file.
const source = outputMapConsumer.sources[0];
inputMapConsumer.eachMapping(function(mapping) {
const generatedPosition = outputMapConsumer.generatedPositionFor({
line: mapping.generatedLine,
column: mapping.generatedColumn,
source: source,
});
if (generatedPosition.column != null) {
mergedGenerator.addMapping({
source: mapping.source,
original:
mapping.source == null
? null
: {
line: mapping.originalLine,
column: mapping.originalColumn,
},
generated: generatedPosition,
name: mapping.name,
});
}
});
const mergedMap = mergedGenerator.toJSON();
inputMap.mappings = mergedMap.mappings;
return inputMap;
}

View File

@@ -0,0 +1,317 @@
// @flow
import type { SourceMap } from "convert-source-map";
import sourceMap from "source-map";
export default function mergeSourceMap(
inputMap: SourceMap,
map: SourceMap,
): SourceMap {
const input = buildMappingData(inputMap);
const output = buildMappingData(map);
const mergedGenerator = new sourceMap.SourceMapGenerator();
for (const { source } of input.sources) {
if (typeof source.content === "string") {
mergedGenerator.setSourceContent(source.path, source.content);
}
}
if (output.sources.length === 1) {
const defaultSource = output.sources[0];
const insertedMappings = new Map();
// Process each generated range in the input map, e.g. each range over the
// code that Babel was originally given.
eachInputGeneratedRange(input, (generated, original, source) => {
// Then pick out each range over Babel's _output_ that corresponds with
// the given range on the code given to Babel.
eachOverlappingGeneratedOutputRange(defaultSource, generated, item => {
// It's possible that multiple input ranges will overlap the same
// generated range. Since sourcemap don't traditionally represent
// generated locations with multiple original locations, we explicitly
// skip generated locations once we've seen them the first time.
const key = makeMappingKey(item);
if (insertedMappings.has(key)) return;
insertedMappings.set(key, item);
mergedGenerator.addMapping({
source: source.path,
original: {
line: original.line,
column: original.columnStart,
},
generated: {
line: item.line,
column: item.columnStart,
},
name: original.name,
});
});
});
// Since mappings are manipulated using single locations, but are interpreted
// as ranges, the insertions above may not actually have their ending
// locations mapped yet. Here be go through each one and ensure that it has
// a well-defined ending location, if one wasn't already created by the start
// of a different range.
for (const item of insertedMappings.values()) {
if (item.columnEnd === Infinity) {
continue;
}
const clearItem = {
line: item.line,
columnStart: item.columnEnd,
};
const key = makeMappingKey(clearItem);
if (insertedMappings.has(key)) {
continue;
}
// Insert mappings with no original position to terminate any mappings
// that were found above, so that they don't expand beyond their correct
// range.
mergedGenerator.addMapping({
generated: {
line: clearItem.line,
column: clearItem.columnStart,
},
});
}
}
const result = mergedGenerator.toJSON();
// addMapping expects a relative path, and setSourceContent expects an
// absolute path. To avoid this whole confusion, we leave the root out
// entirely, and add it at the end here.
if (typeof input.sourceRoot === "string") {
result.sourceRoot = input.sourceRoot;
}
return result;
}
function makeMappingKey(item: { line: number, columnStart: number }) {
return JSON.stringify([item.line, item.columnStart]);
}
function eachOverlappingGeneratedOutputRange(
outputFile: ResolvedFileMappings,
inputGeneratedRange: ResolvedGeneratedRange,
callback: ResolvedGeneratedRange => mixed,
) {
// Find the Babel-generated mappings that overlap with this range in the
// input sourcemap. Generated locations within the input sourcemap
// correspond with the original locations in the map Babel generates.
const overlappingOriginal = filterApplicableOriginalRanges(
outputFile,
inputGeneratedRange,
);
for (const { generated } of overlappingOriginal) {
for (const item of generated) {
callback(item);
}
}
}
function filterApplicableOriginalRanges(
{ mappings }: ResolvedFileMappings,
{ line, columnStart, columnEnd }: ResolvedGeneratedRange,
): OriginalMappings {
// The mapping array is sorted by original location, so we can
// binary-search it for the overlapping ranges.
return filterSortedArray(mappings, ({ original: outOriginal }) => {
if (line > outOriginal.line) return -1;
if (line < outOriginal.line) return 1;
if (columnStart >= outOriginal.columnEnd) return -1;
if (columnEnd <= outOriginal.columnStart) return 1;
return 0;
});
}
function eachInputGeneratedRange(
map: ResolvedMappings,
callback: (
ResolvedGeneratedRange,
ResolvedOriginalRange,
ResolvedSource,
) => mixed,
) {
for (const { source, mappings } of map.sources) {
for (const { original, generated } of mappings) {
for (const item of generated) {
callback(item, original, source);
}
}
}
}
type ResolvedMappings = {|
file: ?string,
sourceRoot: ?string,
sources: Array<ResolvedFileMappings>,
|};
type ResolvedFileMappings = {|
source: ResolvedSource,
mappings: OriginalMappings,
|};
type OriginalMappings = Array<{|
original: ResolvedOriginalRange,
generated: Array<ResolvedGeneratedRange>,
|}>;
type ResolvedSource = {|
path: string,
content: string | null,
|};
type ResolvedOriginalRange = {|
line: number,
columnStart: number,
columnEnd: number,
name: string | null,
|};
type ResolvedGeneratedRange = {|
line: number,
columnStart: number,
columnEnd: number,
|};
function buildMappingData(map: SourceMap): ResolvedMappings {
const consumer = new sourceMap.SourceMapConsumer({
...map,
// This is a bit hack. .addMapping expects source values to be relative,
// but eachMapping returns mappings with absolute paths. To avoid that
// incompatibility, we leave the sourceRoot out here and add it to the
// final map at the end instead.
sourceRoot: null,
});
const sources = new Map();
const mappings = new Map();
let last = null;
consumer.computeColumnSpans();
consumer.eachMapping(
m => {
if (m.originalLine === null) return;
let source = sources.get(m.source);
if (!source) {
source = {
path: m.source,
content: consumer.sourceContentFor(m.source, true),
};
sources.set(m.source, source);
}
let sourceData = mappings.get(source);
if (!sourceData) {
sourceData = {
source,
mappings: [],
};
mappings.set(source, sourceData);
}
const obj = {
line: m.originalLine,
columnStart: m.originalColumn,
columnEnd: Infinity,
name: m.name,
};
if (
last &&
last.source === source &&
last.mapping.line === m.originalLine
) {
last.mapping.columnEnd = m.originalColumn;
}
last = {
source,
mapping: obj,
};
sourceData.mappings.push({
original: obj,
generated: consumer
.allGeneratedPositionsFor({
source: m.source,
line: m.originalLine,
column: m.originalColumn,
})
.map(item => ({
line: item.line,
columnStart: item.column,
// source-map's lastColumn is inclusive, not exclusive, so we need
// to add 1 to it.
columnEnd: item.lastColumn + 1,
})),
});
},
null,
sourceMap.SourceMapConsumer.ORIGINAL_ORDER,
);
return {
file: map.file,
sourceRoot: map.sourceRoot,
sources: Array.from(mappings.values()),
};
}
function findInsertionLocation<T>(
array: Array<T>,
callback: T => number,
): number {
let left = 0;
let right = array.length;
while (left < right) {
const mid = Math.floor((left + right) / 2);
const item = array[mid];
const result = callback(item);
if (result === 0) {
left = mid;
break;
}
if (result >= 0) {
right = mid;
} else {
left = mid + 1;
}
}
// Ensure the value is the start of any set of matches.
let i = left;
if (i < array.length) {
while (i > 0 && callback(array[i]) >= 0) {
i--;
}
return i + 1;
}
return i;
}
function filterSortedArray<T>(
array: Array<T>,
callback: T => number,
): Array<T> {
const start = findInsertionLocation(array, callback);
const results = [];
for (let i = start; i < array.length && callback(array[i]) === 0; i++) {
results.push(array[i]);
}
return results;
}

View File

@@ -6,7 +6,10 @@ import type { ResolvedConfig } from "../config";
export default function normalizeOptions(config: ResolvedConfig): {} {
const {
filename,
filenameRelative = filename || "unknown",
cwd,
filenameRelative = typeof filename === "string"
? path.relative(cwd, filename)
: "unknown",
sourceType = "module",
inputSourceMap,
sourceMaps = !!inputSourceMap,
@@ -14,7 +17,7 @@ export default function normalizeOptions(config: ResolvedConfig): {} {
moduleRoot,
sourceRoot = moduleRoot,
sourceFileName = filenameRelative,
sourceFileName = path.basename(filenameRelative),
comments = true,
compact = "auto",
@@ -22,36 +25,38 @@ export default function normalizeOptions(config: ResolvedConfig): {} {
const opts = config.options;
const options = Object.assign({}, opts, {
parserOpts: Object.assign(
{
sourceType:
path.extname(filenameRelative) === ".mjs" ? "module" : sourceType,
sourceFileName: filename,
plugins: [],
},
opts.parserOpts,
),
generatorOpts: Object.assign(
{
// General generator flags.
filename,
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
retainLines: opts.retainLines,
comments,
shouldPrintComment: opts.shouldPrintComment,
compact,
minified: opts.minified,
const options = {
...opts,
// Source-map generation flags.
sourceMaps,
sourceRoot,
sourceFileName,
},
opts.generatorOpts,
),
});
parserOpts: {
sourceType:
path.extname(filenameRelative) === ".mjs" ? "module" : sourceType,
sourceFileName: filename,
plugins: [],
...opts.parserOpts,
},
generatorOpts: {
// General generator flags.
filename,
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
retainLines: opts.retainLines,
comments,
shouldPrintComment: opts.shouldPrintComment,
compact,
minified: opts.minified,
// Source-map generation flags.
sourceMaps,
sourceRoot,
sourceFileName,
...opts.generatorOpts,
},
};
for (const plugins of config.passes) {
for (const plugin of plugins) {

View File

@@ -12,11 +12,35 @@ function assertNotIgnored(result) {
expect(result.ignored).toBeFalsy();
}
function transform(code, opts) {
return babel.transform(code, {
cwd: __dirname,
...opts,
});
}
function transformFile(filename, opts, cb) {
return babel.transformFile(
filename,
{
cwd: __dirname,
...opts,
},
cb,
);
}
function transformFileSync(filename, opts) {
return babel.transformFileSync(filename, {
cwd: __dirname,
...opts,
});
}
// shim
function transformAsync(code, opts) {
return {
then: function(resolve) {
resolve(babel.transform(code, opts));
resolve(transform(code, opts));
},
};
}
@@ -32,7 +56,7 @@ describe("parser and generator options", function() {
};
function newTransform(string) {
return babel.transform(string, {
return transform(string, {
ast: true,
parserOpts: {
parser: recast.parse,
@@ -48,7 +72,7 @@ describe("parser and generator options", function() {
it("options", function() {
const string = "original;";
expect(newTransform(string).ast).toEqual(
babel.transform(string, { ast: true }).ast,
transform(string, { ast: true }).ast,
);
expect(newTransform(string).code).toBe(string);
});
@@ -57,7 +81,7 @@ describe("parser and generator options", function() {
const experimental = "var a: number = 1;";
expect(newTransform(experimental).ast).toEqual(
babel.transform(experimental, {
transform(experimental, {
ast: true,
parserOpts: {
plugins: ["flow"],
@@ -67,7 +91,7 @@ describe("parser and generator options", function() {
expect(newTransform(experimental).code).toBe(experimental);
function newTransformWithPlugins(string) {
return babel.transform(string, {
return transform(string, {
ast: true,
plugins: [__dirname + "/../../babel-plugin-syntax-flow"],
parserOpts: {
@@ -80,7 +104,7 @@ describe("parser and generator options", function() {
}
expect(newTransformWithPlugins(experimental).ast).toEqual(
babel.transform(experimental, {
transform(experimental, {
ast: true,
parserOpts: {
plugins: ["flow"],
@@ -94,7 +118,7 @@ describe("parser and generator options", function() {
const experimental = "if (true) {\n import a from 'a';\n}";
expect(newTransform(experimental).ast).not.toBe(
babel.transform(experimental, {
transform(experimental, {
ast: true,
parserOpts: {
allowImportExportEverywhere: true,
@@ -123,7 +147,7 @@ describe("api", function() {
babelrc: false,
};
Object.freeze(options);
babel.transformFile(__dirname + "/fixtures/api/file.js", options, function(
transformFile(__dirname + "/fixtures/api/file.js", options, function(
err,
res,
) {
@@ -141,15 +165,14 @@ describe("api", function() {
};
Object.freeze(options);
expect(
babel.transformFileSync(__dirname + "/fixtures/api/file.js", options)
.code,
transformFileSync(__dirname + "/fixtures/api/file.js", options).code,
).toBe("foo();");
expect(options).toEqual({ babelrc: false });
});
it("options throw on falsy true", function() {
return expect(function() {
babel.transform("", {
transform("", {
plugins: [__dirname + "/../../babel-plugin-syntax-jsx", false],
});
}).toThrow(/.plugins\[1\] must be a string, object, function/);
@@ -170,7 +193,7 @@ describe("api", function() {
let calledRaw = 0;
let calledIntercept = 0;
babel.transform("function foo() { bar(foobar); }", {
transform("function foo() { bar(foobar); }", {
wrapPluginVisitorMethod: function(pluginAlias, visitorType, callback) {
if (pluginAlias !== "foobar") {
return callback;
@@ -204,7 +227,7 @@ describe("api", function() {
let aliasBaseType = null;
function execTest(passPerPreset) {
return babel.transform("type Foo = number; let x = (y): Foo => y;", {
return transform("type Foo = number; let x = (y): Foo => y;", {
sourceType: "script",
passPerPreset: passPerPreset,
presets: [
@@ -293,7 +316,7 @@ describe("api", function() {
const oldEnv = process.env.BABEL_ENV;
process.env.BABEL_ENV = "development";
const result = babel.transform("", {
const result = transform("", {
cwd: path.join(__dirname, "fixtures", "config", "complex-plugin-config"),
filename: path.join(
__dirname,
@@ -348,7 +371,7 @@ describe("api", function() {
});
it("source map merging", function() {
const result = babel.transform(
const result = transform(
[
/* eslint-disable max-len */
'function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }',
@@ -394,6 +417,16 @@ describe("api", function() {
});
});
it("default source map filename", function() {
return transformAsync("var a = 10;", {
cwd: "/some/absolute",
filename: "/some/absolute/file/path.js",
sourceMaps: true,
}).then(function(result) {
expect(result.map.sources).toEqual(["path.js"]);
});
});
it("code option false", function() {
return transformAsync("foo('bar');", { code: false }).then(function(
result,
@@ -545,7 +578,7 @@ describe("api", function() {
});
it("default", function() {
const result = babel.transform("foo;", {
const result = transform("foo;", {
env: {
development: { comments: false },
},
@@ -556,7 +589,7 @@ describe("api", function() {
it("BABEL_ENV", function() {
process.env.BABEL_ENV = "foo";
const result = babel.transform("foo;", {
const result = transform("foo;", {
env: {
foo: { comments: false },
},
@@ -566,7 +599,7 @@ describe("api", function() {
it("NODE_ENV", function() {
process.env.NODE_ENV = "foo";
const result = babel.transform("foo;", {
const result = transform("foo;", {
env: {
foo: { comments: false },
},
@@ -624,7 +657,7 @@ describe("api", function() {
};
it("only syntax plugin available", function(done) {
babel.transformFile(
transformFile(
__dirname + "/fixtures/api/parsing-errors/only-syntax/file.js",
options,
function(err) {
@@ -641,7 +674,7 @@ describe("api", function() {
});
it("both syntax and transform plugin available", function(done) {
babel.transformFile(
transformFile(
__dirname + "/fixtures/api/parsing-errors/syntax-and-transform/file.js",
options,
function(err) {

View File

@@ -1,11 +1,18 @@
import fs from "fs";
import path from "path";
import { loadOptions } from "../lib";
import { loadOptions as loadOptionsOrig } from "../lib";
function fixture(...args) {
return path.join(__dirname, "fixtures", "config", ...args);
}
function loadOptions(opts) {
return loadOptionsOrig({
cwd: __dirname,
...opts,
});
}
describe("buildConfigChain", function() {
describe("test", () => {
describe("single", () => {
@@ -897,6 +904,7 @@ describe("buildConfigChain", function() {
describe("config files", () => {
const getDefaults = () => ({
babelrc: false,
configFile: false,
cwd: process.cwd(),
envName: "development",
passPerPreset: false,

View File

@@ -1,3 +1,5 @@
{
"plugins": ["@babel/syntax-decorators"]
"plugins": [
["@babel/syntax-decorators", { "legacy": true }]
]
}

View File

@@ -0,0 +1,12 @@
{
"version": 3,
"sources": [
"HelloWorld.vue"
],
"names": [],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
"sourceRoot": "src/components",
"sourcesContent": [
"<template>\n <div class=\"hello\">\n <h1>{{ msg }}</h1>\n <h2>Essential Links</h2>\n <ul>\n <li>\n <a\n href=\"https://vuejs.org\"\n target=\"_blank\"\n >\n Core Docs\n </a>\n </li>\n <li>\n <a\n href=\"https://forum.vuejs.org\"\n target=\"_blank\"\n >\n Forum\n </a>\n </li>\n <li>\n <a\n href=\"https://chat.vuejs.org\"\n target=\"_blank\"\n >\n Community Chat\n </a>\n </li>\n <li>\n <a\n href=\"https://twitter.com/vuejs\"\n target=\"_blank\"\n >\n Twitter\n </a>\n </li>\n <br>\n <li>\n <a\n href=\"http://vuejs-templates.github.io/webpack/\"\n target=\"_blank\"\n >\n Docs for This Template\n </a>\n </li>\n </ul>\n <h2>Ecosystem</h2>\n <ul>\n <li>\n <a\n href=\"http://router.vuejs.org/\"\n target=\"_blank\"\n >\n vue-router\n </a>\n </li>\n <li>\n <a\n href=\"http://vuex.vuejs.org/\"\n target=\"_blank\"\n >\n vuex\n </a>\n </li>\n <li>\n <a\n href=\"http://vue-loader.vuejs.org/\"\n target=\"_blank\"\n >\n vue-loader\n </a>\n </li>\n <li>\n <a\n href=\"https://github.com/vuejs/awesome-vue\"\n target=\"_blank\"\n >\n awesome-vue\n </a>\n </li>\n </ul>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'HelloWorld',\n data () {\n return {\n msg: 'Welcome to Your Vue.js App'\n }\n }\n}\n</script>\n\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\nh1, h2 {\n font-weight: normal;\n}\nul {\n list-style-type: none;\n padding: 0;\n}\nli {\n display: inline-block;\n margin: 0 10px;\n}\na {\n color: #42b983;\n}\n</style>\n"
]
}

View File

@@ -0,0 +1,113 @@
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
export default {
name: 'HelloWorld',
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
}
}
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

View File

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

View File

@@ -0,0 +1,120 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = {
name: 'HelloWorld',
data() {
return {
msg: 'Welcome to Your Vue.js App'
};
}
}; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
exports.default = _default;

View File

@@ -0,0 +1,12 @@
{
"version": 3,
"sources": [
"HelloWorld.vue"
],
"names": [],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAsFA;AACA,QAAA,YADA;;AAEA,SAAA;AACA,WAAA;AACA,WAAA;AADA,KAAA;AAGA;;AANA,C",
"sourceRoot": "src/components",
"sourcesContent": [
"<template>\n <div class=\"hello\">\n <h1>{{ msg }}</h1>\n <h2>Essential Links</h2>\n <ul>\n <li>\n <a\n href=\"https://vuejs.org\"\n target=\"_blank\"\n >\n Core Docs\n </a>\n </li>\n <li>\n <a\n href=\"https://forum.vuejs.org\"\n target=\"_blank\"\n >\n Forum\n </a>\n </li>\n <li>\n <a\n href=\"https://chat.vuejs.org\"\n target=\"_blank\"\n >\n Community Chat\n </a>\n </li>\n <li>\n <a\n href=\"https://twitter.com/vuejs\"\n target=\"_blank\"\n >\n Twitter\n </a>\n </li>\n <br>\n <li>\n <a\n href=\"http://vuejs-templates.github.io/webpack/\"\n target=\"_blank\"\n >\n Docs for This Template\n </a>\n </li>\n </ul>\n <h2>Ecosystem</h2>\n <ul>\n <li>\n <a\n href=\"http://router.vuejs.org/\"\n target=\"_blank\"\n >\n vue-router\n </a>\n </li>\n <li>\n <a\n href=\"http://vuex.vuejs.org/\"\n target=\"_blank\"\n >\n vuex\n </a>\n </li>\n <li>\n <a\n href=\"http://vue-loader.vuejs.org/\"\n target=\"_blank\"\n >\n vue-loader\n </a>\n </li>\n <li>\n <a\n href=\"https://github.com/vuejs/awesome-vue\"\n target=\"_blank\"\n >\n awesome-vue\n </a>\n </li>\n </ul>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'HelloWorld',\n data () {\n return {\n msg: 'Welcome to Your Vue.js App'\n }\n }\n}\n</script>\n\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\nh1, h2 {\n font-weight: normal;\n}\nul {\n list-style-type: none;\n padding: 0;\n}\nli {\n display: inline-block;\n margin: 0 10px;\n}\na {\n color: #42b983;\n}\n</style>\n"
]
}

View File

@@ -0,0 +1,72 @@
[
{
"generated": {
"line": 92,
"column": 15
},
"original": {
"line": 87,
"column": 0
}
},
{
"generated": {
"line": 93,
"column": 0
},
"original": {
"line": 88,
"column": 0
}
},
{
"generated": {
"line": 95,
"column": 9
},
"original": {
"line": 89,
"column": 0
}
},
{
"generated": {
"line": 96,
"column": 0
},
"original": {
"line": 90,
"column": 0
}
},
{
"generated": {
"line": 97,
"column": 0
},
"original": {
"line": 91,
"column": 0
}
},
{
"generated": {
"line": 98,
"column": 0
},
"original": {
"line": 90,
"column": 0
}
},
{
"generated": {
"line": 99,
"column": 0
},
"original": {
"line": 93,
"column": 0
}
}
]

View File

@@ -1,11 +1,7 @@
{
"version": 3,
"mappings": "AAAA,UAAU,Y;SAAM,A;AAAC",
"mappings": "AAAA,IAAA,MAAU,Y;SAAM,C;AAAC,CAAjB",
"names": [],
"sources": [
"original.js"
],
"sourcesContent": [
"var foo = () => 4;"
]
"sources": ["original.js"],
"sourcesContent": ["var foo = () => 4;"],
"version": 3
}

View File

@@ -1,6 +1,13 @@
import { loadOptions } from "../lib";
import { loadOptions as loadOptionsOrig } from "../lib";
import path from "path";
function loadOptions(opts) {
return loadOptionsOrig({
cwd: __dirname,
...opts,
});
}
describe("option-manager", () => {
it("throws for babel 5 plugin", () => {
return expect(() => {

View File

@@ -22,7 +22,10 @@ describe("parse", function() {
const input = fs.readFileSync(fixture("input.js"), "utf8");
const output = require(fixture("output.json"));
const result = parse(input, { parserOpts: { plugins: ["decorators"] } });
const result = parse(input, {
parserOpts: { plugins: ["decorators"] },
cwd: fixture(),
});
expect(JSON.parse(JSON.stringify(result))).toEqual(output);
});
});

View File

@@ -6,6 +6,7 @@ describe("traversal path", function() {
const expectCode = "function foo() {}";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {
@@ -24,6 +25,7 @@ describe("traversal path", function() {
const expectCode = "var fn = () => true;";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {
@@ -53,6 +55,7 @@ describe("traversal path", function() {
const expectCode = "var fn = () => { return true; }";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {
@@ -74,6 +77,7 @@ describe("traversal path", function() {
const expectCode = "for (KEY in right);";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {
@@ -104,6 +108,7 @@ describe("traversal path", function() {
const expectCode = "for (var KEY in right);";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {
@@ -125,6 +130,7 @@ describe("traversal path", function() {
const expectCode = "for (KEY;;);";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {
@@ -155,6 +161,7 @@ describe("traversal path", function() {
const expectCode = "for (var KEY;;);";
const actualCode = transform(expectCode, {
cwd: __dirname,
plugins: [
new Plugin({
visitor: {

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/generator",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Turns an AST into code.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -11,14 +11,14 @@
"lib"
],
"dependencies": {
"@babel/types": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.47",
"jsesc": "^2.5.1",
"lodash": "^4.2.0",
"lodash": "^4.17.5",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
},
"devDependencies": {
"@babel/helper-fixtures": "7.0.0-beta.45",
"babylon": "7.0.0-beta.45"
"@babel/helper-fixtures": "7.0.0-beta.47",
"babylon": "7.0.0-beta.47"
}
}

View File

@@ -1 +1 @@
{ "plugins": ["decorators"] }
{ "plugins": ["decorators-legacy"] }

View File

@@ -1,3 +1,3 @@
{
"plugins": ["typescript", "decorators"]
"plugins": ["typescript", "decorators-legacy"]
}

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-annotate-as-pure",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to annotate paths and nodes with #__PURE__ comment",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-annotate-as-pure",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45"
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "@babel/helper-bindify-decorators",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to bindify decorators",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-bindify-decorators",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "@babel/helper-builder-binary-assignment-operator-visitor",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to build binary assignment operator visitors",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-binary-assignment-operator-visitor",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-explode-assignable-expression": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/helper-explode-assignable-expression": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "@babel/helper-builder-react-jsx",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to build react jsx",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-react-jsx",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.47",
"esutils": "^2.0.0"
}
}

View File

@@ -1,13 +1,13 @@
{
"name": "@babel/helper-call-delegate",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to call delegate",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-call-delegate",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-hoist-variables": "7.0.0-beta.45",
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/helper-hoist-variables": "7.0.0-beta.47",
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,13 +1,13 @@
{
"name": "@babel/helper-define-map",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to define a map",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-define-map",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-function-name": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45",
"lodash": "^4.2.0"
"@babel/helper-function-name": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47",
"lodash": "^4.17.5"
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "@babel/helper-explode-assignable-expression",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to explode an assignable expression",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-assignable-expression",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,13 +1,13 @@
{
"name": "@babel/helper-explode-class",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to explode class",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-class",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-bindify-decorators": "7.0.0-beta.45",
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/helper-bindify-decorators": "7.0.0-beta.47",
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,13 +1,13 @@
{
"name": "@babel/helper-fixtures",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to support fixtures",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-fixtures",
"main": "lib/index.js",
"dependencies": {
"lodash": "^4.2.0",
"lodash": "^4.17.5",
"semver": "^5.3.0",
"try-resolve": "^1.0.0"
}

View File

@@ -196,6 +196,11 @@ export default function get(entryLoc): Array<Suite> {
if (fs.existsSync(sourceMapLoc)) {
test.sourceMap = JSON.parse(readFile(sourceMapLoc));
}
const inputMapLoc = taskDir + "/input-source-map.json";
if (fs.existsSync(inputMapLoc)) {
test.inputSourceMap = JSON.parse(readFile(inputMapLoc));
}
}
}

View File

@@ -1,13 +1,13 @@
{
"name": "@babel/helper-function-name",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to change the property 'name' of every function",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-get-function-arity": "7.0.0-beta.45",
"@babel/template": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/helper-get-function-arity": "7.0.0-beta.47",
"@babel/template": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-get-function-arity",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to get function arity",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45"
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-hoist-variables",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to hoist variables",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-hoist-variables",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45"
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "@babel/helper-member-expression-to-functions",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to replace certain member expressions with function calls",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-member-expression-to-functions",
"license": "MIT",
"main": "lib/index.js",
"author": "Justin Ridgewell <justin@ridgewell.name>",
"dependencies": {
"@babel/types": "7.0.0-beta.45"
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -82,5 +82,8 @@ const handle = {
// Optionally, a memoize method may be defined on the state, which will be
// called when the member is a self-referential update.
export default function memberExpressionToFunctions(path, visitor, state) {
path.traverse(visitor, Object.assign({}, state, handle));
path.traverse(visitor, {
...state,
...handle,
});
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-module-imports",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Babel helper functions for inserting module loads",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,10 +8,10 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-module-imports",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45",
"lodash": "^4.2.0"
"@babel/types": "7.0.0-beta.47",
"lodash": "^4.17.5"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.45"
"@babel/core": "7.0.0-beta.47"
}
}

View File

@@ -170,7 +170,9 @@ export default class ImportInjector {
optsList.push(importedSource);
}
const newOpts = Object.assign({}, this._defaultOpts);
const newOpts = {
...this._defaultOpts,
};
for (const opts of optsList) {
if (!opts) continue;
Object.keys(newOpts).forEach(key => {

View File

@@ -10,6 +10,7 @@ function test(sourceType, opts, initializer, expectedCode) {
}
const result = babel.transform("", {
cwd: __dirname,
sourceType,
filename: "example" + (sourceType === "module" ? ".mjs" : ".js"),
babelrc: false,

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-module-transforms",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Babel helper functions for implementing ES6 module transformations",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,11 +8,11 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-module-transforms",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-module-imports": "7.0.0-beta.45",
"@babel/helper-simple-access": "7.0.0-beta.45",
"@babel/helper-split-export-declaration": "7.0.0-beta.45",
"@babel/template": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45",
"lodash": "^4.2.0"
"@babel/helper-module-imports": "7.0.0-beta.47",
"@babel/helper-simple-access": "7.0.0-beta.47",
"@babel/helper-split-export-declaration": "7.0.0-beta.47",
"@babel/template": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47",
"lodash": "^4.17.5"
}
}

View File

@@ -38,7 +38,7 @@ export default function rewriteLiveReferences(
exportMeta.push(...data.names);
}
// Rewrite inititialization of bindings to update exports.
// Rewrite initialization of bindings to update exports.
programPath.traverse(rewriteBindingInitVisitor, {
metadata,
requeueInParent,

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-optimise-call-expression",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to optimise call expression",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-optimise-call-expression",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45"
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-plugin-test-runner",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to support test runner",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-test-runner",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.45"
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.47"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-plugin-utils",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "General utilities for plugins to use",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://babeljs.io/",

View File

@@ -34,7 +34,10 @@ function copyApiObject(api) {
}
}
return Object.assign({}, proto, api);
return {
...proto,
...api,
};
}
function has(obj, key) {

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-regex",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to check for literal RegEx",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-regex",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"lodash": "^4.2.0"
"lodash": "^4.17.5"
}
}

View File

@@ -1,15 +1,15 @@
{
"name": "@babel/helper-remap-async-to-generator",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to remap async functions to generators",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-annotate-as-pure": "7.0.0-beta.45",
"@babel/helper-wrap-function": "7.0.0-beta.45",
"@babel/template": "7.0.0-beta.45",
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/helper-annotate-as-pure": "7.0.0-beta.47",
"@babel/helper-wrap-function": "7.0.0-beta.47",
"@babel/template": "7.0.0-beta.47",
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,14 +1,14 @@
{
"name": "@babel/helper-replace-supers",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Helper function to replace supers",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-replace-supers",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-member-expression-to-functions": "7.0.0-beta.45",
"@babel/helper-optimise-call-expression": "7.0.0-beta.45",
"@babel/traverse": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45"
"@babel/helper-member-expression-to-functions": "7.0.0-beta.47",
"@babel/helper-optimise-call-expression": "7.0.0-beta.47",
"@babel/traverse": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-simple-access",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "Babel helper for ensuring that access to a given value is performed through simple accesses",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,8 +8,8 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-simple-access",
"main": "lib/index.js",
"dependencies": {
"@babel/template": "7.0.0-beta.45",
"@babel/types": "7.0.0-beta.45",
"lodash": "^4.2.0"
"@babel/template": "7.0.0-beta.47",
"@babel/types": "7.0.0-beta.47",
"lodash": "^4.17.5"
}
}

View File

@@ -1,11 +1,11 @@
{
"name": "@babel/helper-split-export-declaration",
"version": "7.0.0-beta.45",
"version": "7.0.0-beta.47",
"description": "",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/types": "7.0.0-beta.45"
"@babel/types": "7.0.0-beta.47"
}
}

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