Commit Graph

78 Commits

Author SHA1 Message Date
강동윤
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
강동윤
737ce63b78
chore(es/ast): Bump version (#1853) 2021-06-25 08:19:15 +00:00
Maxime Guerreiro
c5f1c6b8ba
chore(es/ast): Upgrade arbitrary crate to v1 (#1844)
swc_ecma_ast:
 - Upgrade arbitrary crate.
2021-06-25 14:40:51 +09: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
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
Pig Fang
1548f6d799
feat(es/parser): Allow override in parameter properties (#1667)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-09 22:17:58 +09:00
Devon Govett
8f5daa3bbb
feat(es/transforms/react): Add pure annotation comments (#1564)
swc_ecma_transforms_react:
 - Add pure annotations for react.
2021-04-11 15:09:27 +09:00
David Sherret
f1792708b4 fix(es/ast): Remove TsSignatureDecl (#1531) 2021-04-04 20:12:17 +09:00
강동윤
13a9d12c84
chore(ci): Configure github actions for rustdoc (#1523) 2021-03-31 13:09:10 +09:00
강동윤
51d0cef287
fix: Fix bugs (#1516)
swc_ecma_ast:
 - Support TypeScript 4.3. (#1517)

swc_ecma_parser:
 - Support new syntaxes from typescript 4.3. (#1517) 

swc_ecma_transforms_compat:
 - Fix '\\`' in template literals. (#1488)
 - `classes`: Fix super calls. (#1490)

swc_ecma_transforms_module:
 - Respect `esModuleInterop` for dynamic imports. (#1480)

swc_ecma_transforms_typescript:
 - `strip`: Remove `declare`-d namespaces. (#1508)
2021-03-30 16:47:12 +09:00
David Sherret
da62c73239
refactor(es/ast): Change TaggedTpl to have a Tpl (#1114)
swc_ecma_ast:
 - Make `TaggedTpl` have `Tpl`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-25 20:09:36 +09:00
강동윤
7f5bfdcc00
fix(bundler): Fix bugs (#1382)
swc_bundler:
 - Improve performance
 - Use `Vec<AHashSet<usize>>` instead of `AHashSet<(usize, usize)>`.
 - Fix statement orderings. (denoland/deno#9464) 
 - Fix wrapped esm mixed with circular imports. (denoland/deno#8224)
 - Store content of wrapped esm at top level. (denoland/deno#8224)
2021-02-22 17:27:40 +09:00
Yehuda Katz
db85d123b7
Fix a number of typos (#1412)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-02-20 15:18:09 +09:00
강동윤
eaeffabf74
fix(es): Improve performance (#1411)
swc_ecma_ast:
 - Add `BindingIdent`.
 - Reduce size of `Ident`.
2021-02-19 15:34:22 +09:00
강동윤
bf445a75c4
fix(swc): Fix bugs (#1372)
swc_ecma_ast:
 - Support import assertions for exports.

swc_ecma_parser:
 - Support import assertions for exports.

swc_ecma_transform_typescript:
 - Strip `declare globals` correctly. (#1383)

spack:
 - Re-enable multi-entry tests.
2021-02-10 17:25:28 +09:00
강동윤
947f9c5641
fix(es/ast): Fix EqIgnoreSpan (#1360)
swc_ecma_ast:
 - Make `EqIgnoreSpan`  impl of` StrKind` always return true.
2021-01-25 18:14:34 +09:00
강동윤
2921b903d7
fix(es/ast): Compilation (#1357)
swc_ecma_ast:
 - Fix compilation.
2021-01-25 11:32:09 +09:00
강동윤
0469e3a33e
fix(es): Move and rename JscTarget (#1343)
swc_ecma_ast:
 - Add `EsVersion`.

swc_ecma_parser:
 - Remove `JscTarget`.
 - Reexport `EsVersion` as `JscTarget`.
2021-01-20 19:43:56 +09:00
강동윤
3faefb5836
feat(es): TypeScript 4.2 (#1330)
swc_ecma_ast:
 - Add `is_abstract` to constructor types.

swc_ecma_codegen:
 - Fix codegen of `Bool`.
 - Implement codegen for abstract constructors.

swc_ecma_parser:
- Inline tsc parser test suite.
- Implement parsing of abstract constructor types.
2021-01-15 19:30:44 +09:00
강동윤
c83d19eb2f
feat(ecmascript): Remove macros (#1319)
swc_ecma_ast:
 - Drop dependency on `enum_kind`.

swc_ecma_parser:
 - Remove `swc_ecma_parser_macros`.
2021-01-05 21:39:24 +09:00
강동윤
6941f29943
fix(swc): Fixes for typescript type checker (#1146)
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.
2020-12-27 18:18:30 +09:00
강동윤
08c5d83d20 Bump version 2020-12-27 13:22:02 +09:00
강동윤
34249bbf47
feat(ecmascript/ast): Add EqIgnoreSpan and TypeEq (#1295) 2020-12-27 13:11:44 +09:00
강동윤
8a8db58f1c
fix(ecmascript): Fix bugs related to string literals (#1287)
swc_ecma_ast:
 - Add `Str.kind`.

swc_ecma_transforms:
 - Fix quotes in template literals. (#1280)

swc_ecma_codegen:
 - Fix escape of single quotes. (#1259)
 - Fix codegen of wrong escapes. (#1276)

swc:
 - Ensure that #1271 is about napi's deserialization.
2020-12-22 04:27:18 +09:00
Brad Dunbar
4327d91fe3
BigInt literal keys (#1192) 2020-11-15 01:22:35 +09:00
강동윤
a368f66e77 Bump version 2020-10-29 15:44:12 +09:00
강동윤
11d137ac11
ast: Add support for fuzzing (#1167)
swc_common:
 - Add support for fuzzing.

swc_ecma_ast:
 - Add support for fuzzing.
2020-10-15 14:58:11 +09:00
강동윤
a5e6242601 Bump version 2020-10-14 14:39:51 +09:00
강동윤
688d16f228
Import assertion / json modules (#1100)
swc_atoms:
 - Add "assert".

swc_ecma_ast
 - Add a field to an import declaration.

swc_ecma_parser:
 - Parse assertions in import statements.
 - Parse assertions in top-level dynamic imports.
 - Parse assertions in non-top-level dynamic imports.

swc_ecma_transforms:
 - Fix compilation.
2020-09-23 14:27:27 +09:00
강동윤
4490e2551d
swc.rs (#1085)
Changes url from https://swc-project.github.io to https://swc.rs
2020-09-21 22:53:48 +09:00
강동윤
a2960810ac
Add BigInt literal type (#1020) 2020-09-03 10:50:13 +09:00
강동윤
511dc54961
Fix codegen of VisitMut for Option (#996)
swc_visit:
 - Fix codegen of VisitMut for Option
2020-08-25 16:29:11 +09:00
강동윤
c475ab7f92 Bump versions 2020-08-21 20:06:37 +09:00
강동윤
2de59759de
Reduce size (#928)
Reduce binary size and make some dependencies optional for deno
2020-08-04 01:33:23 +09:00
강동윤
0ac55ae68b
Improve ux for rust users (#909)
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`.
2020-07-31 18:49:07 +09:00
강동윤
de1f967d32
Store span of ?. in an optional chaining expression (#907)
Add OptChainExpr.question_dot_token
2020-07-28 02:15:04 +09:00
David Sherret
b72901b5e0
Support parsing declare properties (#897)
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>
2020-07-26 12:53:41 +09:00
강동윤
9b8bfb2455
Use stable rustc (#886) 2020-07-24 02:18:22 +09:00
David Sherret
d4ede122fc
Fix span of MethodProp (#877)
- Fix span of MethodProp (needs to include async keyword).

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-07-07 12:49:36 +09:00
강동윤
c0917839a5
Add empty to class member (#875) 2020-07-05 20:10:33 +09:00
강동윤
f500e9528c
Parser for TypeScript 4.0 (#867)
- Allow rest in non-last elements in tuple type
 - Allow labelled ts type element in tuple type
 - More operators
2020-06-29 16:23:33 +09:00
강동윤
cae9286af0 Bump versions 2020-06-20 17:43:24 +09:00
강동윤
fe260a02e2
ES2020 (#855)
Adapt es2020. API is not changed, but config for merged proposals are now noop.
2020-06-20 15:09:57 +09:00
Gurwinder Singh
5f261fcd5c
Rename Import and Export Node names (#777)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-05-17 19:15:31 +09:00
David Sherret
8b4fc59805
Support template literals in types (#767) 2020-05-16 17:19:48 +09:00
강동윤
6f4e534c88 Bump versions 2020-03-10 10:39:42 +09:00
강동윤
e448a8910c
Fix bugs (#710)
- The parser now supports parsing optional patterns in .d.ts files (Closes #709)
 - The source map is handled properly (Closes #705, Closes #707)
2020-03-09 21:18:41 +09:00
강동윤
cb43a69e02
implement { Hash, Eq } for ast nodes (#684)
As NaN is`IIdent` not `Number`, we can use implement Hash and Eq for ast nodes.
2020-02-21 12:47:06 +09:00
kdy1
82e73b1121 Fix bugs (#659)
- Strip out const assertions (Closes #656)
 - Fix exclude of the file matcher (Closes #658) 
 - Automatic typescript detection (Closes #655)
2020-02-12 15:07:45 +00:00