* feat: add cloneDeepWithoutLoc
* fix: sort functions alphabetically
* doc: add documentation for the withoutLoc parameter
* test: add a test for shallow cloneWithoutLoc
* test: add loc object to node and fix test
* fix: set loc object on deeper node
* test: check loc on deeper node is null
* doc: adjust withoutLoc documentation
* fix: add withoutLoc param to deep clones
* fix: apply cloneIfNodeOrArray for leadingComments, innerComments and trailingComments
* test: add test for leadingComments, innerComments and trailingComments
* Cleanup PR
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* Added jsescOptions to Numeric Literals
* Added tests and hexadecimal opts to NumericLiterals
* Fixed the bug of every numeric literal being coverted to hex
* Added conditions when jsesc should be applied
* Removed numbers and lowercaseHex from format object
* Added newline to test of jsonEscape (to exclude the change)
* Modified conditions to apply jsesc
* Made the required changes.
* Using node.value instead of value
* feat(react-jsx-source): add column property
This will be useful to tools that consume the injected `__source` prop, allowing precise source locations to be displayed.
* Rename column -> columnNumber, make 1-based
* Add support for type only imports in TS (#11053)
* Implement "export type {}" (#11122)
* Add "exportKind: type" when needed with TS (#11157)
* Add `onlyRemoveTypeImports` option to `transform-typescript` (#11173)
* Add onlyRemoveTypeImports to preset-typescript (#11179)
Co-authored-by: Brian Ng <bng412@gmail.com>
Co-authored-by: Raja Sekar <rajasekarm.dev@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Henry Zhu <smiley.we@gmail.com>
Co-authored-by: Siddhant N Trivedi <sidntrivedi012@gmail.com>
* Update Purish aliases
- Adds `Purish` to `RegexLiteral`, since it can't cause any side-effects.
- Removes `Purish` from `ClassExpression` and `ClassDeclaration`, since they can be impure with static class fields.
* Update types
This is a mix of changes, most importantly:
- Always print parens when mixing nullish coalescing and another logical
- Fixes assignment in the callee of an optional chain, which now blocks #11248
Also, cleans up a bit of code, and removes an unnecessary parens around `class A extends new B {}`
* Use ~ for preset-env's @babel/compat-data dependency
* Revert "Use ~ for preset-env's @babel/compat-data dependency"
This reverts commit e7d57c7894095d381670cddfbbce06bd2a480a32.
* Allow using `preset-env` with newer versions of `compat-data`
* 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