Commit Graph

1082 Commits

Author SHA1 Message Date
Bartek Iwańczuk
7a13aabeb7
remove codegen::Handlers () 2020-08-17 21:09:12 +09:00
강동윤
28398280f7
Improve spack ()
swd_bundler:
 - Handle reexports

spack:
 - Do not transform files from node_modules
2020-08-17 15:04:08 +09:00
강동윤
73878728aa
spack: allow using jsx () 2020-08-15 18:23:14 +09:00
강동윤
826b4f868e
Fix import of common js modules ()
spack:
 - Analyze require correctly
 - Properly merge common js modules 
 - Detect circular reference correctly
2020-08-15 17:19:17 +09:00
강동윤
d816d429f5 jsdoc 2020-08-15 01:47:38 +09:00
강동윤
8f0713a303
Drop fxhash () 2020-08-15 01:47:28 +09:00
강동윤
655fc12fcb
Make spack respect swcrc () 2020-08-14 21:02:39 +09:00
강동윤
bceda220fa
JsDoc parser () 2020-08-14 18:20:25 +09:00
강동윤
e2e5f5eba3 Bump version 2020-08-14 15:09:09 +09:00
강동윤
01aeec39ca
hygiene: No ref-ref conflict ()
swc_ecma_transforms:
 - Allow referencing global idents even when it's injected (Closes )
2020-08-14 15:08:36 +09:00
강동윤
7204b104a7
Decorators on parameter properties ()
swc_ecma_transforms:
 - Support parameter decorators on properties without a value ()
2020-08-13 23:13:21 +09:00
강동윤
a62af5f38f
Allow optional constructor property parameters ()
swc_ecma_transforms:
 - Handle optional constructor property parameters properly ()
2020-08-13 11:47:33 +09:00
강동윤
fe2bcb033c New version for swc_ecmascript 2020-08-13 01:25:38 +09:00
강동윤
4495d849b8 Publish swc_bundler 2020-08-12 22:28:59 +09:00
강동윤
2fedf32747
swc_bundler ()
swc_bundler:
 - Splitted from spack

swc_ecma_parser:
 - Fix unexpected eof problem which occurs if log level is trace

swc_ecma_transforms:
 - Fix bugs of dce pass

spack:
 - Support cyclic dependencies
2020-08-12 22:18:47 +09:00
LongYinan
4ab3c58f6a
Strip TypeScript class properties without value assigned ()
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-08-11 01:58:45 +09:00
LongYinan
dde9defbe4
Fix typescript strip in class properties pass ()
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-08-10 20:33:25 +09:00
강동윤
e1f5d681e3
Fix typescript class properties pass () 2020-08-10 01:22:15 +09:00
강동윤
ca246d3df7 Bump version 2020-08-09 19:07:13 +09:00
강동윤
1315d58059
Fix bugs ()
swc_ecma_parser:
 - Allow `in` in class properties ()
 - Make `delete` with optional chaining valid ()

swc_ecma_transforms:
 - Add a `typescript_class_properties` pass ()
2020-08-09 16:45:00 +09:00
LongYinan
26f49099aa
Fix metadata emitted in parameters decorator () 2020-08-09 14:18:15 +09:00
LongYinan
f92516867f
Fix parameters decorator metadata ()
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-08-08 11:34:26 +09:00
강동윤
951d52ec55
Fix target, target () 2020-08-08 01:30:15 +09:00
강동윤
34d475fbc8
Type annotation in catch binding ()
swc_ecma_parser:
 - Support catch binding with type anntation (Closes )
2020-08-07 13:04:35 +09:00
강동윤
0989e73a99
Metadata for typescript decorator ()
swc_ecma_transforms:
 - Allow emitting decorator metadata (, )

swc:
 - change order of passes to allow decorator using type informations
2020-08-06 21:23:34 +09:00
강동윤
5fb77dbd61 Bump version 2020-08-06 14:59:13 +09:00
강동윤
969fe6ec32
Spack ()
spack:
 - Always inline `NODE_ENV` before analyzing imports
 - implements conditional requires ()
2020-08-06 14:55:16 +09:00
강동윤
76bcd3d7e4
More span tests () 2020-08-05 12:34:44 +09:00
강동윤
42554d1194
Fix fixer ()
swc_ecma_transforms:
 - fixer: Preserve paren around computed constructor ()
2020-08-04 12:15:38 +09:00
강동윤
2de59759de
Reduce size ()
Reduce binary size and make some dependencies optional for deno
2020-08-04 01:33:23 +09:00
강동윤
54e0bfd878
Update swc_ecma_utils () 2020-08-03 00:47:23 +09:00
강동윤
5baa636a4b
Chores (coverage, documentation, etc..) () 2020-08-02 19:10:28 +09:00
강동윤
d2b8916f9f
Fix more typescript bugs ()
swc_ecma_parser:
 - Fix parsing of binding identifier `await`

swc_ecma_transforms:
 - More tests for typescript::strip
 - Handle export declare class properly
 - Remove declared variables
 - Fix enums in if statement
 - Fix sequence expression in class member key
 - Fix await in extend-clause
 - Fix optional array pattern
 - Fix optional object pattern
2020-08-02 15:06:22 +09:00
강동윤
db0a56514d
Remove TsIndexSignature from typescript::strip () 2020-08-01 21:32:11 +09:00
강동윤
881c3a369f
Coverage with crontab ()
I decided to configure crontab on my desktop because coverage test requires 20+GB of ram
2020-08-01 16:57:36 +09:00
LongYinan
0a7f3a28ee
super() should be first ()
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-08-01 00:55:13 +09:00
강동윤
0ac55ae68b
Improve ux for rust users ()
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
Bartek Iwańczuk
9cb32cbb75
fix: readonly is not stripped from private prop ()
swc_ecma_codegen:
 - Fix printing logic of literals and template literals
 - Fix printing of hex

swc_ecma_parser:
 - Track raw string correctly

swc_ecma_transforms:
 - typescript: Handle class properties (readonly)
 - typescript: Handle enums inside function

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-07-30 22:40:43 +09:00
강동윤
a74eace7e2 Bump version 2020-07-30 00:56:23 +09:00
강동윤
727a0aaa25
Remove stupid assertion () 2020-07-30 00:55:46 +09:00
강동윤
ca43112d2a
codegen: Preserve quotes () 2020-07-28 21:56:19 +09:00
강동윤
de1f967d32
Store span of ?. in an optional chaining expression ()
Add OptChainExpr.question_dot_token
2020-07-28 02:15:04 +09:00
강동윤
891092caf2
Fix typescript stripper ()
swc_ecma_codegen:
 - Fix codegen of optional catch parameters ()

swc_ecma_transforms:
 - Fix for nested catch clause
2020-07-28 00:55:28 +09:00
강동윤
c58b9c8649 Fix lint 2020-07-27 23:01:51 +09:00
강동윤
ecd7b4decc
Implement more methods for codegen ()
swc_ecma_codegen:
 - implement emit_private_property (Closes )
2020-07-27 22:58:42 +09:00
강동윤
ea885df521
Fix bugs ()
swc_ecma_parser:
 - Accept `export type * from '../typings'` ()

swc_ecma_transforms:
 - Ensure that swc does not duplicate classes ()
2020-07-27 20:21:52 +09:00
강동윤
53b09aa356
Fix decorators ()
swc_ecma_transforms:
 - typescript::strip: Preserve a class property if it has decorators
 - decorators::legacy: Implement parameter decorator.
2020-07-26 17:07:24 +09:00
David Sherret
b72901b5e0
Support parsing declare properties ()
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
강동윤
a1d33d023a
Improve ux using swc as a rust library ()
swc_ecma_parser:
 - Improve parser's error reporting story
 - Replace `Session`, `Handler`, `Emitter` with Parser.take_errors()
 - Expose `Error`
 - Remove useless lifetime parameters
2020-07-25 20:26:04 +09:00
강동윤
c7a5d5fef9
Fix class hygiene issue related to class properties ()
swc_ecma_transforms:
  - fixed hygiene bug of class_properties pass
2020-07-24 22:02:29 +09:00