Commit Graph

47 Commits

Author SHA1 Message Date
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
David Sherret
adcca03cfa
fix(es/ast): Remove TsTypeCastExpr it's not used (#1420) 2021-02-22 17:05:51 +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
강동윤
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
Pig Fang
11dbc1406c
TypeScript 4.1: intrinsic keyword (#1193)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-10-29 18:37:22 +09:00
Pig Fang
5ef993d9b2
TypeScript 4.1: template literal type (#1190)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-10-29 17:27:35 +09:00
강동윤
a368f66e77 Bump version 2020-10-29 15:44:12 +09:00
강동윤
cf01ec8277 Bump version 2020-10-20 22:09:52 +09:00
강동윤
a5e6242601 Bump version 2020-10-14 14:39:51 +09:00
Pig Fang
aded151b8f
[typescript] 4.1 mapped type 'as' clause (#1151)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-10-13 16:44:05 +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
강동윤
5c76aea82b
Fix resolver (#1064)
swc_ecma_transforms:
 - resolver: properly handle let and const
 - resolver: handle catch parameters
 - resolver: handle parameter properties

swc_ecma_visit:
 - reduced compile time of debug build
2020-09-11 23:33:36 +09:00
강동윤
eb2162cbd2
Fix stack overflow (#1032)
swc_ecma_codegen:
 - Fix codegen of large binary expressions.

swc_ecma_parser:
 - Fix stack overflow while parsing large binary expressions.

swc_ecma_transforms:
 - typescrip::strip: Fix stack overflow while handling large binary operations.
 - hygiene: Fix stack overflow by migrating it to `VisitMut`.
 - hygiene: Improve performance.
 - fixer: Fix stack overflow by migrating it to `VisitMut`.
 - resolver: Migrate to `VisitMut`.
2020-09-06 15:09:02 +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
강동윤
decac0c052
Improve performance of spack (#981)
swc_bundler:
 - Invoke `LocalMark` less time
 - Use better strategy for parallel computing
2020-08-23 17:27:56 +09:00
강동윤
5000296967
Fix noop issues (#990) 2020-08-23 11:41:19 +09:00
강동윤
c475ab7f92 Bump versions 2020-08-21 20:06:37 +09:00
강동윤
e6191447fe
Typescript 4.0 (#982)
swc_ecma_parser:
 - Add support for optional tuple element (#978)
2020-08-21 19:31:46 +09:00
강동윤
3262052e33
Improve performance and reduce binary size (#973)
spack:
 - Optimize resolver

swc_bunder:
 - Parallize merging of reexports
 - Remove useless `clone`s

swc_ecma_utils:
 - Migrate DropSpan to VisitMut

swc_ecma_transforms:
 - Migrate simple transforms to VisitMut
 - Ignore types to reduce binary size
 - Hide actual types so that we can optimize it in future without breaking change

swc_visit:
 - Apply transforms for vector in-place
 - Apply transforms for box in-place
2020-08-19 01:29:49 +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
강동윤
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
강동윤
22ac51120a
Fix swc_ecma_visit (#809) 2020-05-30 21:06:49 +09:00
강동윤
84f1759910
Fix folder for stable rustc (#797) 2020-05-25 22:53:48 +09:00
Bartek Iwańczuk
13a67a4848
expose Fold in swc_ecma_visit (#796) 2020-05-25 20:09:34 +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
강동윤
d74f74932e Support decorators on parameters (#775)
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2020-05-16 22:36:52 +09:00
David Sherret
8b4fc59805
Support template literals in types (#767) 2020-05-16 17:19:48 +09:00
강동윤
fb52c1052c
Folder for stable rust (#773) 2020-05-16 15:11:44 +09:00
강동윤
4d101a0ef7 Add metadatas 2020-04-02 18:41:02 +09:00
강동윤
b279e7a815
Visitor for stable rust (#743) 2020-04-02 18:38:13 +09:00