Commit Graph

1602 Commits

Author SHA1 Message Date
Donny/강동윤
95c572f207
test(es/codegen): Add a test for fixed issue (#4121) 2022-03-22 19:49:59 +09:00
SWC Bot
8d322ef575 chore: Publish crates 2022-03-22 10:46:03 +00:00
Donny/강동윤
154d443c88
fix(es/compat): Fix regression of es2015 (#4119) 2022-03-22 10:42:05 +00:00
SWC Bot
03f1c14840 chore: Publish crates 2022-03-22 10:06:36 +00:00
Donny/강동윤
13b2f38cdd
fix(es/typescript): Collect all bindings in strip (#4118) 2022-03-22 10:03:58 +00:00
SWC Bot
77722c4943 chore: Publish crates 2022-03-22 08:03:01 +00:00
Alexander Akait
634d732803
feat(es/ast): Add raw to Str (#4071) 2022-03-22 07:54:08 +00:00
SWC Bot
5b6b9c0a25 chore: Publish crates 2022-03-22 06:27:29 +00:00
Donny/강동윤
4a9817f003
fix(es/minifier): Consider side effects while lifting sequences (#4116) 2022-03-22 06:25:19 +00:00
SWC Bot
57f8a0cad3 chore: Publish crates 2022-03-22 05:16:30 +00:00
OJ Kwon
f41a717c45
chore(plugin/runner): Update wasmer-* (#4111) 2022-03-22 05:14:20 +00:00
SWC Bot
58e1ed4a5f chore: Publish crates 2022-03-22 04:54:28 +00:00
Austaras
9a8fc2776e
fix(es/parser): Make let a reserved word in strict mode (#4113) 2022-03-22 04:52:10 +00:00
SWC Bot
39507b0268 chore: Publish crates 2022-03-21 11:37:18 +00:00
Artur
dd862ba9f8
feat(es/lints): Implement use-isnan rule (#4080) 2022-03-21 11:35:10 +00:00
SWC Bot
bba8e6be67 chore: Publish crates 2022-03-21 11:13:26 +00:00
Donny/강동윤
c6f8742669 feat(es/minifier): Implement more evaluation rules (#4030) 2022-03-21 20:07:59 +09:00
SWC Bot
2e48c9fc24 chore: Publish crates 2022-03-21 05:16:53 +00:00
Donny/강동윤
61f1a37492
fix(es/codegen): Fix codes related to sourcemap (#4106) 2022-03-21 05:14:45 +00:00
SWC Bot
7d335cdd28 chore: Publish crates 2022-03-20 11:58:30 +00:00
Hannes Bornö
d38117d4cb
fix(es/parser): Allow parentheses in assignment target (#4105) 2022-03-20 11:56:22 +00:00
Donny/강동윤
9b64a6960f
fix(es/codegen): Emit decorators on class methods (#4103) 2022-03-20 07:53:53 +00:00
SWC Bot
133bfb43d3 chore: Publish crates 2022-03-20 07:13:59 +00:00
Austaras
552f16dba6
fix(es/codegen): Support multiline comments in return stmt (#4102) 2022-03-20 07:11:23 +00:00
SWC Bot
06c1b3ecb5 chore: Publish crates 2022-03-20 06:49:16 +00:00
Artur
9ceefa734f
feat(es/lints): Implement valid-typeof rule (#4095) 2022-03-20 06:46:41 +00:00
Donny/강동윤
b31ead5cbe chore: Fix CI 2022-03-20 15:25:35 +09:00
Donny/강동윤
565a7202ed chore: Fix CI 2022-03-20 00:15:03 +09:00
SWC Bot
d7d160e2fa chore: Publish crates 2022-03-19 15:00:25 +00:00
Edwin Coronado
57802cfcce
fix(common): Fix the line number of errors (#4082) 2022-03-19 23:56:12 +09:00
Donny/강동윤
3f78053227 chore: Typo 2022-03-19 23:17:48 +09:00
SWC Bot
165c752606 chore: Publish crates 2022-03-19 14:14:02 +00:00
Austaras
f5b9600b2b
fix(es/compat): Visit non-method properties in a nested object literal (#4094) 2022-03-19 14:11:54 +00:00
Donny/강동윤
544a3416ee chore: Publish v1.2.159 with fix 2022-03-19 21:23:38 +09:00
Donny/강동윤
f2dfaba065 chore: Publish v1.2.159 2022-03-19 20:45:38 +09:00
SWC Bot
51e2dfd7e7 chore: Publish crates 2022-03-19 11:28:06 +00:00
Donny/강동윤
0d6bd813b2
fix(es/compat): Revert wrong fix of arrow (#4093) 2022-03-19 11:25:52 +00:00
SWC Bot
b4ad33ae3d chore: Publish crates 2022-03-19 10:51:19 +00:00
Donny/강동윤
533f756274
fix(api/rust): Exclude test files from rust packages (#4091) 2022-03-19 10:49:12 +00:00
SWC Bot
f75ec3dd66 chore: Publish crates 2022-03-19 10:29:08 +00:00
Donny/강동윤
cb0881cc3d
fix(es/compat): Visit generated codes from arrow (#4090) 2022-03-19 10:26:58 +00:00
SWC Bot
2ea781bc26 chore: Publish crates 2022-03-19 10:03:42 +00:00
meskill
6ac7934017
fix(es/module/cjs): Fix conflict of a local export and exports-alls (#4089) 2022-03-19 09:56:14 +00:00
SWC Bot
e7d450c8af chore: Publish crates 2022-03-19 07:07:31 +00:00
Donny/강동윤
d0f687bf44
feat(es/module/cjs): Support import.meta.url (#4087) 2022-03-19 07:05:11 +00:00
SWC Bot
9fa04fb2e7 chore: Publish crates 2022-03-19 06:42:59 +00:00
Donny/강동윤
b716210de1
fix(common): Fix handling of input source maps (#4086) 2022-03-19 06:40:59 +00:00
Donny/강동윤
792ab2ca25
test(es/parser): Add a test for a fixed issue (#4085) 2022-03-19 06:14:13 +00:00
SWC Bot
670b80169e chore: Publish crates 2022-03-19 05:35:23 +00:00
Donny/강동윤
f66229822c
fix(es/resolver): Fix handling of decorators (#4084) 2022-03-19 05:32:53 +00:00
SWC Bot
60d820a47c chore: Publish crates 2022-03-18 14:21:39 +00:00
Artur
b39e345d8e
feat(es/lints): Implement no-new-symbol rule (#4076) 2022-03-18 23:19:02 +09:00
Donny/강동윤
174b48d4c3 chore: Publish v1.2.158 2022-03-18 20:58:54 +09:00
SWC Bot
62294eea4f chore: Publish crates 2022-03-18 11:09:15 +00:00
Donny/강동윤
4af5e6d77b
fix(css/prefixer): Reduce the number of vars in debug build (#4078) 2022-03-18 11:07:01 +00:00
SWC Bot
0087627910 chore: Publish crates 2022-03-18 08:29:12 +00:00
Donny/강동윤
22d005e224
fix(es/modules): Fix sourcemap, really (#4074) 2022-03-18 08:26:58 +00:00
SWC Bot
a564ced26a chore: Publish crates 2022-03-18 03:05:36 +00:00
Donny/강동윤
9458f08092
feat(es/modules): Support namespaced reexports (#4073) 2022-03-18 03:03:02 +00:00
SWC Bot
355b3b3001 chore: Publish crates 2022-03-18 01:46:26 +00:00
Donny/강동윤
55cfad152d
fix(es/helpers): Fix decorator helper script (#4072) 2022-03-18 01:44:13 +00:00
SWC Bot
1483a71c7e chore: Publish crates 2022-03-17 22:16:43 +00:00
Donny/강동윤
bb08354950
fix(es/react): Fix _createElement (#4070) 2022-03-17 22:13:23 +00:00
Donny/강동윤
b4906cc1d5 chore: Publish v1.2.157 2022-03-17 19:31:01 +09:00
SWC Bot
a74d4ca679 chore: Publish crates 2022-03-17 10:29:25 +00:00
Donny/강동윤
9310c39fe9
fix(es/codegen): Fix sourcemap (#4062) 2022-03-17 10:26:58 +00:00
SWC Bot
94632b6940 chore: Publish crates 2022-03-17 08:21:45 +00:00
Donny/강동윤
f8a3849299
fix(es/helpers): Fix the name of _classPrivateFieldLooseBase (#4061) 2022-03-17 08:19:30 +00:00
OJ Kwon
5a2a6037d4
feat(node-swc): Embed target triple string (#4058) 2022-03-17 07:57:16 +00:00
SWC Bot
9d5413698f chore: Publish crates 2022-03-17 07:34:36 +00:00
Alexander Akait
f2517a345b
feat(css/prefixer): Support more properties (#4055) 2022-03-17 07:25:51 +00:00
SWC Bot
a9708a5a1f chore: Publish crates 2022-03-17 06:58:38 +00:00
Donny/강동윤
ffcb6ce523
fix(es/parser): Allow nested ambient context in .d.ts files (#4060) 2022-03-17 06:56:26 +00:00
SWC Bot
aacc2a1f46 chore: Publish crates 2022-03-17 06:08:12 +00:00
Artur
833958bd74
feat(es/lints): Implement yoda rule (#3886) 2022-03-17 06:05:39 +00:00
SWC Bot
4d6d766cf8 chore: Publish crates 2022-03-17 05:36:01 +00:00
Austaras
bbe8f3d8fe
fix(es/ast): Revert removal of definite in PrivateProp (#4051) 2022-03-17 05:33:37 +00:00
SWC Bot
409bb9f3fe chore: Publish crates 2022-03-17 05:09:17 +00:00
OJ Kwon
5c84fe525f
fix(plugin/runner): Make build pass for wasm32 (#4056) 2022-03-17 05:07:03 +00:00
SWC Bot
fc7ea6afe0 chore: Publish crates 2022-03-16 14:28:00 +00:00
Alexander Akait
bd444c0ceb
fix(es/codegen): Fix codegen of string literals (#4037) 2022-03-16 14:25:26 +00:00
LongYinan
db9b988845
feat(node-swc): Add libc field in Linux platform packages (#4046) 2022-03-16 18:58:24 +09:00
Donny/강동윤
da1fd033b8 chore: Fix CI 2022-03-16 17:30:28 +09:00
Donny/강동윤
702e0e124c chore: Publish v1.2.156 2022-03-16 17:14:41 +09:00
SWC Bot
8eb9476cfb chore: Publish crates 2022-03-16 08:13:01 +00:00
Donny/강동윤
834cd4f7b6
fix(es/modules): Use correct span for ExportAlls (#4038) 2022-03-16 17:10:47 +09:00
SWC Bot
5824571a3f chore: Publish crates 2022-03-16 04:22:52 +00:00
Donny/강동윤
ba1c854fb1
fix(es/lints): Fix false-positive of duplicate-exports (#4041) 2022-03-16 04:20:45 +00:00
SWC Bot
c6d781916f chore: Publish crates 2022-03-15 22:48:06 +00:00
OJ Kwon
dab2002a2e
refactor(plugin/runner): Split modules and introduce feature flags (#4035) 2022-03-15 22:45:40 +00:00
Donny/강동윤
71f7cf2011
test(es): Add tests for fixed issues (#4036) 2022-03-15 20:38:31 +00:00
SWC Bot
bcd08f6838 chore: Publish crates 2022-03-15 20:09:43 +00:00
Donny/강동윤
3a4704fe77
feat(es/transforms/base): Add paren_remover (#4034) 2022-03-15 20:07:04 +00:00
SWC Bot
0d6fb99384 chore: Publish crates 2022-03-15 16:20:51 +00:00
Austaras
120d2a534e
fix(es/parser): Emit an error for multiple constructors with body (#4031) 2022-03-15 16:18:19 +00:00
Donny/강동윤
bba5a33415
fix(node-swc): Disable logging of warn level by default (#4033) 2022-03-15 15:07:56 +00:00
SWC Bot
cc2aa361fa chore: Publish crates 2022-03-15 14:19:50 +00:00
Donny/강동윤
e19a60aad4
fix(es/compat): Change pass ordering of es2015 (#4029)
**Description:**

We should apply `regenerator` after `block_scoping` because `regenerator` does not know how to handle `const`s.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/3006
2022-03-15 14:17:03 +00:00
SWC Bot
5e89d18370 chore: Publish crates 2022-03-15 12:23:49 +00:00
Austaras
0c76696ed2
fix(es/decorator): Insert initializer to constructor with body (#4028) 2022-03-15 12:21:17 +00:00
SWC Bot
6d5541ccbe chore: Publish crates 2022-03-15 11:00:48 +00:00
Lennart
25e5ccc548
fix(es/parser): Allow building with stable rustc (#4024) 2022-03-15 19:58:29 +09:00
SWC Bot
b12a2f3ba5 chore: Publish crates 2022-03-15 09:47:41 +00:00
Donny/강동윤
73c91d34d5
fix(es/helpers): Inject helpers for scripts (#4025)
**Description:**

This PR adds support for helpers in script mode. For now, we does not support `externalHelpers` for scripts, as there is no standard for importing other files from a script.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/2385
2022-03-15 09:43:57 +00:00
SWC Bot
2f6f829405 chore: Publish crates 2022-03-15 09:17:09 +00:00
Donny/강동윤
0c8c3d7d51
fix(es/decorator): Remove noop_fold_type (#4022) 2022-03-15 09:14:47 +00:00
SWC Bot
531762ae71 chore: Publish crates 2022-03-15 08:45:12 +00:00
Donny/강동윤
3173047f58
refactor(es/minifier): Cleanup (#4020)
**Description:**

 - `Optimizer.data`: `Option<ProgramData>` => `ProgramData`.
 - `Optimizer.done`: Remvoed.
 - `Optimzer.done_ctxt`: Removed.
 - `Pure`: Add `data: Option<&'a ProgramData>`.
2022-03-15 08:42:50 +00:00
SWC Bot
1902682bed chore: Publish crates 2022-03-15 08:15:34 +00:00
OJ Kwon
629709e1b1
feat(cli/compile): Support out-file (#4016) 2022-03-15 08:13:15 +00:00
Donny/강동윤
be09ea6991
feat(es/minifier): Drop noop calls (#4019) 2022-03-15 16:23:32 +09:00
SWC Bot
abd94c8df2 chore: Publish crates 2022-03-15 07:02:06 +00:00
Alexander Akait
4f6f244170
feat(css/prefixer): Implement more rules for prefixer (#4013) 2022-03-15 06:58:22 +00:00
SWC Bot
5800737752 chore: Publish crates 2022-03-15 05:53:53 +00:00
David Campion
b337c2e2d4
fix(es): Sort spans while preserving comments (#4011) 2022-03-15 05:51:44 +00:00
SWC Bot
957a20d383 chore: Publish crates 2022-03-15 05:26:28 +00:00
Sahil mobaidin
f8d6127dd1
fix(es/parser): Report an error if LeftHandSideExpression is invalid (#4001) 2022-03-15 14:24:19 +09:00
SWC Bot
9d6a57c6e5 chore: Publish crates 2022-03-14 14:32:45 +00:00
Alexander Akait
a4bc0927a0
feat(css): Supports more color notations (#4009) 2022-03-14 14:30:09 +00:00
Donny/강동윤
afa97f63df chore: Publish v1.2.155 2022-03-14 19:27:27 +09:00
SWC Bot
db62bb6415 chore: Publish crates 2022-03-14 10:01:39 +00:00
Donny/강동윤
0ad13d93f2
fix(common): Don't use None as source while generating source maps (#4007)
**Description:**

I used https://pastcompute.github.io/ScriptMapper/ to dump source map, and found that line/column becomes null if file is `None`. Seems like the rust crate `sourcemap` is mature enough to handle sourcemaps with those entries, but many other sourcemap libraries, including the one used by `@swc/cli` expects non-null value for the line and the column.
2022-03-14 09:51:51 +00:00
Donny/강동윤
ae2f8d6327 chore: Publish crates 2022-03-14 15:39:23 +09:00
Donny/강동윤
f650ca6bb9
doc(api/rust): Add an example for generating code and sourcemap (#4005) 2022-03-14 03:52:59 +00:00
SWC Bot
833dc89a2d chore: Publish crates 2022-03-14 02:08:47 +00:00
Donny/강동윤
ee9a841f33
test(*): Print diagnostics to stderr while testing (#4003)
**Description:**

This will make debugging stack overflow and parser issues easier because it writes to stderrr right away, instead of holding a buffer for it.
2022-03-14 02:06:34 +00:00
Donny/강동윤
dac84b98e3
doc(api/rust): Add examples (#4002) 2022-03-13 22:07:34 +00:00
SWC Bot
8565a8e8f3 chore: Publish crates 2022-03-13 21:44:41 +00:00
Austaras
87a3c1c916
fix(es/resolver): Use correct context for identifiers after type parameters (#4000) 2022-03-13 21:42:24 +00:00
Donny/강동윤
38c0c0faa6 chore: Publish crates 2022-03-14 04:11:07 +09:00
SWC Bot
8ba1f201b9 chore: Publish crates 2022-03-13 19:09:34 +00:00
Donny/강동윤
40b8a4e596
feat(common): Implement a pretty error reporter (#3946) 2022-03-13 19:07:18 +00:00
SWC Bot
13ee45a830 chore: Publish crates 2022-03-13 18:40:08 +00:00
Alexander Akait
96d6f37c20
feat(css/parser): Improve error reporting (#3999) 2022-03-13 18:37:42 +00:00
SWC Bot
3cfe4ccb94 chore: Publish crates 2022-03-13 18:00:19 +00:00
Alexander Akait
ece8d962f8
fix(css/codegen): Fix source maps (#3997) 2022-03-14 02:55:18 +09:00
SWC Bot
386456f48a chore: Publish crates 2022-03-13 09:13:23 +00:00
Donny/강동윤
a23af2dea2
feat(es/minifier): Compress more comparisons (#3996) 2022-03-13 09:11:16 +00:00
Donny/강동윤
dabc4920a8
test(es): Add auto-closable tests (#3995) 2022-03-13 08:45:55 +00:00
SWC Bot
3fba1a1a6d chore: Publish crates 2022-03-13 07:54:40 +00:00
Donny/강동윤
b22d084180
test(es): Add an execution test system (#3994)
Description:

As we have a way to verify that input is behaving identically, we create a huge matrix of compile options and process the input with all of those options.

This system can be used to check for fixed issues easily.
For first, someone can add issues using a unix hidden directory, which starts with `.`. Those tests are ignored by `testing::fixture`.
Then, when something is changed, one can run `./scripts/check-issues.sh`. If a test succeeds, it means it's fixed and the starting dot (`.`) of the path to the test input file is removed.
2022-03-13 07:47:39 +00:00
SWC Bot
ad3115fa2f chore: Publish crates 2022-03-13 03:29:32 +00:00
Donny/강동윤
64ca5bae4d
feat(es/minifier): Implement more rules for arrows (#3992) 2022-03-13 03:27:15 +00:00
SWC Bot
d9db2faded chore: Publish crates 2022-03-13 02:59:56 +00:00
Donny/강동윤
f7b212bfc4
perf(es/minifier): Use Vec<u8> as a buffer for base54 (#3993)
Description:
We are only using ASCII characters so we can avoid utf8 logics by using `Vec<u8>` as a buffer and converting it into `String` at the end.
2022-03-13 02:57:47 +00:00
SWC Bot
abf6a1b294 chore: Publish crates 2022-03-12 16:16:12 +00:00
Austaras
3590ea2277
fix(es): Merge jsc.loose and jsc.assumptions (#3990) 2022-03-12 16:14:03 +00:00
SWC Bot
2a6106f0b7 chore: Publish crates 2022-03-12 15:38:49 +00:00
magic-akari
04db7e2a9b
perf(es/minifier): Refactor base54 (#3989) 2022-03-12 15:36:42 +00:00
Donny/강동윤
3054409214 chore: Publish crates 2022-03-12 20:47:59 +09:00