12692 Commits

Author SHA1 Message Date
Huáng Jùnliàng
01927babe2 chore: update web.immediate support fixtures (#10612) 2019-10-29 16:23:59 +01:00
Mateusz Burzyński
9ada30c207 Use .find instead of .filter to get targetPath in ImportInjector (#10608) 2019-10-27 15:09:03 -04:00
ExE Boss
43065a9e24 fix(babel‑helpers/interopRequireWildcard): Avoid double nullis… (#10585)
* fix(babel‑helpers/interopRequireWildcard): Avoid double nullish check

* Update fixtures
2019-10-24 23:14:44 +02:00
Brian Ng
fce1b74105 Test node@13 on CircleCI (#10600) 2019-10-24 09:28:01 -04:00
Huáng Jùnliàng
562b6c3bbb chore: replace outdated travis-ci.org badges [ci skip] (#10593) 2019-10-22 21:35:02 -04:00
Huáng Jùnliàng
1770dace34 chore: test against Node.js 13 (#10591) 2019-10-23 00:23:20 +02:00
Matthew Whitworth
5b40845afe add test and fix for string literal case (#10578) 2019-10-21 17:39:03 +02:00
samuel kwok
fe258dec04 fix: _interopRequireWildcard should only cache objects (#10574)
* fix: [#10561] _interopRequireWildcard should cache object only

* fix: narrow down cache restriction to object/function type

* test: add interop require null module case
2019-10-19 12:01:38 +02:00
Nicolò Ribaudo
78cd63d9cf
Fix invalid test layout in @babel/parser 2019-10-18 11:16:17 +02:00
Nicolò Ribaudo
43b623c1f1
[traverse] Allow skipping nodes inserted with .replaceWith() (#9777)
* Avoid regression
2019-10-18 00:16:35 +02:00
Daniel Arthur Gallagher
b5b8055cc0 docs: add homepage link to @babel/runtime package.json (#10418)
* docs: add homepage link

Adds a homepage link to populate npmjs.com.
Update the repository property syntax.

* Update the repository link

Point to the root repo plus a reference to the subdirectory.

* style: drop HTML extension
2019-10-17 23:26:14 +02:00
Jaideep Bhoosreddy
da9c9a64c2 Add master branch workflow for test262 tests (#10556)
The results of these tests will be stored in build artifacts which will be used to compare with test262 runs on PR (future work!). Robin has also done a
lot of work to ensure all babel packages are properly linked to the
test runner. Additionally, Nicolo has helped in mentorship and
contributions to babel-test262-runner which is used here.

We're no longer giving xunit output to CircleCI because once it sees failing tests it will mark babel's master as broken. As a stopgap, it will render the test results in the mocha spec format, which is human readable.

Co-Authored-By: Robin Ricard <rricard2@bloomberg.net>
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2019-10-17 13:52:31 -04:00
Huáng Jùnliàng
8c94b3f209
Bump babel-types to ^7.6.3 (#10568)
* fix incorrect lerna bootstrap options

* chore: bump @babel/types dependencies to v7.6.3

* chore: remove ignore-engines on lerna bootstrap
2019-10-17 07:49:41 -04:00
gr
095f28a913 fix: Exclude catch clause from let identifier error (#10559)
* Exclude catch clause from let identifier error

* Disallow let binding based on parameter

* Add test

* Remove unused getter

* Update packages/babel-parser/src/parser/statement.js

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2019-10-17 09:30:36 +02:00
Huáng Jùnliàng
487f10f84d fix: disable caching when babel could not read/write cache (#10557)
* fix: disable caching when babel could not read/write cache

* emit warning when cache folder resides in readonly fs

* fix: always register save handler

* cache: maintain old behaviour

* test: add more test case

* fix: next tick tasks are FIFO

* test: disable test on Windows
2019-10-17 09:30:01 +02:00
piotr
5800fc97b3 [parser] Exception to 8 and 9 in tagged template (#10567) 2019-10-17 00:01:22 +02:00
Nicolò Ribaudo
2254542010
Don't use deprecated "lerna publish --require-scripts" (#10558) [skip ci] 2019-10-16 22:13:21 +02:00
Brian Ng
d234ff6572 Revert "chore: introduce envinfo into environment section (#10553)" (#10564)
This reverts commit 800eccc046ff71e4c2a0cbdb3fdddbae87933a71.
2019-10-16 10:56:35 -04:00
Huáng Jùnliàng
800eccc046 chore: introduce envinfo into environment section (#10553)
* chore: introduce envinfo into environment section [skip ci]

* Apply suggestions from code review

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* Address review comments from Nicolò

* Update .github/ISSUE_TEMPLATE/Bug_report.md [skip ci]

Co-Authored-By: Brian Ng <bng412@gmail.com>

* chore: simplify issue template [skip ci]
2019-10-16 09:12:13 -05:00
Gerald
cd5d3abc32 fix: String#italics is incorrectly defined in babel-preset-env (#10563) 2019-10-16 09:23:47 -04:00
Nicolò Ribaudo
272d85d0ad
Inject core-js@3 imports in Program:exit instead of on post() (#10146)
* Inject corejs3 imports in Program:exit instead of post

This allows them to be requeued and transformed by other plugins.

* Also entry

* Rebase

* Update packages/babel-preset-env/src/polyfills/corejs3/entry-plugin.js [skip ci]

Co-Authored-By: Brian Ng <bng412@gmail.com>
2019-10-15 23:46:10 +02:00
Nicolò Ribaudo
686186cabc
Attemp fixing @babel/node and cli errors on Travis on Windows (#10547)
For some reason, it looks like that the rimraf call didn't properly delete
the folder:

   EEXIST: file already exists, mkdir 'C:\Users\travis\build\babel\babel\packages\babel-node\test\tmp'
      150 |   process.chdir(__dirname);
      151 |   if (fs.existsSync(tmpLoc)) rimraf.sync(tmpLoc);
    > 152 |   fs.mkdirSync(tmpLoc);
          |      ^
      153 |   process.chdir(tmpLoc);
      154 | };

Lets try to reuse the existing folder rather than deleting and recreating it
2019-10-15 23:00:23 +02:00
Alejandro Sánchez
06313a6288 Allow duplicate __proto__ keys in patterns, simple case (#6705) (#10532)
* Allow duplicate __proto__ keys in patterns, simple case (#6705)

* Update test262 whitelist

* Rename checkDuplicatedProto's parameter and adjust type

* Store first __proto__ redefinition's position
2019-10-15 00:18:33 +02:00
Huáng Jùnliàng
dcf7d89b8e fix: remove filename annotation in buildCodeFrameError (#10539) 2019-10-14 18:19:55 +02:00
Nicolò Ribaudo
1b19608a5a
Update fixtures for core-js new version 2019-10-14 00:59:02 +02:00
Brian Ng
e28c8ac612 Fix generator missing parens around an arrow returning function type (#10519) 2019-10-11 21:22:42 -04:00
Nicolò Ribaudo
99035ca96e
Don't use args rest/spread to hoist super method calls (#9939)
* Don't use args rest/spread to hoist super method calls

* Hoist this in hoisted super method calls

* Make the code more readable

Review by edoardocavazza
2019-10-11 10:18:54 +02:00
Babel Bot
c455d2af86 Add v7.6.4 to CHANGELOG.md [skip ci] 2019-10-10 14:30:50 +00:00
Nicolò Ribaudo
a422ea64ee
v7.6.4 v7.6.4 2019-10-10 16:25:04 +02:00
Nicolò Ribaudo
34d30e28d6 Revert "chore: Upgrade source-map to 0.6.1 (#10446)" (#10536)
This reverts commit cc080417b995e2903352e7956890e0c74b23d4c9.
2019-10-10 09:03:49 -05:00
Huáng Jùnliàng
3ad4c70d3a fix prepublish-build (#10530) 2019-10-09 07:40:02 +02:00
Nicolò Ribaudo
34937f13d5
Trailing comma after rest - The final fix (#10491)
* [parser] Track trailing commas in extras instead of state

* Update existing tests

* Update test262 whitelist

* Improve error message and location

* nit

* Use lookaheadCharCode
2019-10-08 23:08:50 +02:00
Babel Bot
c7add11fdc Add v7.6.3 to CHANGELOG.md [skip ci] 2019-10-08 19:33:00 +00:00
Nicolò Ribaudo
d329156ebc
v7.6.3 v7.6.3 2019-10-08 21:31:40 +02:00
Nicolò Ribaudo
25b35261ca
Update test262 [skip ci] 2019-10-08 20:39:07 +02:00
Huáng Jùnliàng
563874c06c Do not remove let bindings even they are wrapped in closure (#10343)
* fix: should not remove let binding even it is wrapped in closure

Fixes #10339

* fix: remove bindings defined in blockScope when wrapped in closure

* Move test assertions to the top level to ensure that they run
2019-10-08 19:43:12 +02:00
Tan Li Hau
b0acfb24dd add scope to TSModuleDeclaration (#10119) 2019-10-08 19:35:40 +02:00
Nicolò Ribaudo
599d2ff324
Update yarn.lock [skip ci] 2019-10-08 19:16:36 +02:00
Huáng Jùnliàng
0856618ed5 perf: replace lookahead by lookaheadCharCode (#10371)
* perf: replace lookahead by lookaheadCharCode

* fix: flow ignore

* refactor: add nextTokenStart method

* refactor: duplicated isNewLine code

* refactor: remove lookahead usage from babylon core
2019-10-08 19:09:05 +02:00
Jessica Franco
bc0966a46f Add declarations for more of @babel/types exports (#10504)
This adds lots of missing declarations to the types of @babel/types,
including many utility functions useful to plugin authors.

With the typescript types, I tried to make them as useful as possible
for control flow analysis / inference, but Flow doesn't seem to
support overloads and I'm not as familiar with it anyway so it has
simpler types.
2019-10-08 19:07:57 +02:00
Nicolò Ribaudo
3498195ae2
Do not hoist jsx referencing a mutable binding (#10529) 2019-10-08 18:50:03 +02:00
Henry Zhu
fbf3cb0ac4 Misc: also lock old PRs [skip ci] (#10524) 2019-10-03 15:46:07 -05:00
Brian Ng
e6264a0992
Bump jest@24.9.0 (#10520) 2019-10-02 18:32:34 -05:00
Huáng Jùnliàng
0b37ab0362 Use make -j for parallel build (#10506)
* build: add build-babel-types task

* chore: revamp Makefile to for parallel builds

* chore: style fix

* chore: skip install step as we handle yarn in makefile

* test job execution order
2019-10-03 00:17:04 +02:00
Brian Ng
57ae306457
Bump flow@0.108.0 (#10516) 2019-10-02 12:13:58 -05:00
David J. Hamilton
fa5a40c8d5 assertNoDuplicates throw with more context (#10419)
When users see errors like

```
Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.

  plugins: [
    ['some-plugin', {}],
    ['some-plugin', {}, 'some unique name'],
  ]
```

It can be difficult to determine the source of the conflict, especially
in a larger build system.

This commit outputs what is known about the plugins that actually
conflict, which can be helpful for users to determine the root cause of
the conflict.

Partially addresses #9778
2019-10-02 16:45:03 +02:00
Nicolò Ribaudo
a219b6de7a
Disallow await inside async arrow params (#10469)
* Disallow await inside async arrow params

* Use -1 as default for awaitPos/yieldPos
2019-10-02 07:37:40 +02:00
Huáng Jùnliàng
fa5057f9fb Flow: interface identifier should be declared in the scope (#10220)
* fix: typo

* declare name for flow interface

* add test case for export overload function, typescript

* test: add test

Fixes #10044

* test: update test

* test(flow): add multiple declarations regression test

* re-enable flow test case

# Conflicts:
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-declare-statements/input.js
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-interfaces-module-and-script/input.js
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-iterator/input.js

* test: disable two flow dupl-decl test

* fix: do not declare name for declare function until we figure out a better way

* test: duplicate declare function and function would not throw
2019-10-02 07:32:42 +02:00
Brian Ng
02f2d17e83 Revert "Try different name for used-by feature again [skip ci]" (#10515)
This reverts commit b351f29033ac109c2140dc6762758ffbf88522c9.
2019-10-01 23:29:04 -04:00
Henry Zhu
b351f29033 Try different name for used-by feature again [skip ci] (#10513) 2019-10-01 21:36:22 +02:00