Donny/강동윤
7ab07ab0b9
fix(es/transforms/base): Fix resolver
( #2448 )
...
swc_ecma_transforms_base:
- `resolver`: Handle `AssignPatProp` from `Hoister`.
2021-10-16 15:12:53 +09:00
Donny/강동윤
ee9177b753
fix(es): Fix bugs ( #2447 )
...
swc_ecma_parser:
- Fix parsing of jsx escapes.
swc_ecma_minifier:
- Don't mangle name as `const` or `let`. (#2446 )
swc_ecma_transforms_react:
- Fix handling of jsx escapes. (#2351 )
2021-10-16 04:25:54 +00:00
Donny/강동윤
130a47f42c
feat(es/transforms/module): Add an option to preserve dynamic imports ( #2441 )
...
swc_ecma_transforms_module:
- Add `ignoreDyanmic`.
2021-10-15 19:19:14 +09:00
Donny/강동윤
e722bd4887
perf(es/transforms): Reduce usage of #[fast_path]
( #2439 )
...
swc_ecma_transforms_compat:
- Remove `#[fast_path]` from passes.
- Migrate some passes to `VisitMut`.
2021-10-15 10:18:27 +00:00
Donny/강동윤
d045244089
fix(es/codegen): Fix codegen of synthesized template literals. ( #2440 )
...
swc_ecma_codegen:
- Don't handle synthesized backtick specially.
2021-10-15 09:12:40 +00:00
Donny/강동윤
4c983e9158
perf(es/codegen, es/parser): Improve performance ( #2406 )
...
ast_node:
- Make `.span()` inlinable.
swc_ecma_codegen:
- Reduce call to *heavy* `.span()` calls.
swc_ecma_parser:
- Reduce `memmove` by using typed-arena.
swc_bundler:
- Make `Bundle.bundle` take `&mut self`.
- Make drop concurrent.
2021-10-15 12:49:37 +09:00
Donny/강동윤
0e48284afb
fix(es/minifier): Fix bugs ( #2433 )
...
swc_ecma_minifier:
- `sequences`: Stop searching for candidates if a dependency issue is found.
2021-10-14 13:48:14 +00:00
Donny/강동윤
f8995848b8
fix(es/transforms/proposal): Fix type detection ( #2431 )
...
swc_ecma_transforms_proposal:
- Try the type of the LHS of an assignment pattern. (#2428 )
2021-10-14 06:19:34 +00:00
Donny/강동윤
647d3ed36a
chore(doc): Add an example of stripping out types ( #2430 )
2021-10-14 04:43:55 +00:00
Donny/강동윤
51d7a144bb
fix(swc): Fix order of passes ( #2427 )
...
swc_ecam_transforms_typescript:
- Preserve more jsx-related imports.
swc:
- Change pass ordering.
2021-10-13 16:04:49 +00:00
Donny/강동윤
76de51333d
fix(es/transforms): Fix for react + typescript ( #2422 )
...
swc_common:
- Add `NoopComments`.
- Implement `Comments` for `Option<C>` where C: `Comments`.
- Add some helper methods to `Comments`.
- Deprecate `CommentsExt`.
swc_ecma_transforms_base:
- `resolver`: Handle `TsImportEqualsDecl`.
swc_ecma_transforms_react:
- Reduce useless cloning using `Arc`.
- Expose API for parsing directives like `@jsxPragma`.
swc_ecma_transforms_typescript:
- Accept `pragma` and `pragmaFrag`.
- Support jsx directives.
- Preserve jsx-related imports.
swc:
- Optimize `SwcComments`.
- Run`resolver` before everything else.
2021-10-13 22:29:56 +09:00
Donny/강동윤
aff6670856
fix(es/minifier): Fix infinite loop ( #2424 )
...
swc_ecma_minifier:
- Prevent infinite loop of post-optimize inliner.
2021-10-13 19:26:47 +09:00
Donny/강동윤
8074c72ce9
fix(es/transforms/base): Fix hyigiene
( #2421 )
...
swc_ecma_transforms_base:
- `hygiene`: Considering scoping of `var`.
- `hygiene`: Avoid creating too many `JsWord` by caching index.
2021-10-13 17:32:37 +09:00
Bojan Đurđević
029cf056f2
fix(es/transforms/react): Fix escape of quote in HTML entities ( #2419 )
...
swc_ecma_transforms_react:
- Handle escape of `"` correctly.
2021-10-13 14:33:15 +09:00
Donny/강동윤
62f7f655a9
fix(es/minifier): Fix iteration order ( #2412 )
...
swc_ecma_minifier:
- Don't use `AHashMap::drain` for inlining variables.
2021-10-12 10:19:20 +00:00
Pig Fang
9446a037cb
fix(es/parser): Fix class getter/setter ASI bugs ( #2409 )
2021-10-12 18:47:40 +09:00
David Sherret
d114e7d364
refactor(es/parser): Cleanup codes for the comment buffer ( #2410 )
2021-10-12 12:08:06 +09:00
David Sherret
4d4771109a
fix(es/parser): Ensure that comments are collected ( #2407 )
2021-10-12 11:07:52 +09:00
Pig Fang
4ad25d2155
refactor(es/parser): Simplify parsing logic ( #2405 )
2021-10-11 23:09:45 +09:00
Donny/강동윤
b5f832193a
perf(bundler): Improve performance ( #2394 )
...
swc_ecma_utils:
- Make `collect_decls` parallel. (with threshold of 128)
swc_bundler:
- Make inlining of synthesized variables parallel.
2021-10-11 13:00:02 +00:00
Donny/강동윤
98cc79a2be
fix(es/minifer): Fix bugs ( #2397 )
...
swc_ecma_codegen:
- Fix sourcemap of `export` tokens.
- Fix codegen of numeric operands in left of a binary expression.
- Fix codegen of unary operations.
swc_ecma_minifier:
- Visit `AssignPatProp.valie`.
- Move `inline_prevented` to analyzer.
- Add `Ctx.dont_invoke_iife`.
- `iife`: Check for `arugments`
swc:
- `inline_sources_content`: true by default for `minify()`.
2021-10-11 07:44:42 +00:00
Donny/강동윤
f5607891e4
fix(es/transforms/testing): Fix test_fixture
( #2400 )
...
swc_ecma_transforms_testing:
- Make logic depends on `NormalizedOutput::compare_to_file`.
2021-10-11 05:03:57 +00:00
Pig Fang
d7f570ff7c
fix(es/parser): Fix async function in SeqExpr
( #2399 )
2021-10-11 12:38:35 +09:00
Pig Fang
4458f9c74d
fix(es/parser): Allow async
in TsAsExpr
( #2395 )
2021-10-10 20:22:42 +09:00
Donny/강동윤
ff2baf75b4
fix(swc): Fix bugs ( #2396 )
...
swc_ecma_codegen:
- Check for comments deeply while emitting a return statement.
swc_ecma_transforms_react:
- Fix handling of texts in attributes.
2021-10-10 09:19:47 +00:00
Donny/강동윤
a33032279a
perf(es/transforms/base): Make resolver
faster ( #2392 )
...
swc_ecma_transforms_base:
- `resolver`: Don't use `Mark::parent()`.
2021-10-10 05:06:07 +00:00
Donny/강동윤
ab687a0f98
fix(es/minifer): Fix handling of callable expressions ( #2379 )
...
swc_ecma_minifier:
- `sequences`: Don't inline into arrow expression or function expressions.
- Inject variables to arrow expressions correctly.
2021-10-10 03:47:11 +00:00
Pig Fang
be3dca295b
fix(es/parser): Allow using async
as the first one in parameters ( #2388 )
2021-10-10 11:02:32 +09:00
Donny
b9b7de0871
chore: Publish
2021-10-10 01:33:22 +09:00
Pig Fang
2379fe1ce0
fix(es/parser): Allow using async
as the first one in parameters ( #2386 )
2021-10-09 17:09:09 +09:00
Donny/강동윤
ac3fbd91ac
perf(bundler): Improve performance ( #2384 )
...
*:
- Use `ahash` instread of `rustc-hash`.
swc_ecma_transforms_optimization:
- Make `dce` parallel.
2021-10-09 08:08:13 +00:00
Pig Fang
644e49c7fa
refactor(es/parser): Simplify parsing logic ( #2381 )
2021-10-09 10:22:47 +09:00
Donny/강동윤
2c058cb124
fix(es/codegen, es/transforms/typescript): Fix bugs ( #2383 )
...
swc_ecma_codegen:
- Emit sourcemap for `import` tokens.
swc_ecma_transforms_typescript:
- Strip `react` correctly.
2021-10-09 01:20:59 +00:00
Donny/강동윤
d0342a5a58
feat(swcpack): Enable concurrent mode ( #2356 )
...
swc_common:
- Use `Mutex` from `parking_lot` instead of it from std.
swc_bundler:
- Use `fxhash` if possible.
- Don't `clone()` all modules if the entry has only one item.
swc_ecma_loader:
- `NodeModulesResolver`: Use `path-clean` instead of `canonicalize`.
swc_ecma_transforms_optimization:
- Reimplement `dce`
node_bundler:
- Enable `concurrent` of `swc_bundler`.
2021-10-08 16:47:01 +09:00
Donny/강동윤
4466ca6ab8
fix(es/transforms/react): Allow non-first jsx directives ( #2377 )
...
swc_ecma_transforsm_react:
- Allow using jsx directives like `jsxRuntime` at any statement.
2021-10-08 06:49:14 +00:00
Yunfei He
500dbf244b
feat(es/codegen): Expose more API ( #2375 )
...
swc_ecma_codegen:
- `Emitter`: Make `emit_module_item` public.
2021-10-08 14:36:47 +09:00
Donny/강동윤
656f3e944d
fix(swc): Fix swc
as a crate ( #2376 )
...
swc_ecma_transforms_typescript:
- Don't drop imports from `react`.
2021-10-08 03:38:11 +00:00
Niklas Mischkulnig
1f99c3a44c
fix(es/transforms/optimization): Fix dead_branch_remover
( #2373 )
...
swc_ecma_transforms_optimization:
- `dead_branch_remover`: Fix handling of `switch(boolean)`.
2021-10-08 11:56:09 +09:00
Donny/강동윤
b0ee9543d4
doc(es/ast): Document identifier mangagement system ( #2371 )
2021-10-08 01:02:02 +09:00
Donny/강동윤
7a19fc6e8c
fix(es/trasnforms/testing): Improve test_fixture
( #2369 )
...
swc_ecma_transforms_testing:
- `test_fixture`: Don't print stderr to file.
- Enable logging.
- Add `test_fixture_allowing_error`.
2021-10-07 12:24:41 +00:00
Pig Fang
d65ce85030
fix(es/parser): Report errors for array patterns without comma ( #2365 )
2021-10-07 17:03:06 +09:00
Pig Fang
521e6717ad
fix(es/parser): Report errors for multiple array elements without comma ( #2366 )
2021-10-07 16:08:53 +09:00
Donny/강동윤
edc4cb432e
fix(swc): Fix order of custom passes ( #2367 )
...
swc_ecma_transform_react:
- Accept `top_level_mark`.
swc:
- Fix order of `custom_before_pass`.
2021-10-07 15:13:21 +09:00
Donny/강동윤
9e6a1f431b
fix(es/minifier): Fix minifier ( #2355 )
...
swc_ecma_minifier:
- `iife`: Don't replace parameters with identifiers in iife.
- `sequences`: Add `Marks.synthesized_seq`.
- pure: Drop empty statements.
2021-10-06 07:12:11 +00:00
Donny/강동윤
a553451562
chore(es/minifier): Publish ( #2354 )
2021-10-06 14:02:24 +09:00
Donny/강동윤
fac6f47863
perf(es/transforms): Improve performance ( #2329 )
...
swc_ecma_ast:
- Implement `Take` for `Function`.
- Implement `Take` for `FnExpr`.
- Implement `Take` for `ClassExpr`.
swc_ecma_transforms_compat:
- Migrate `es2015::duplicate_keys` to `VisitMut`.
- Migrate `es2015::template_literals` to `VisitMut`.
- Migrate `es2015::function_name` to `VisitMut`.
- Add more fast-path to `reserved_words` pass.
swc_ecma_transforms_react:
- Reduce allocations of `pure_annotations`.
- Migrate `pure_annotations` to `VisitMut`.
- Migrate `jsx::display_name` to `VisitMut`.
swc_ecma_transforms_optimization:
- Migrate `inline_globals` to `VisitMut`.
- `inline_globals`: Use `Lrc<FxHashMap<K, V>>`.
swc:
- Cache `current_dir()`.
- `ModuleConfig::build`: cacnonicalize only if `paths` is used.
2021-10-05 13:31:35 +00:00
Donny/강동윤
87b20a8896
fix(es/minifier): Fix inlining into shorthand properties ( #2348 )
...
swc_ecma_minifer:
- Fix inlining of bindings into shorthand properties.
2021-10-05 09:53:00 +00:00
Pig Fang
ef4c80be7d
feat(babel/compat): Support type-only import/export specifiers ( #2342 )
2021-10-05 18:27:45 +09:00
Donny/강동윤
b64afb5b6f
fix(es/utils): Fix macros ( #2349 )
...
swc_ecma_utils:
- Allow using macros from crates using `swc_ecmascript`.
2021-10-05 09:14:25 +00:00
Donny/강동윤
8403057268
fix(es/minifier): Don't optimize new String
. ( #2341 )
...
swc_ecma_transforms_optimization:
- Don't optimize calls like `new String`.
2021-10-04 06:44:37 +00:00