Huáng Jùnliàng
21c9141872
Refactor: add parser message template ( #11192 )
...
* refactor: add raiseWithData method
* refactor: error message template
* fix missing plugin error structure
* fix flow errors
* refactor: use error message template in eslint plugin
* refacotr: use error message template in flow plugin
* refactor: use error message template in typescript plugin
* refactor: use error message template in jsx plugin
* address review comments
* Update packages/babel-parser/src/parser/location.js
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-03-03 14:06:05 -05:00
Nicolò Ribaudo
114f6726a7
Pass URLs to import() rather than paths ( #11193 )
...
* Pass URLs to import() rather than paths
* Make tests pass
* (╯°□°)╯︵ ┻━┻
* (╯°□°)╯︵ ┻━┻ (╯°□°)╯︵ ┻━┻ (╯°□°)╯︵ ┻━┻
2020-03-03 19:54:01 +01:00
vages
2603c2e227
fix(babel-parser): chain off optionally chained keys named cla… ( #11198 )
...
* fix(babel-parser): chain off optionally chained keys named class and function
Fixes #11197
* Extract override as variable to satisfy typechecker
Flow did not trust that curContext.override would be defined
2020-03-03 18:27:41 +01:00
Nicolò Ribaudo
8f281f578d
Bump regenerator ( #11191 )
2020-03-02 17:54:13 +01:00
Daryl Tan
9015fda3c1
Fix scope of function body when var redeclares param ( #11158 )
...
* Fix scope of function body when var redeclares param
* Fix empty var declarations
* Apply suggestions
2020-03-01 16:26:22 +01:00
Sagiv ben giat
a39beda58b
print parenthesis around forced calls of optional chains ( #11190 )
2020-02-28 18:43:43 -05:00
George Zahariev
9c261aeafe
Add "Statement" as alias to Flow enum declaration ( #11184 )
2020-02-28 09:24:25 +01:00
Nicolò Ribaudo
d13fd7c7bd
Add .yarn/install-state.gz to .gitignore [skip ci]
2020-02-27 22:05:39 +01:00
Nicolò Ribaudo
9b16bf3bd2
Set correct version for @babel/eslint-plugin-development ( #11181 )
...
[skip ci]
2020-02-27 21:45:57 +01:00
James C. Davis
a5f63299eb
TypeScript: Preserve decorated definite class properties ( #11129 )
...
* test: update fixture with decorated definite class property
* fix: don't remove decorated definite class properties
2020-02-27 21:31:23 +01:00
Babel Bot
bb97823abd
Add v7.8.6 to CHANGELOG.md [skip ci]
2020-02-27 12:21:40 +00:00
Nicolò Ribaudo
750d3dde3b
v7.8.6
2020-02-27 13:17:19 +01:00
Huáng Jùnliàng
e9ea523c5b
replace gulp-watch by gulp.watch ( #11175 )
...
* chore: remove gulp-watch
* chore: update lock file
2020-02-26 18:08:28 -05:00
Nicolò Ribaudo
0018881f9d
Add missing dependencies ( #11170 )
2020-02-25 23:40:48 +01:00
Huáng Jùnliàng
afb0f489de
Enable more eslint recommended rules ( #11168 )
...
* chore: enable no-constant-condition
* chore: enable no-empty rule
* chore: enable no-unreachable
* chore: enable no-cond-assign
* chore: enable no-inner-declarations
* chore: remove disabled rules that are not in eslint:recommended
* fix: oops
2020-02-24 19:04:25 -05:00
MO
2d1bac9666
fix: search for browserslist if esmodules is falsy ( #11124 )
...
* fix: search for browserslist if esmodules is falsy
closes #11123
* fix: delete falsy targets.esmodules
* style: fix code style
* fix: remove esmodules after being consumed
2020-02-24 22:30:24 +01:00
Nicolò Ribaudo
a192c0fcd3
Update preset-env fixture
2020-02-24 22:29:03 +01:00
Huáng Jùnliàng
eaff9f837a
chore: migrate lock threads to github actions ( #11163 )
...
Co-Authored-By: Armin Sebastian <hi@armin.dev>
Co-authored-by: Armin Sebastian <github@armin.dev>
2020-02-22 11:18:52 +01:00
Huáng Jùnliàng
2ce7008173
chore: specify dependency rule of check-compat-data-ci ( #11164 )
2020-02-21 15:58:19 -05:00
Nicolò Ribaudo
4b045819b8
Mark wrapNativeSuper and wrapRegExp as pure ( #11134 )
2020-02-21 09:15:59 +01:00
Huáng Jùnliàng
a583eab41f
fix: workaround misleading ENOENT error ( #11160 )
2020-02-20 23:30:42 -05:00
Huáng Jùnliàng
223cee7246
Parse declare modifier around accessibility modifiers ( #11146 )
...
* fix: parse declare modifiers around accessibility modifiers
* test: add tests
* fix: check duplicate modifiers in modified nodes
* fix flow error
2020-02-20 23:29:47 -05:00
Kai Cataldo
3960f4de64
Breaking: align babel-eslint-parser & espree ( #11137 )
...
* Chore: align babel-eslint-parser & espree
* Start program at beginning of comment when no tokens exist
* Import correct version of Espree for tests
* Remove hasOwnProperty guard
2020-02-20 17:31:57 +01:00
Huáng Jùnliàng
1613418f9b
Update preset-env builtin-definitions ( #10929 )
...
* chore: build corejs3-proposals.json from core-js-compat
* fix: include finished proposals by default
* update test fixtures
* update test fixtures
* chore: rename scripts
* fix: add standarized entries for finished proposals
* refactor: remove unused finished proposals json
* revert test fixtures update
* test against corejs 3.6
* fix: move corejs builtin definitions to babel/compat-data
2020-02-17 19:30:53 +01:00
liuxingbaoyu
31b0506040
fix: @babel/traverse can't use path.remove() with noScope ( #11136 )
2020-02-14 12:19:32 -05:00
Nicolò Ribaudo
4cfbd64f6c
Add Yarn 2 files to .gitignore ( #11143 )
...
[skip ci]
2020-02-14 00:33:06 +01:00
Nicolò Ribaudo
d21e2217d5
Skip newlines around inline #__PURE__ annotations ( #11133 )
...
* Skip newlines around #__PURE__ annotations
* Update tests
2020-02-13 19:16:33 +01:00
Siddhant N Trivedi
3c6a8ae200
Fix rewriteThis in helper-module-transforms for computed class… ( #11109 )
...
* Fix rewriteThis in helper-module-transforms for computed class elements
* Added test file and corrected the visitor
* Revert .gitignore
* Using skipAllButComputedKey method from plugin-replace-supers
* added tests for class methods
* Added tests for both class properties and methods and fixed skipping computed key for methods
* Fixed condition for class methods
* revised the conditions for class methods
* Added more tests and used else-if in classmethod condition
* Update packages/babel-helper-replace-supers/src/index.js
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-02-12 21:19:10 +01:00
Siddhant N Trivedi
3fc904e1d4
Fix classNameTDZError in computed prototype methods with class fields ( #11068 )
...
* Draft fix for TDZError in computed prototype methods
* Added tests for loose:false and also extracted handleClassTDZ
* Added state parameter to handleClassTDZ function
* Extracted the state object to a variable
* Added helper comments for environmentVisitor
* Added else condition to traverse computed Path
* Cached computed path key into a variable
2020-02-12 11:55:38 +01:00
Brian Ng
157bb6e831
Fix typing of ReplaceSupers options ( #11121 )
...
* Fix type opts.getObjetRef to opts.getObjectRef
* Added // @flow to possibly catch for more errors.
* tweaks
Co-authored-by: InsignificantReasons <41794038+InsignificantReasons@users.noreply.github.com>
2020-02-11 10:55:46 +01:00
Martin Forsgren
bc308a1b15
Respect preserveComments option in tempate.ast() ( #11112 )
2020-02-11 10:34:21 +01:00
Daryl Tan
3907396bd8
Allow redeclaration of loop variable in body ( #11088 )
2020-02-11 10:19:03 +01:00
Huáng Jùnliàng
865d5155c2
Add eslint-plugin-jest ( #11119 )
...
* chore: add eslint-plugin-jest
* chore: update test sources
* chore: suppress preset-env debug log when linting
2020-02-11 00:11:32 +09:00
Nicolò Ribaudo
a4d5c6253e
Update preset-env fixtures ( #11120 )
2020-02-10 23:32:31 +09:00
Huáng Jùnliàng
df78258765
chore: use npm install in babel-test262-runner setup ( #11113 )
...
* chore: use npm i on babel-test262-runner
* chore: use npm ci
2020-02-10 07:53:44 +01:00
Huáng Jùnliàng
38529699d6
Refactor await/yield production parameter tracking ( #10956 )
...
* test: add test fixtures
* refactor: track AWAIT and YIELD in separate handler
* fix flow errors
* add flow type annotation to production-parameter
* address review comments
* refactor: track [Return] parameter
2020-02-09 15:31:29 +01:00
Nicolò Ribaudo
8ab27c8ffe
Wrap type-only class fields in flow comments ( #11096 )
...
* Wrap type-only class fields in flow comments
* Fix
2020-02-09 11:45:42 +01:00
Vedant Roy
dadba01249
Fix export bindings not updated by 'for...in' and 'for...of' ( #11074 )
...
* Correctly transpile export bindings for some for-of loops
* Correctly transform non-destructured for of loops to update exported variables
* Add tests
* Don't replace entire for of loop
* Correctly transform destructured for-of/for-in exports
* Update exported variables in array pattern and more fixes
* Refresh test output
* Update tests and rebase on master
* Refactor ForOf|ForIn visitor
* Don't transform re-declared exported vars
* Generate better name for loop id
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* Idiomatically generate UidIdentifier
* Update scope after replacing loop declaration
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-02-09 11:41:29 +01:00
Kai Cataldo
5aa368cec1
Centralize @babel/eslint-* tests ( #11106 )
...
* Centralize @babel/eslint-* tests
* Enable linting of @babel/eslint-* test files
* Add missing sourceType
2020-02-08 10:04:49 -05:00
Huáng Jùnliàng
1599e9025d
fix: specify sourceFileName when generating inline sourcemaps ( #10797 )
2020-02-07 22:42:18 +01:00
Huáng Jùnliàng
0b3dea8f54
Turn on no-fallthrough rule ( #11093 )
...
* chore: turn on no-fallthrough
* chore: fix no-fallthrough errors
2020-02-07 22:05:19 +01:00
Nicolò Ribaudo
5e58903250
Remove stage presets from the monorepo ( #11101 )
...
babel/babel-archive already includes the last working version of these presets (v7.0.0-beta.52), and they have been throwing since 7.0.0
2020-02-06 18:02:59 +01:00
Nicolò Ribaudo
755ec192e2
Archive @babel/preset-env-standalone ( #10993 )
...
* Move @babel/preset-env-standalone to babel-archive
babel/babel-archive@a1fadd2d77
* Move tests to @babel/standalone
* Remove references in build scripts
* Update lockfile
* Delete duplicated test file.
It's already in babel-standalone/test/babel.js
2020-02-06 01:03:36 +01:00
Jacob Williams
761563571c
Make isReferenced return false for method parameter name ( #11089 )
...
* Change isReferenced to return false for object/class method parameter names.
* use indexOf instead of for-of loop
* replace `.indexOf` check with `.includes` and assume `parent.params` exists
Co-Authored-By: Justin Ridgewell <justin@ridgewell.name>
* check .params within case block for ClassMethod/ClassPrivateMethod/ObjectMethod only
* add comment clarifying that case clause fall-through is intentional
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2020-02-06 00:59:16 +01:00
Nicolò Ribaudo
0ae61f060a
Update fixtures again ( #11094 )
2020-02-04 23:09:38 +01:00
Liam Doran
11d9826e77
Fix Async Generic After Await Parsing Error ( #11092 )
...
* test: add test case
* fix: reset awaitPos before parsing generic arrow fn
* fix: maybeInArrowParameters reset to true
2020-02-04 23:06:04 +01:00
Nicolò Ribaudo
636c1dc86d
Only download compat-table if it's not already downloaded ( #11081 )
...
* Only download compat-table if it's not already downloaded
* Use git rev-parse
2020-02-04 22:39:15 +01:00
Nicolò Ribaudo
bd1daa756e
Update fixtures after browserslist release ( #11091 )
2020-02-04 09:19:14 +01:00
Brian Ng
779f00b8e9
Update @babel deps ( #11072 )
2020-02-01 01:00:47 +01:00
Kai Cataldo
f987821099
Clean babel-eslint-*/**/lib ( #11070 )
2020-01-31 20:49:27 +01:00