13818 Commits

Author SHA1 Message Date
Huáng Jùnliàng
7eaf37ea3e
chore: use repository HEAD when pulling third party repos (#11837) 2020-07-14 18:14:25 -04:00
Babel Bot
cc646fa10a Add v7.10.5 to CHANGELOG.md [skip ci] 2020-07-14 18:51:51 +00:00
Huáng Jùnliàng
f7964a9ac5 v7.10.5 2020-07-14 14:10:36 -04:00
Huáng Jùnliàng
5dd64ecc4a
Disallow duplicated AST nodes (#11807) 2020-07-14 08:32:16 -05:00
Brian Ng
ffb42488ba
Bump some deps for audit (#11818) 2020-07-10 21:42:18 +02:00
Huáng Jùnliàng
02c8fd92bd
fix: add optional: false to chained optional call expression (#11814) 2020-07-09 20:33:50 -04:00
Rafael Salguero Iturrios
f32d5debda
Typescript transform now removes generic arguments from optional calls (Fixes #11813) (#11816) 2020-07-09 17:32:05 -05:00
James Addison
55ce749f42
Replace lodash 'clone' usage with ES6 Spread initializer (#11811) 2020-07-09 10:32:04 -05:00
James Addison
aae1862170
Replace lodash 'extend' usage with Object.assign (#11812) 2020-07-09 09:04:48 -05:00
James Addison
bff6298578
Reduce dependency on lodash functions: values, extends (#11798)
* Replace lodash 'values' usage with Object.keys => .map(obj[key])

* Block scoping: refactor letReferences, outsideLetReferences as objects of type Map

* Remove lodash dependency from babel-plugin-transform-block-scoping

* Fixup: Add missing Object.keys call

* Fixup: Update remaining property accessors

* Coerce Map.values() iterator results into an array via spread operator

* Fixup: Map.put -> Map.set

* Fixup: undo incorrect variable de-duplication

* Replace array-spread-plus-map combination with Array.from call

* Extract an extendMap function as an attempt to create an optimization boundary

* Experiment: cast objects to string (eliminates one Map/object difference per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map )

* Fixup: perform String cast on map keys, not values

* Revert "Fixup: perform String cast on map keys, not values"

This reverts commit abdd147438fa74f51ac50ef1f96bb462810cd3f2.

* Revert "Experiment: cast objects to string (eliminates one Map/object difference per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map )"

This reverts commit a4035c885b37bfd6e926a0362bda9dcf5b5a52c2.

* Experiment: filter keys via Object.prototype.hasOwnProperty.call

* Revert "Experiment: filter keys via Object.prototype.hasOwnProperty.call"

This reverts commit 491c093f213c6229815b2e6dc9243245376265b0.

* Migrate back from Map-based reference storage to Object-based storage; access performance appears much improved for Object property access

* Revert "Migrate back from Map-based reference storage to Object-based storage; access performance appears much improved for Object property access"

This reverts commit 2119acc7f0d78ced3b9ad77820b4b72e5ad67475.

* Iterate over a clone of outsideRefs keys

* Revert "Extract an extendMap function as an attempt to create an optimization boundary"

This reverts commit 85689f2bfc180d0b5c0e674e5de7954470c7ec69.

* Fixup: migrate remaining Object property access to Map.get in tdz module
2020-07-08 13:17:04 +02:00
Brian Ng
58cfaf20ee
Fix break/continue when switch is nested inside loop (#11802)
* Fix break/continue when switch is nested inside loop

* merge retCheck
2020-07-07 18:38:11 -04:00
Bogdan Savluk
b1a8e72e16
Refactor generated builder names in @babel/types (#11582)
* ensure only builders starting with lowercase are used

* update generate builders to have function name starting flow lowercase

* fix bug in deprecated builders

* remove comment about not yet discussed change in next major version
2020-07-07 09:53:00 +02:00
Huáng Jùnliàng
3a53f7244d
docs: update README example and REPL link (#11799) 2020-07-06 20:21:38 -04:00
James Addison
3e55270135
Reduce dependency on lodash functions: includes, uniq, repeat, isinteger (#11790)
* Replace lodash 'includes' usage with Array.prototype.includes

* Replace lodash 'values' usage with Object.values

* Replace lodash 'uniq' usage with Array.from(new Set(...))

* Property safety: ensure that ignoreSuites/ignoreTasks are populated prior to access

* Property safety: ensure that blacklistTypes is populated prior to access

* Revert "Replace lodash 'values' usage with Object.values"

This reverts commit 9fd3679d6db03066daee09fad0050e5292a32aa1.

* Replace lodash 'repeat' usage with String.prototype.repeat

* Replace lodash 'isinteger' usage with Number.isInteger

* Remove explicit lodash dependency from babel-generator package

* Update packages/babel-helper-transform-fixture-test-runner/src/index.js

Co-authored-by: Brian Ng <bng412@gmail.com>

* Rely on optional chaining operator as sole boolean check

* Handle additional optional chaining operator simplification

* Update type signature

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-07-06 09:27:41 +02:00
Huáng Jùnliàng
c664fbdd07
fix: update class properties support matrix (#11783) 2020-07-03 07:54:40 -04:00
Huáng Jùnliàng
0d444072ba
chore: refine yarn cache config (#11782)
* chore: refine yarn cache config

* fix: Circle CI does not support template on paths

* chore: manually update yarn cache key

* remove debug command
2020-07-03 07:53:25 -04:00
Huáng Jùnliàng
1a65ba76f0
test: add console warn spy on babel-register tests (#11780)
* test: add console warn spy on register tests

* address review comments
2020-07-02 11:32:41 -04:00
Huáng Jùnliàng
ae1e40a678
chore: remove babel-register generated test artifacts (#11776)
* chore: use customized cache path in babel-register path

* chore: remove node_modules cache after tests
2020-07-01 17:07:16 -04:00
Huáng Jùnliàng
d67629b114
fix: throw expect jsx plugin error when an idStart or > is seen (#11774)
* fix: throw expect jsx plugin error when an idStart or > is seen

* fix: avoid throwing undefined

* add test case
2020-07-01 15:17:05 -04:00
Huáng Jùnliàng
b1b21e5c03
docs: add AST spec on optional chain [skip ci] (#11729) 2020-07-01 14:20:17 -04:00
Kai Cataldo
3d498d05e7
Add note about running Make targets in Windows 10 (#11761) 2020-06-30 14:45:27 -04:00
Nicolò Ribaudo
12dc4966ad
Push changelog to main instead of master (#11764) 2020-06-30 17:43:11 +02:00
Nicolò Ribaudo
7ee7d16495 Add 7.10.3 and 7.10.4 to CHANGELOG.md 2020-06-30 16:53:42 +02:00
Huáng Jùnliàng
7fd40d86a0 v7.10.4 2020-06-30 09:04:22 -04:00
Simon Kotwicz
379e1c5593
Support private properties for semi rule (#11748)
* Support private properties for semi rule

* Combine selectors
2020-06-29 17:36:03 -04:00
Nicolò Ribaudo
5743ad3923
[regression] Don't validate file.comments in @babel/types (#11752)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-06-29 23:23:36 +02:00
Wojciech Maj
1dd94e813e
Replace non-inclusive "whitelist" and "blacklist" terms with "allowlist" etc. (#11758) 2020-06-29 15:39:38 -04:00
William Law
cfaa70dcf4
skip following empty statements in toSequenceExpression (#11724)
* fix: statementlist behavior

* fixed prettier and babel-types/converter errors

* added check for first node

* remove node length check, only check if node is first

* add reset eLU if proceeding is non-empty

* fix failure for ci tests

* remove .expressions since sequence expression isn't produced

* changed test title
2020-06-25 13:38:01 -04:00
Huáng Jùnliàng
65911144e9
support delete obj?.#x.a (#11669) 2020-06-23 16:10:29 -04:00
Kai Cataldo
75c2300c28
Add @babel/eslint-plugin-development-internal (#11376)
* Add @babel/eslint-plugin-internal

* Add dry-error-messages rule

* Address feedback

* Enable new rule

* fix author field

* Fix errors

* Add readme

* Add example configuration

* Handle directories

* run make bootstrap

* More updates!

* Fix errors

* Update tests

* Fix CI race condition
2020-06-22 19:43:29 -04:00
Jorge Henriquez
beca7e2d8e
Add better parser error when using jsx (#11722)
* Add "<" parser tests

*  No {jsx,flow,typescript} plugin

* Type parameter

* Valid JS Code

* Add: better parser error when using jsx

Address #11499

* Add: babel parser test

Test parser with no plugins and when jsx is given with a js expression

* Add: no flow but with typescript test

* Add: type paramter test with no plugins (no flow)

* Add: unclosed jsx element test
2020-06-22 18:12:52 -04:00
Huáng Jùnliàng
601c824873
Refine babel core types (#11544)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-21 22:04:12 +02:00
Huáng Jùnliàng
30835f14db
fix: implement early errors for record and tuple (#11652) 2020-06-20 02:35:27 +02:00
Huáng Jùnliàng
2787ee2f96 v7.10.3 2020-06-19 16:42:41 -04:00
Huáng Jùnliàng
7cc8f8db8a
Revert "chore: pin windows node.js version (#11522)" (#11730) 2020-06-19 11:41:38 +02:00
Nicolò Ribaudo
eea156b2cb Migrate from "master" branch to "main" (#11715)
* Remove dead link

* Use consistent "homepage" url in package.json

* Update md links

* Update comment link in parser d.ts

* Add comment in gitpod config

* Update circleci config

* Update PULL_REQUEST_TEMPLATE

* Update badges

* Trigger CI

* Update 404 link
2020-06-18 21:52:29 -04:00
Huáng Jùnliàng
e498bee10f
replace whitelist by allowlist in parser-tests (#11727) 2020-06-17 15:32:46 -04:00
Nicolò Ribaudo
fd3c76941e
[gitpod] Run "make watch" in a second terminal (#11718)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>

[skip ci]
2020-06-15 23:35:19 +02:00
骗你是小猫咪
e15a5c7509
Fix innercomments (#11697) 2020-06-12 20:22:47 -05:00
William Law
183acbae25
fix:added check for forXstatement pattern (#11703) 2020-06-12 08:22:33 -05:00
Nicolò Ribaudo
3704728637
Fix README markdown formatting [skip ci] 2020-06-12 01:05:37 +02:00
Nicolò Ribaudo
1b95879614
Setup Gitpod (#11704)
Co-authored-by: Brian Ng <bng412@gmail.com>

[skip ci]
2020-06-12 01:03:39 +02:00
Huáng Jùnliàng
b27abd39a8
fix: add optional: false to MemberExpression (#11709) 2020-06-12 00:26:26 +02:00
Justin Ridgewell
3fba9710dc
Allow templates to parse v8intrinsics (#11695)
* Allow templates to parse v8intrinsics

The `v8intrinsic` and `placeholders` parser plugins conflict, so enabling `placeholders` unconditionally was causing errors for V8's internal codemods. This allows them to set `syntacticPlaceholders = false` (so they'll use the legacy identifier format) and enable `v8intrinsic` by itself.

* Fix linter

* Linter
2020-06-10 14:50:09 -04:00
Bogdan Savluk
36f9798f42
improve node type definitions to avoid any's in generated types (#11687) 2020-06-09 00:39:46 +02:00
Bogdan Savluk
4108524856
Update prettier to v2 (#11579)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-07 22:21:33 +02:00
Jesse Thomson
426acf336e
Add React.createContext to @babel/plugin-transform-react-pure-annotat… (#11685)
Co-authored-by: Jesse Thomson <jesset@qualtrics.com>
2020-06-05 21:36:06 -05:00
Sajad Torkamani
9d289c1457
Fix small typo (#11682) 2020-06-05 15:08:56 -04:00
Huáng Jùnliàng
71d3527ef5
Properly parse export default from when exportDefaultFrom is not enabled (#11676)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-05 09:08:21 -05:00
Brian Ng
3874470841
Bump @babel/* deps (#11677) 2020-06-04 20:09:19 -05:00