renovate[bot]
ecae53a98e
chore(deps): update dependency typescript to ~4.5.0 ( #14018 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-12-02 16:59:11 +01:00
Sneh Khatri
029cd15bd9
Fix JSX pragma anywhere in comment ( #14012 )
...
* Fix JSX pragma anywhere in comment
* jsx regex patterns support jsx docs
* removed extra spaces from regex patterns
2021-12-02 10:35:44 -05:00
Nicolò Ribaudo
36a5ac4145
Fix handling of this&co in computed keys in arrows transform ( #14005 )
2021-11-30 22:54:17 +01:00
Nicolò Ribaudo
29de280006
Use Node.js interop when importing lib in test ( #13995 )
2021-11-29 21:48:34 +01:00
Nicolò Ribaudo
1bbe1fc3cb
Regenerate monorepo READMEs ( #14006 )
...
* Fix script to generate readmes
* Regenerate READMEs
2021-11-29 10:03:23 -05:00
Nicolò Ribaudo
23fec0c8c9
Update to prettier 2.5.0 ( #14000 )
2021-11-26 10:48:16 +01:00
Bogdan Savluk
0058b7fef4
Migrate Babel from Flow to TypeScript (except Babel parser) ( #11578 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-25 23:09:13 +01:00
Nicolò Ribaudo
473f145b27
Don't use ESM for required files in @babel/helpers tests ( #13996 )
2021-11-25 16:19:07 +01:00
Huáng Jùnliàng
55f020e02d
Convert proposal-object-rest-spread to TS ( #13948 )
...
* chore: add typings to object-rest-spread
* chore: bundle object-rest-spread package
* improve type inference
* address review comments
2021-11-24 10:48:31 -05:00
Nicolò Ribaudo
ad1798ed48
Only bundle the release build, and don't import src in tests ( #13978 )
...
* Only bundle the release build, and don't import `src` in tests
* Use file extension to signal skipping
* Remove unnecessary config change
* Fix imports
2021-11-24 10:08:53 -05:00
Nicolò Ribaudo
75996cb62b
Use full import specifier path in tests ( #13938 )
2021-11-24 11:43:18 +01:00
Huáng Jùnliàng
a470f7b479
Recover from shorthand assign exprs ( #13968 )
...
* refactor: avoid duplicate property access
* refactor: tweak parseMember
* polish: recover from shorthand assign in exprs
2021-11-19 10:22:29 -05:00
Mickey Rose
cd77ad1680
minify helpers-generated.ts ( #13837 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-18 23:51:28 +01:00
Huáng Jùnliàng
d30308fe8e
fix: update UnexpectedPrivateField error message ( #13975 )
2021-11-17 18:54:23 +01:00
Babel Bot
99774ee9fa
v7.16.4
2021-11-16 22:37:47 +00:00
Sosuke Suzuki
87fc2e76d7
Add assertions to ExportNamedDeclaration without from ( #13957 )
2021-11-16 11:53:28 +01:00
Francisco Ryan Tolmasky I
966387d263
Always expose expressionValue in DirectiveLiteral nodes ( #13960 )
...
* fix(babel-parser): Move storage of expressionValue in DirectiveLiteral to main parser so it is accessible to others.
Closes #13953 .
Reviewed by @tolmasky.
* Add results from running `OVERWRITE=true yarn jest babel-parser`.
Reviewed by @tolmasky.
2021-11-13 20:46:16 -05:00
M Behzad
d3fffd95b6
Add file extension when using absoluteRuntime ( #12827 )
...
* fix: add file extention when the absolute path to the runtime files are used (#12824 )
the es module imports need the file extention (e.g. import "@babel/runtime/helpers/jsx.js", Or the filenames being listed in the package.json's subpath exports (e.g. "import "@babel/runtime/helpers/jsx" + pkg: "./helpers/jsx": "./helpers/jsx.js"). when the user passes a path via `absoluteRuntime` then the rendered require staemnts is not the module name + subpath which will be resolved via pkg.json but rather the absolute path to the file. for this case, add the file extention / index.js to prevent bundlers from raising a warning.
* Update deps
* Fix imports resolution
* Update fixtures (Windows)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-11-14 02:03:30 +01:00
Nicolò Ribaudo
d16f8111ea
Wait the correct number of ticks on nested await ( #13961 )
2021-11-14 02:02:35 +01:00
Huáng Jùnliàng
54c539ecc1
Refactor bindingProperty parsing ( #13929 )
...
* refactor: inline parseMaybePrivateName
* correct test case
* perf: fast exit in checkExpressionErrors
* refactor: add parseBindingProperty
* fix: private property with variance
* Update packages/babel-parser/src/parser/expression.js
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* chore: update testcase
* refactor: remove refExpressionErrors for record/tuple
They are always non-ambiguous.
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-12 10:11:46 -05:00
Sneh Khatri
135ab837bc
Throw on duplicate __proto__ props followed by assignment ( #13951 )
2021-11-12 14:45:56 +01:00
Huáng Jùnliàng
f731522125
chore: update compat-data ( #13949 )
...
* chore: update compat-data
* update compat-data sources
* fix: exclude deno from compat-data
* update test fixtures
* update Babel 8 test fixtures
2021-11-10 15:39:34 -05:00
Babel Bot
3b6f061e18
v7.16.3
2021-11-09 21:44:15 +00:00
Mickey Rose
74bec41db5
fix(helpers): match Reflect.get behaviour ( #13862 )
2021-11-09 17:39:41 +01:00
Nicolò Ribaudo
43f989941b
Support transforming params of arrow functions in class fields ( #13941 )
2021-11-09 12:12:23 +01:00
Sneh Khatri
a6a526968d
fix: incorrect await rejection following arrow function in parameters ( fixes #13872 ) ( #13928 )
...
* fix: incorrect await rejection following arrow func in params
* expressionScope.exit() shifted to end
* test added for yield
2021-11-05 15:41:31 -04:00
Huáng Jùnliàng
7250d2562b
Simplifiy tracking of valid JSX positions ( #13891 )
...
Remove `state.inPropertyName` and simplifies `state.canStartJSXElement` tracking
2021-11-04 17:12:42 +01:00
Nicolò Ribaudo
76e4566bfc
Update browserslist ( #13914 )
2021-11-02 07:20:58 +01:00
Huáng Jùnliàng
1fa759f989
refactor: extract tt.lt and tt.gt from tt.relation ( #13892 )
2021-11-01 21:15:42 -04:00
Babel Bot
68fad796b1
v7.16.2
2021-11-01 21:47:31 +00:00
Huáng Jùnliàng
833b39112d
fix: early return when param binding is not found ( #13910 )
2021-11-01 15:11:30 -04:00
Sosuke Suzuki
cba7f9e503
Add missing assertions type ( #13905 )
2021-11-01 08:43:39 -04:00
Babel Bot
67eb2c805e
v7.16.1
2021-10-30 21:21:37 +00:00
Peach
c20506e594
Fix binding access for plugin-transform-typescript ( #13900 )
2021-10-30 19:54:42 +02:00
Nicolò Ribaudo
45308f3cba
v7.16.0
2021-10-30 01:26:04 +02:00
Nicolò Ribaudo
e33186c68e
Pre-release updates
...
Update the release tool to 0c289ca7ee
2021-10-30 01:25:25 +02:00
Nicolò Ribaudo
0c820a456d
Update core-js and polyfill plugins ( #13897 )
2021-10-30 01:09:58 +02:00
Sosuke Suzuki
d5ba355867
Support TypeScript 4.5 type-only import/export specifiers ( #13802 )
2021-10-29 01:23:23 +02:00
Huáng Jùnliàng
872086a9a0
feat: support startColumn option ( #13887 )
2021-10-29 01:20:32 +02:00
Nicolò Ribaudo
718c6cb7de
Handle .mts and .cts files in @babel/preset-typescript ( #13838 )
2021-10-29 01:13:37 +02:00
J. S. Choi
ad59a2c618
Caret topic (pipe operator) ( #13749 )
...
* parser: Add caret as topic reference (tests)
* parser: Add caret as topic reference (implement)
* generator: Avoid reconstructing validTopicTokenSet
* babel-parser: Remove redundant throws in expression.js
* Minimize diff
* Update error message
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-10-28 16:04:55 -04:00
Sosuke Suzuki
ddc45a5a50
Enable class static blocks by default ( #13713 )
...
* Remove classStaticBlock plugin
* Update tests
* Remove class static blocks from proposalPlugins
* Update tests
* Remove classStaticBlock from mapping for test262
* chore: update babel-types
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-10-28 14:39:04 -04:00
Mickey Rose
99a3fefede
add skipTransparentExprWrapperNodes helper ( #13687 )
...
* overload `skipTransparentExprWrappers`
* fixes isSimpleMemberExpression
in @babel/plugin-proposal-optional-chaining
* use skipTransparentExprWrappers<Expression> instead of the NodePath
overload where possible in @babel/plugin-proposal-optional-chaining
* Revert "overload `skipTransparentExprWrappers`"
This reverts commit fad47596a64a8d33aadacb7695dbf1aa60a528ae.
* add helper `skipTransparentExprWrapperNodes`
* avoids constructing NodePaths when only the Node is needed
* fixes isSimpleMemberExpression
in @babel/plugin-proposal-optional-chaining
* use this new helper instead of skipTransparentExprWrappers
where possible in @babel/plugin-proposal-optional-chaining
2021-10-28 14:16:22 -04:00
Justin Ridgewell
b1793656e6
Add aliases for Standardized, TypeScript, and Flow ( #13666 )
...
* Ensure non-standard types have an appropriate alias
This helps with filter out the types. Eg, I'm concerned with just the core JS types, and in I can derive them via:
```typescript
type Core = Exclude<t.Node, t.TypeScript | t.Flow>;
```
* Lint
* Export deprecated alias types
* Add docs descriptions for new aliases
* Add Standardized alias
* Fix inherits aliases
* Filter aliases from node types
* Remove Proposal alias
2021-10-28 14:14:32 -04:00
Nicolò Ribaudo
fb7ddf4d38
[ts] Support private methods overloads ( #13876 )
...
* [parser] Allow private methods overloads when parsing TS
* Add transform tests
* Fix estree
* Fix flow
2021-10-26 07:29:20 +02:00
Nicolò Ribaudo
c7ddb1ae93
Use workspace:^ to specify @babel/ dependencies ( #13772 )
...
* Enforce `workspace:^` to specify `@babel/` dependencies
* `yarn constraints --fix`
* Update lockfile
2021-10-25 07:22:08 +02:00
Nicolò Ribaudo
62b2c5ebb9
Regenerate parser fixtures ( #13882 )
2021-10-24 18:12:10 +02:00
Huáng Jùnliàng
e45d86c333
[babel 8] Enable preset-env bugfixes by default ( #13866 )
2021-10-24 15:17:19 +02:00
Mickey Rose
b5907ef967
remove executable permission from files that shouldn't have it ( #13873 )
2021-10-23 14:18:30 +02:00
Mickey Rose
cfe6739dc0
fix: allow enum member without initializer after non-literal member ( #13865 )
2021-10-22 08:52:23 -04:00