swc_ecma_codegen:
- Use omit_trailing_semi in 'assert_min' tests, to identify bugs. Before this,
no code was using this method - and it had some serious bugs.
- Omit semicolons when writing punctuation, as it's permitted to do so.
- Use two macros ('semi', 'formatting_semi') to distinguish between required
semicolons, as used in for(...), and optional ones that are used between
statements.
This commit does not enforce the use of omit_trailing_semi when cfg.minify is
used (except in tests using assert_min), and as such should not modify the
behavior of existing apps. This is confirmed by the Test262 suite passing
without changes.
Co-authored-by: 강동윤 <kdy1@dudy.kr>
swc_ecma_codegen:
- Fix codegen of `TsConstructorSignature`.
- Fix codegen of `TsIndexSignature`.
- Fix codegen of type parameters in arrow expressions.
- No panic on dummy span.
swc_ecma_parser:
- Parse optoinal method correctly.
swc_ecma_transforms:
- resolver: Handle type parameters in arrow expressions.
swc_ecma_codegen:
- Remove parens from arrow functions when possible.
- Remove space after prop keys when minifying.
- Remove line break after expressions when minifying.
- Remove space after generator `*` when minifying.
swc_ecma_codegen:
- Fix codegen of large binary expressions.
swc_ecma_parser:
- Fix stack overflow while parsing large binary expressions.
swc_ecma_transforms:
- typescrip::strip: Fix stack overflow while handling large binary operations.
- hygiene: Fix stack overflow by migrating it to `VisitMut`.
- hygiene: Improve performance.
- fixer: Fix stack overflow by migrating it to `VisitMut`.
- resolver: Migrate to `VisitMut`.
spack:
- Optimize resolver
swc_bunder:
- Parallize merging of reexports
- Remove useless `clone`s
swc_ecma_utils:
- Migrate DropSpan to VisitMut
swc_ecma_transforms:
- Migrate simple transforms to VisitMut
- Ignore types to reduce binary size
- Hide actual types so that we can optimize it in future without breaking change
swc_visit:
- Apply transforms for vector in-place
- Apply transforms for box in-place
testing:
- Remove dependency on relative_path
swc_common:
- Span's byte positions are now self-contained and `GLOBALS` is not required while parsing.
- Changed `Comments` into a trait.
- Provide single-threaded implementation of `Comments`
- Cargo feature `tty-emiiter` (To remove tty related stuffs )
- Cargo feature `sourcemap` (To remove sourcemap for web assets)
- Removed dependency on dashmap
swc_ecma_parser:
- No duplicated comments.
- Removed dependency on once_cell and regex
- Add a test suite to visualize and test span of nodes.
swc_ecma_utils:
- Removed dependency on parser
swc:
- Remove dependency on derive_more and path-clean
- Add multi-threaded implementation of `Comments`
swc_ecmascript:
- A new crate contains `ast`, `codegen`, `parser`, `utils`, `visit`.
swc_ecma_ast:
- ClassProperty.declare
swc_ecma_parser:
- Parsing for declare class props.
- Error when parsing a private property with a declare modifier.
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>