13984 Commits

Author SHA1 Message Date
iamfotx
59d97d9bca
[parser] Better error message for missing number exponent (#12072)
* fix(babel-parser) better error message for missing number exponent after 'e'

* fix(babel-parser) requested changes

* msg

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:17:38 +02:00
Huáng Jùnliàng
f697e7995d Transform class static block (#12143)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:16:24 +02:00
Huáng Jùnliàng
3ccca88178 Parse class static block (#12079)
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:16:24 +02:00
Brian Ng
6830c90ac9
Support TypeScript mapped type 'as' clauses (#12129) 2020-10-14 20:16:22 +02:00
Nicolò Ribaudo
3fd963fdc8
[ts] Add support for template interpolations in types (#12131)
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 20:15:42 +02:00
Nicolò Ribaudo
9f40d6fcd0
[ts] Add support for the "intrinsic" keyword (#12147) 2020-10-14 20:15:17 +02:00
Guy Bedford
9c7d9c0fe5
SystemJS top-level await support (#12163)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-10-14 20:14:52 +02:00
Huáng Jùnliàng
d0d1fdb921
Add jsxPragmaFrag support to typescript transform (#11950) 2020-10-14 20:12:57 +02:00
James Addison
94b5f92e39
Replace lodash 'defaults' usage with ES6 Spread initializer (#11797)
Co-authored-by: Corey Farrell <git@cfware.com>
2020-10-14 20:10:44 +02:00
Huáng Jùnliàng
136e6301cb
Check if param is assignable when parsing arrow return type (#11992) 2020-10-14 20:09:48 +02:00
Huáng Jùnliàng
4e66b8eb6b
Specify runtime exports (#10853) 2020-10-14 20:06:56 +02:00
Huáng Jùnliàng
21d7ee2610 String import/export specifier (#12091)
* feat: parse moduleExportName
* feat: add validators
* Support string specifier name in commonjs transform
* Support string specifier name in export-ns-from
* test: add loose testcases
* test: add testcases for amd and umd
* feat: support systemjs
* test: update fixtures fixed in #12110
* add plugin name typings
* test: rename test layout
* feat: implement under moduleStringNames flag
* chore: add plugin syntax module string names
* feat: support ModuleExportName as ModuleExportName
* test: update test fixtures
* fix flow errors
* docs: update AST spec
* feat: support { "some imports" as "some exports" }
* feat: support { "some imports" as "some exports" } in systemjs
* test: add test on `import { "foo" }`
* Address review comments
* add moduleStringNames to missing plugin helpers
* Apply suggestions from code review
* update test fixtures
* Update packages/babel-parser/src/parser/error-message.js
* update test fixtures

Co-Authored-By: Kai Cataldo <kai@kaicataldo.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 20:01:37 +02:00
Nicolò Ribaudo
1b90d90fcc Instantiate presets before plugins (#11689) 2020-10-14 19:59:02 +02:00
Devon Govett
ce7b170ab7 Return a list of files that were read from loadPartialConfig (#11907) 2020-10-14 19:59:02 +02:00
Sosuke Suzuki
a5bed04f55
Make asserts property boolean, not undefined (#12167) 2020-10-13 23:56:08 +02:00
Nicolò Ribaudo
d49e5507ae
Remove unused devDependency from @babel/register (#12166) 2020-10-12 16:07:30 +02:00
Brian Ng
13a1cfd396
Move check for TSTypeCastExpression to catch another case (#12161) 2020-10-11 13:03:57 +02:00
Huáng Jùnliàng
62965e3880
Archive plugins (#12117) 2020-10-09 16:29:37 +02:00
Ryan Rhee
ebec7c8baf
[babel-types] Add extra property to BaseNode type (#12136) 2020-10-09 16:29:04 +02:00
An Phi
f6bd7493a8
fix transform-typescript logic to remove definite fields (#12149) 2020-10-08 12:35:43 -05:00
Huáng Jùnliàng
e6669988d0
chore: bump gulp-cli to 2.3.0 (#12154) 2020-10-08 11:04:44 -04:00
Nitin Kumar
3ec4537baa
chore: update issue templates (#12142)
[skip ci]
2020-10-06 16:04:49 +02:00
Nicolò Ribaudo
8c4e76c69e Run 'yarn dedupe' 2020-10-05 18:32:03 +02:00
Huáng Jùnliàng
769669f6f8
hack: use chokidar@2 only on node < 8 (#11560) 2020-10-05 18:24:27 +02:00
Nicolò Ribaudo
2a3dfa051a
Yarn 2.3 (#12134)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-10-05 17:39:14 +02:00
Huáng Jùnliàng
5f83a8c1a2
Handle cases when ?? and ?. is in binding initializers (#12032)
* test: add test for nullish coalescing

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

* test: add control group

* test: add tests for optional chaining

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

* test: add tests on optional chaining mixed with private class elements

* fix: wrap member chains to IIFE when it is in parameter default

* chore: add more testcases

* chore: update test fixtures

* fix: NodePath.get is always non nullish

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-10-03 10:03:58 -04:00
Luna Ruan
9808d2566e
add js extension to react runtime (#12116) 2020-09-30 08:31:45 +02:00
Иван Плесских
7ad9917793
[transform-typescript] Fix import elision for type exports (#12122) 2020-09-29 14:35:57 -05:00
Huáng Jùnliàng
e0b2bfb78f
fix: mark Pattern in CatchClause as scope (#12119) 2020-09-29 15:04:24 -04:00
Huáng Jùnliàng
afc03581cc
chore: bump electron-to-chromium (#12118)
* chore: bump electron-to-chromium

* test: update test fixtures
2020-09-29 13:51:20 -04:00
Sosuke Suzuki
45f0cc2ed9
Recover from error for missing initializer in const declaration (#12120) 2020-09-29 18:40:51 +02:00
Brian Ng
3ba1ece0ce
Fix printing TSTypeOperator (#12114) 2020-09-28 11:01:13 -05:00
Huáng Jùnliàng
62df8d2b79
fix: push exported variable when hoisting export declared names (#12110) 2020-09-28 11:38:39 -04:00
Niklas Mischkulnig
a080c82777
[cjs] Skip duplicate reexported bindings in namespace reexports (#11739) 2020-09-28 16:22:13 +02:00
Sosuke Suzuki
39a12674b4
Improve syntax error for class fields in ambient context (#12108)
* Improve error messages for ambient context class fields

* Modify switching state.isDeclareContext for class fields with declare
2020-09-26 15:52:12 -04:00
Huáng Jùnliàng
3d5da4c2b9
fix: apply terser plugin only on *.min.js (#12099)
* fix: apply terser plugin only on *.min.js

* chore: move rollup terser to output plugin

* chore: simplify rollup build scripts
2020-09-26 15:50:34 -04:00
Sosuke Suzuki
434b65bc2a
[ts] Throw a syntax error for index signature with declare (#12111) 2020-09-26 18:06:13 +02:00
overlookmotel
1a074ee7e6
Ensure expressions wrapped in parens (#12082) 2020-09-25 15:58:04 -05:00
Huáng Jùnliàng
63d9f5397b
Update minimum node version in build requirement (#12098) 2020-09-25 15:25:42 -04:00
Ananda Umamil
af612db8c3
Fix @babel/generator does not print decorators of private properties (#12081) 2020-09-25 08:16:28 -05:00
Huáng Jùnliàng
6d87f46a7a
Bump compat-table (#12073)
* chore: update compat-table data source

* refactor: use chromeVersions from electron-to-chromium

* chore: deduplicate yarn.lock
2020-09-24 16:28:26 -04:00
Huáng Jùnliàng
f2da186714
refactor: add @babel/helper-validator-option (#12006)
* refactor: add @babel/helper-validator-option

* refactor: simplify validateTopLevelOptions

* perf: the recursive version is not practically fast

* Update packages/babel-helper-validator-option/README.md

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

* Update packages/babel-helper-validator-option/src/validator.js

* fix: incorrect type annotation

* refactor: use babel/helper-option-validator in babel/compat-data

* chore: fix flow types error

* Address review comments

* address review comments

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-09-24 16:23:35 -04:00
Sosuke Suzuki
0d32e3fc36
Add missing tests for TypeScript syntax errors (#12103)
* Add missing tests for index signatures with modifiers

* Add missing test for import type
2020-09-24 14:38:11 -04:00
Tim Gates
1334bc99e0
docs: Fix simple typo, preprelease -> pre-release (#12102)
There is a small typo in packages/babel-core/src/transformation/file/file.js, packages/babel-plugin-transform-runtime/src/helpers.js.

Should read `pre-release` rather than `preprelease`.
2020-09-23 16:06:21 -04:00
Justin Ridgewell
f49234aa69
Add sourcemap markings for each line of a string (#12086)
* Add sourcemap markings for each line of a string

Fixes https://github.com/babel/babel/issues/12083

* Fix for multiple newlines

* Optimize with indexOf

* Comment explaining newline search
2020-09-22 21:36:21 -04:00
Sosuke Suzuki
a4a14caee7
Throw a syntax error for empty type parameter/argument (#12088) 2020-09-22 08:26:30 -05:00
Sosuke Suzuki
cb4e436018
Throw an error for a declare class field that have an initializer (#12093) 2020-09-22 08:23:58 -05:00
Sosuke Suzuki
3628c52867
Do not throw an error for optional binding pattern params in function declaration (#12085) 2020-09-21 09:14:13 -05:00
fisker Cheung
18d13d0032
Fix invalid setter parse (#12076)
* Fix invalid `setter` parse

* estree

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-09-19 10:03:35 +02:00
Sosuke Suzuki
ae18f9c0d9
Throw a syntax error for a declare function with a body (#12054) 2020-09-19 00:35:37 +02:00