Commit Graph

415 Commits

Author SHA1 Message Date
강동윤
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
강동윤
c78baef2cc
fix(es/transforms/compat): Implement new.tartet (#2129)
swc_ecma_transforms_compat:
 - Handle `new.target`. (#1179)
2021-08-22 06:56:49 +00:00
Sosuke Suzuki
e3e2908139
feat(es/parser): Report an early error for await used in wrong contexts (#2098) 2021-08-21 04:46:22 +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
강동윤
1b0ef756f2
fix(es/parser): Allow using parser with stable rustc (#2084)
swc_ecma_parser:
 - Don't use `#![feature]` for non-test builds. (#2083)
2021-08-15 10:01:08 +00: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
강동윤
f6aabfce9c
perf: Use ahash instead of sip hash (#2073)
swc_common:
 - Add `AHashMap`.
 - Add `AHashSet`.
2021-08-14 10:33:16 +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
강동윤
8cbbddb957
fix(es/parser): Recover from import.meta in scripts (#2042)
swc_ecma_parser:
 - Recover from `import.meta` in scripts. (#2041)
 - Allow `import.meta` when using `parse_program`.
2021-08-09 16:13:41 +00:00
Sosuke Suzuki
4ead801295
refactor(es/parser): Cleanup (#2033)
swc_ecma_parser:
 - Use `tok!` macro.
2021-08-09 23:21:43 +09: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
Sosuke Suzuki
a086a203dd
feat(es/parser): Report an error for import.meta in script (#1999) 2021-08-04 14:38:07 +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
강동윤
85a216ef56
feat(es/parser): Allow stripping out typescript parser (#1962)
swc_ecma_parser:
 - Add a cargo feature to remove typescript parser.
2021-07-25 09:37:59 +00:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency (#1908) 2021-07-14 00:59:13 +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
David Sherret
ed274b02f2
fix(es/parser): Fix parsing of file with onlly shebang (#1896) 2021-07-07 17:41:58 +09: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
Austaras
76341068d0
fix(es/ast): Fix handling of reserved words (#1891) 2021-07-04 19:44:33 +09: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
David Sherret
534c0b19c8
fix(es/parser): Make comments in empty file be in leading comments (#1879) 2021-07-03 12:19:30 +09:00
Vladimir Guguiev
7488950f90
fix(es/parser): Fix span of ExportDefaultDeclaration (#1818) 2021-06-27 11:02:45 +09:00
강동윤
737ce63b78
chore(es/ast): Bump version (#1853) 2021-06-25 08:19:15 +00:00
강동윤
6ad3f7b90e
feat(es/visit): Groundwork to use VisitMut instead of Fold (#1842)
swc_ecma_transforms:
 - Expose `VisitMut` if possible.

swc_ecma_visit:
 - Implement `VisitMut` for` Folder<V>`.
 - Implement `VisitMut` for `AndThen<A, B>`.
2021-06-23 04:18:41 +00: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
강동윤
3c3fb359ee
fix(es): Remove UB (#1815)
swc_ecma_parser:
 - Remove UB.

swc_ecma_codegen:
 - Remove codes related to the UB of the parser. (#1782)
2021-06-12 05:17:09 +00:00
강동윤
97ef7c0553
fix(swc): Fix bugs (#1811)
swc_ecma_ast:
 - Add `es2021`. 

swc_ecma_transforms_compat:
 - Handle `||=`. (#1788)
2021-06-11 16:55:34 +09: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
강동윤
2ad0af9e91
fix(es/transforms/compat): Improve performance (#1673)
swc_ecma_transforms_compat:
 - `classes`: Fast-path.
 - `destructuring`: Fast-path.
 - `sticky_regex`: Fast-path.
 - `spread`: Fast-path.
 - `shorthand`: Fast-path.
 - `typeof_symbol`: Fast-path.
 - `block_scoped_functions`: Fast path.
 - `duplicate_keys`: Use fxhash.
 - `instance_of`: Fast path.
 - `reserved_words`: Make string comparison efficient.
2021-05-11 04:53:36 +00:00
강동윤
9381d0dbc2
fix(es/transforms/base): Fix resolver (#1672)
swc_ecma_transforms_base:
 - `resolver`: Handle variables in for in/of loop body correctly.
2021-05-10 20:39:07 +09: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
Pig Fang
50f8048f2a
feat(es/parser): Enforce order of abstract and override (#1668)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-10 17:09:51 +09:00
강동윤
2b918b0c3d
fix(es/transforms/compat): Don't create unnecessary IIFE. (#1669)
swc_ecma_transforms_compat:
 - `class_properties`: Do not create iife if possible. (#1660)
2021-05-10 16:18:31 +09:00