Commit Graph

177 Commits

Author SHA1 Message Date
OJ Kwon
00d22b8fde
build: Use mocha for exec_ test instead of jest (#3009) 2021-12-11 07:59:21 +00:00
OJ Kwon
cabf5a458d
chore: Remove redundant dependencies (#3008) 2021-12-11 13:57:33 +09:00
Donny/강동윤
a3bd6aea54
fix(es/codegen): Fix sourcemap (#3003)
swc_ecma_codegen:
 - Handle source map of multi-line template literals. (Closes #2185, Closes #2362, Closes #2900)
2021-12-10 19:57:39 +09:00
Donny/강동윤
1ea965cecb
fix(es/parser): Drop outdated options (#2974)
swc_ecma_parser:
 - Drop flags in `EsConfig`.
 - Drop flags in `TsConfig`.
 - Drop unused variants from `SyntaxError`.
2021-12-05 17:33:34 +09:00
nicholas
ce601382d5
chore: Remove duplicate version field in package.json (#2965) 2021-12-04 12:33:38 +09:00
David Sherret
beb2c73c2c
fix(swc/hygiene): Prefer not renaming top level variables (#2940)
swc_ecma_transforms_base:
 - `hygiene`: Use concept of depth to prevent renaming top level nodes.
2021-12-04 01:55:27 +09:00
Donny/강동윤
a93f1111f9
fix(ci): Fix freebsd builds (#2944) 2021-12-02 12:57:27 +09:00
Donny
82c8694f4b chore: Drop freebsd for publishing 2021-12-02 11:37:40 +09:00
Donny
4e214ce437 chore: Publish v1.2.116 2021-12-02 07:10:16 +09:00
Donny
86d2cebd37 chore: Publish v1.2.115 2021-12-01 14:20:52 +09:00
Donny/강동윤
bb66083f69
fix(swc): Unimplement Default for JsMinifyOptions (#2901) 2021-11-28 18:57:48 +09:00
Donny/강동윤
ddc3aca3f0
fix(swc): Fix handling of jest option (#2892)
swc:
 - Merge `jsc.transforms.hidden.jest`.
2021-11-27 21:30:09 +09:00
Donny/강동윤
c2bbdbe9d6
feat(webpack): Add ast reducer (#2875)
swc_estree_compat:
 - Fix stack overflow related to object patterns.

swc_webpack_}ast:
 - Implement AST reducer.
2021-11-26 15:04:41 +09:00
Donny/강동윤
cdef843369
feat(es/estree): Allow emitting acorn ast (#2859)
swc_estree_ast:
 - Add `Flavor`.
 - Adjust serialization based on `Flavor`.

swc_estree_visit:
 - Remove.

testing:
 - Add `diff_json`.

testing_macros:
 - `#[fixture]`: Print input.
2021-11-25 20:16:46 +09:00
Donny
1cc4de3e9b chore: Publish v1.2.112 2021-11-24 15:07:18 +09:00
Donny/강동윤
2c099bfd2c
feat(es/preset_env): Use browserslist-rs (#2845)
swc_ecma_preset_env:
 - Fix `default_path`.
 - Use `browserslist-rs` for query. (Closes #2781)
2021-11-23 19:07:16 +09:00
Donny/강동윤
1368981f19
fix(wasm): Fix wasm-web (#2803) 2021-11-19 15:04:01 +09:00
Donny
e5604c3e56 chore: Publish 2021-11-18 01:08:33 +09:00
Donny/강동윤
53c8939550
test(swc): Add a test for sourcemap (#2777) 2021-11-17 16:06:37 +09:00
Tim Neutkens
8aea5ebb47
chore: Ensure feature.manyFiles of Git is enabled (#2754) 2021-11-15 08:44:54 +00:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
Donny/강동윤
368b9e2ff2
chore: Update rustc to prevent CVE-2021-42574 (#2690) 2021-11-09 14:20:02 +09:00
Donny/강동윤
306cf989db
fix(es/minifier): Fix minifier (#2597)
swc_ecma_minifier:
 - Fix `negate_cost`.
2021-10-31 08:43:44 +00:00
LongYinan
1a659d3214
ci: Sync to latest napi workflow (#2592) 2021-10-31 10:04:18 +09:00
Donny/강동윤
4b2903e3b4
fix(es/minifier): Fix minifier (#2564)
swc_ecma_minifier:
 - Don't change depth of function while negating if statements. (#2558)

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Preserve `this`. (#2465, #2466)

swc:
 - Make `toplevel` default to true if `module` is true. (#2254)
2021-10-28 04:35:45 +00:00
Donny
54694571b9 chore: Fix typo 2021-10-28 10:03:29 +09:00
Donny
7fae0bb979 chore: Pulbish 2021-10-28 09:25:30 +09:00
Donny/강동윤
b8933e3db9
fix(swc): Fix bugs (#2538)
swc_ecma_transforms_base:
 - `unique_scopes`: Handle method properties.
 - `hygiene`: Fix handling of method properties. (#2539)

swc_ecma_transforms_compat:
  - Fold children of for-of/in statements. (#2531)

swc_ecma_minifier:
 - `name_mangler`: Fix handling of method properties.
2021-10-26 07:43:32 +00:00
Yunfei He
4abde38dd7
feat(swc): Add browserslist to optionalDependencies (#2515) 2021-10-23 20:04:06 +09:00
Donny/강동윤
9e215769cc
fix(es/minifier): Fix minifier using Deno test suite (#2503)
swc_ecma_codegen:
 - Emit `;` after private class properties.

swc_ecma_minifier:
 - `pure`: Drop more invalid expressions.
 - `sequences`: Drop more invalid expressions.
 - `strings`: Fix concat.
 - `inline`: Inline into `b` in `a[b] = foo`.
2021-10-21 11:56:48 +00:00
LongYinan
1b91d55277
ci: Re-enable FreeBSD build (#2497) 2021-10-21 15:15:52 +09:00
Donny/강동윤
eef3d6e3fb
fix(es): Fix simple bugs (#2495)
swc_ecma_parser:
 - Don't panic on `declare declare`. (#2343)

swc_ecma_transforms_react:
 - Don't panic on `createElement()`. (#2492)

swc_bundler:
 - Don't panic on wasm. (#2334)

swc:
 - Disable `inline_globals` if it's not specified. (#2490)
2021-10-20 06:12:21 +00:00
Donny/강동윤
2ca6e5d79b
feat(es/transforms/optimization): Support inlining of typeofs (#2473)
swc_ecma_transforms_optimization:
 - `inline_globals`: Support inlining of `typeof`s.

swc:
 - Change error message for parsing failure to mention `Syntax Error`.
2021-10-19 09:49:18 +00:00
Donny/강동윤
123c1f5d02
chore: Fix typo (#2472) 2021-10-19 08:25:57 +00:00
Donny/강동윤
01e171a4b4
test(es): Freeze as es2015 to verify base transforms (#2468) 2021-10-19 05:31:12 +00:00
Donny/강동윤
1645bb30b7
perf(es/transforms): Reduce usage of #[fast_path] (#2442)
swc_ecma_ast:
 - Implement `Take` for `ObjectLit`.
 - Implement `Take` for `ArrayLit`.

swc_ecma_transforms_compat:
 - `nullish_coalescing`: Remove exponential visit.
 - `nullish_coalescing`: Migrate to `VisitMut`.
 - `optional_chaining`: Reduce exponential visit. (But it's not removed)
 - `class_properties`: Remove exponential visit.
 - `jsx_src`: Migrate to `VisitMut`.
 - `optional_chaining`: Mae it parallel.
 - `async_to_generator`: Remove `#[fast_path]`.
 - `arrow`: Remove `#[fast_path]`.
 - `destructuring`: Remove `#[fast_path]`.
 - `block_scoped_functions`:  Remove `#[fast_path]`.
 - `classes`: Remove `#[fast_path]`.
2021-10-16 08:12:02 +00: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
dcf42771ad chore: Publish 2021-10-15 19:21:25 +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
267d639c2e chore: Disable freebsd to publish 2021-10-14 12:06:24 +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
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/강동윤
bbefa0e57e
chore: Improve documentation for rust users (#2340) 2021-10-04 06:10:30 +00:00
Donny/강동윤
2c50cde8de
fix(swc): Fix try_with_handler (#2315)
swc:
 - `try_with_handler`: Return `Err` on errors.
2021-09-29 04:55:31 +00:00
Donny/강동윤
e46a842e99
feat(es/parser, es/transform): Implement ergonomic brand checking (#2079)
swc_ecma_parser:
 - Implement parsing of private properties in object literals.

swc_ecma_transforms_base:
 - `fixer`: Handle `const [a = (b, c)]`.

swc_ecma_transforms_compat:
 - `class_properties`: Support ergonomic brand checks. (#2064)

swc_ecma_transforms_proposal:
 - Implement ergonomic brand checks for private fields. (#2064)
2021-09-27 08:03:48 +00:00
Donny/강동윤
5e1003ec4c
fix(es/transforms/base): Fix hygiene (#2299)
swc_ecma_transforms_base:
 - `hygiene`: Support usage-def conflict where def comes first. (#2297)
2021-09-24 10:26:01 +00:00
Donny/강동윤
2156364121
fix(es/transforms/base): Fix hygiene (#2282)
swc_ecma_transforms_base:
 - `hygiene`: Handle decl-ref conflict. (#2211)
2021-09-22 06:56:04 +00:00
강동윤
ce01b8a9b7
fix(es): Fix bugs (#2256)
swc_ecma_codegen:
 - Fix source map of string literals. (#2253)

swc_ecma_transforms_typescript:
 - Allow using same name for a module with function. (#2243)
2021-09-18 07:52:08 +00:00
강동윤
20ce326909
feat(es/minifer): Improve minifier (#2229)
swc_ecma_minifier:
 - `if_return`: Allow side-effect-free statements to come after `if_return`.
 - `collapse_vars`: Move variables without init to first.
 - `analyzer`: Remove useless fields.
 - Don't drop `return` tokens if there's a finally block.
 - `drop_return_value`: Drop side-effect-free return arguments.
 - `make_sequences`: Don't inject `void 0` to return args.
 - `if_terminate`: Move to the pure optimizer.
 - Fix a bug related to `RegExp`.
2021-09-16 04:23:33 +00:00
강동윤
48d61039d2
fix(common, node/swc): Allow inlining sourcesContent (#2245)
swc_common:
 - Allow setting `sourceContents` of source map files. (#2218)

swc:
 - Support `inlineSourceContents`. (#2244)
2021-09-14 02:31:32 +00:00