Commit Graph

252 Commits

Author SHA1 Message Date
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
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
David Sherret
3886eeddd5
fix(es/parser): Fix parsing of a property named async (#2485) 2021-10-20 04:31:52 +09:00
Pig Fang
9446a037cb
fix(es/parser): Fix class getter/setter ASI bugs (#2409) 2021-10-12 18:47:40 +09: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
Pig Fang
be3dca295b
fix(es/parser): Allow using async as the first one in parameters (#2388) 2021-10-10 11:02:32 +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
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
Pig Fang
2b292e6d17
feat(es): Support type-only import/export specifiers (#2309) 2021-09-28 22:05:20 +09: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
Pig Fang
552fc2374d
fix(es/parser): Improve error message (#2304)
swc_ecma_parser:
 - Improve error message for unexpected tokens.
2021-09-26 01:19:08 +09:00
Pig Fang
83153a0f85
fix(es/parser): Report errors for multiple import/export specifiers without comma (#2302) 2021-09-25 23:53:57 +09:00
Donny/강동윤
ca0d6ddf2e
fix(es/parser): Fix bugs (#2255)
swc_ecma_parser:
 - Treat `{` after an arrow as a brace stmt. (#2237)
 - Handle comments correctly while backtracking. (#2264)
2021-09-23 11:32:40 +00:00
강동윤
2c477780f0
fix(es): Fix bugs (#2222)
swc_ecma_parser:
 - Don't panic on `typeof import(T)`. (#2198)
 - Fix parsing of ternary. (#2196)

swc_ecma_transforms_base:
 - `fixer`: Handle unary in lhs of an exponentation expression. (#2191)

swc_ecma_transforms_compat:
 - Use variable for `this` in arrow expressions. (#2212)

swc_ecma_visit:
 - Add a trait `InjectVars`.

node_swc:
 - Increease recursion limit while deserializing. (#2223)
2021-09-09 20:45:20 +09:00
Sosuke Suzuki
cbc8230310
fix(es/parser): Fix parsing of static blocks (#2200)
swc_ecma_parser:
 - Fix parsing of static blocks with line breaks. (#2195)
2021-09-03 14:57:23 +09:00
David Sherret
99c35ff980
refactor(es): Use BlockStmt instead Vec<Stmt> for static blocks. (#2188)
swc_ecma_ast:
 - Use `BlockStmt` instead of `Vec<Stmt>` for static blocks.

swc_ecma_parser:
 - Fix span of static blocks.
2021-08-31 16:12:18 +09:00
강동윤
c0b0337d1d
fix(es): Fix easy bugs (#2178)
swc_ecma_parser:
 - Fix parsing of complex arrow expressions in a conditional expression. (#2174)
 - Report an error for wrong jsx, instead of `panic!`. (#2173)

swc_ecma_transforms_react:
 - `jsx`: Handle fragment with single child correctly. (#2177)

swc:
 - Ensure that #2170 is an invalid issue. (#2170)
2021-08-29 20:40:52 +00:00
Sosuke Suzuki
a10118c90f
feat(es/parser, es/codegen, es/visit): Support static blocks in classes (#2130)
swc_ecma_ast:
 - Add support for static blocks in classes.
2021-08-30 00:03:14 +09:00
강동윤
97514a7549
fix(es): Fix some easy bugs (#2166)
swc_ecma_parser:
 - Fix parsing of typescript generics in jsx context. (#2161)

swc_ecma_transforms_base:
 - `fixer`: Handle assignment with patterns in arrow body. (#2163)

swc_ecma_utils:
 - `as_bool`: Handle assignment with operator correctly. (#2165)
2021-08-27 06:03:06 +00:00
Shinobu Hayashi
78a7c6befe
chore(es/parser): Update an error message (#2148)
swc_ecma_parser:
 - Update an error message to match one of `tsc`.
2021-08-25 17:02:14 +09:00
Sosuke Suzuki
33bdff0957
feat(es/parser): Emit an error for top-level await in script (#2094)
swc_ecma_parser:
 - Report an error for a top-level await statements.
2021-08-18 00:17:59 +09:00
강동윤
949a4d9716
fix(es): Fix simple bugs (#2077)
swc_ecma_visit:
 - Ensure that #1967 is wrong. (#1967)

swc:
 - Add a test for #1107. (#1107)

node:
 - Make optional fields optional. (#1947)
2021-08-14 18:34:14 +00:00
강동윤
b0067adb9c
fix(es/parser): Fix parsing of function in property names (#2076)
swc_ecma_parser:
 - Use correct token context when `function` is used as the name of a property. (#2075)
2021-08-14 15:12:26 +00:00
강동윤
b0c41bb3f2
chore: Cleanup codes for fixture testing (#2070) 2021-08-14 06:34:04 +00:00
강동윤
883c1ac4e4
fix(bundler): Prepare renaming of bundler (#2066)
- Rename `spack` crate to `swc_node_bundler`. (#1113)
2021-08-13 10:03:04 +00:00
LongYinan
fe2a063525
perf(node/swc): Use mimalloc (#2068) 2021-08-13 18:39:13 +09:00
강동윤
72c9f4373a
fix(es): Fix bugs (#2055)
swc_ecma_parser:
 - Fix panic from span assertion. (#2040)

swc_ecma_transforms_compat:
 - Fix handling of `await for`. (#1918)

swc_ecma_transforms_base:
 - Allow using decorator metadata even if `reflect-metadata` is not imported. (#1362)
2021-08-12 12:28:58 +00:00
Sosuke Suzuki
f4e0e91f64
feat(es/parser): Always enable features in ES spec (#2029) 2021-08-08 22:53:41 +09:00
Sosuke Suzuki
8a39c1db97
fix(es/parser): Use correct error message (#2025)
swc_ecma_parser:
 - Use correct error message for import statements in a script.
2021-08-07 16:43:23 +09:00
강동윤
e916b35dd2
feat(node/swc): Support sourceFileName (#1976)
swc:
 - Support `sourceFileName`.
2021-08-03 00:49:34 +09:00
강동윤
4011703af5
fix(testing): Allow using it with stable rustc (#1974)
testing_macros:
 - Make `#[fixture]` relative to cargo manifest dir.
2021-07-29 14:18:21 +09:00
강동윤
104be9837b
fix(es/transforms): Fix transforms (#1909)
swc_ecma_transforms_compat:
 - `regenerator`: Use es6 import while folding module. (#1641)
 - `typeof_symbol`: Handle `undefined` specially. (#1843)
 - `regenerator`: Do not create useless codes. (#1687)
 - `typeof_symbol`: Migrate to `VisitMut`.

swc_ecma_transforms_module:
 - Add `import_hoister`.
 - Improve import analyzer. (#1682)
 - Allow overriding `export *` wth named exports. (#1714)

swc_ecma_transforms_testing:
 - Add a hack for `regenerator-runtime`.

swc:
 - Run import analyzer ahead of time. (#1682)

misc:
 - Downgrade rustc to the version rust-analyzer supports.
2021-07-10 11:18:28 +00:00
강동윤
35af4c5186
chore: Publish v1.2.63 & Update rustc (#1894) 2021-07-05 12:51:09 +00:00
강동윤
211e208219
fix(node-swc): Fix visitor (#1890)
node/binding:
 - Fix visitor methods for array elements. (#1819, #1888)
 - Fix for const assertion. (#1625)
 - Verify object properties. (#906)
2021-07-04 12:35:25 +00:00
Simon Rask
14cee03a43
fix(es/parser): Allow using '>' and '<' in template literal types (#1885)
swc_ecma_parser:
 - Allow using `<` and `>` in template literal types. (#1862)
2021-07-03 20:44:06 +09:00
Vladimir Guguiev
7488950f90
fix(es/parser): Fix span of ExportDefaultDeclaration (#1818) 2021-06-27 11:02:45 +09:00
강동윤
6c492796d0
fix(es/parser): Fix parsing of abstract class over multiple lines (#1837)
swc_ecma_parser:
 - Don't allow `abstract` and `class` to be on different lines.
2021-06-20 14:17:40 +00:00
강동윤
f9bdc7b227
fix(es/parser): Fix panic on debug mode (#1828)
swc_ecma_parser:
 - Handle undefined unicode code point gracefully. (#1813)
2021-06-16 15:55:20 +09:00
muji
8d8b2d10d4
fix(es/parser): Fix parsing of line terminators (#1755)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-06-15 00:39:03 +09:00
강동윤
7fa4e1bea5
fix(es): Fix bugs for the type checker (#1823)
swc_ecma_codegen:
 - Fix codegen of constructor signatures.

swc_ecma_parser:
 - Fix lexing of long numeric literals.
2021-06-13 12:24:30 +09:00
강동윤
001af8637d
fix(es/parser): Fix lexing of numbers (#1821)
swc_ecma_parser:
 - Fix lexing of long numeric literals.
2021-06-12 08:47:13 +00:00
강동윤
c56115793c
fix(es/parser): Fix parser (#1808)
swc_ecma_parser:
 - Allow large numeric literals. (#1803)
 - Allow long numeric literals. (#1806)
2021-06-09 23:02:13 +09:00
Shinobu Hayashi
65ffd87771
fix(es/parser): Report error for wrong declare keywords (#1760)
swc_ecma_parser:
 - Report `TS1031`.
2021-05-29 16:51:52 +09:00
강동윤
c79db252dc
fix(swc): Fix bugs (#1753)
swc_ecma_parser:
 - Allow class members to be declared. (#1751)

node-swc:
 - Fix typescript type definitions. (#1746)
2021-05-27 11:59:04 +09:00
강동윤
57d1aaf80f
fix(es): Fix various bugs (#1707)
swc_ecma_codegen:
 - Fix codegen of `\r\n` in template literals when targeting `es2020`. (denoland/deno#10282)

swc_ecma_parser:
 - Support non-identifier getters in typescript. (#1708)

swc_ecma_transforms_typescript:
 - Skip `export {}` if it was not a module. (#1706)
 - Skip `export {}` if the result is module without it. (#1706)
2021-05-17 22:27:59 +09:00
Pig Fang
1dbc3644a5
feat(es): Support type-only import equals declaration (#1695)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-15 14:26:24 +09:00
강동윤
24bd5ea4a4
fix(es): Fix various bugs (#1680)
swc_ecma_parser:
 - Allow a class member named `declare`. (#1671)

swc_ecma_transforms_optimization:
 - Preserve side effects while inlining array index operations. (#1674)

wasm/web: 
 - Fix ci script. (#1675)
2021-05-11 16:29:29 +00:00
Pig Fang
b713972493
feat(es/parser): Enforce orders of override and async (#1670)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-10 08:55:22 +00:00