Donny/강동윤
790c50631b
fix(es/minifier): Fix for modules ( #3170 )
...
swc_ecma_minifier:
- Handle exported declarations correctly.
swc:
- Change default of `compress.toplevel` and `mangle.top_level` to true for modules. (Closes #3169 )
2022-01-03 00:07:42 +09:00
Donny/강동윤
194b3e9b67
refactor(*): Use 2021 edition ( #3151 )
2021-12-30 18:59:18 +09:00
Donny
0cf8265f02
chore: Publish crates
2021-12-29 21:04:30 +09:00
OJ Kwon
72c963662d
refactor(*): Drop unused dependencies ( #3138 )
2021-12-29 15:27:51 +09:00
Donny
737b6108d4
chore: Publish crates
2021-12-29 13:46:45 +09:00
Donny/강동윤
43c8cda31a
fix(es/renamer): Fix renamer ( #3139 )
...
swc_ecma_transforms_base:
- `resolver`: Ignore named export with source.
- `hygiene`: Ignore named export with source. (Closes #2924 , Closes #3114 )
swc_ecma_minifier:
- Handle `export default` declarations as declaration instead of expressions. (Closes #2717 )
- Don't override already-processed identifiers. (Closes #2988 )
swc_bundler:
- Adjust the syntax context for named re-exports.
2021-12-29 13:44:48 +09:00
Donny/강동윤
a81661c74a
perf(es/hygiene): Fix performance bug ( #3090 )
...
swc_ecma_transforms_base:
- `hygiene`: Skip checking a symbol if we are sure that it will be discarded.
swc_ecma_laoder:
- Optimize `NodeModulesResolver` by trying `.js` first.
2021-12-21 23:52:13 +09:00
Donny
e33248cbcc
chore: Publish crates
2021-12-21 18:21:48 +09:00
Donny/강동윤
0e4dce694d
refactor(es/minifier): Use swc_timer
( #3087 )
...
swc_bundler:
- Add `Config.disable_fixer`.
- Add `Config.disable_hygiene`.
swc_ecma_minifier:
- Use `swc_timer`.
2021-12-21 18:19:33 +09:00
Donny/강동윤
d482d61b9f
chore(scripts): Use cargo profile instruments
instead of cargo instruments
( #3086 )
2021-12-21 16:09:19 +09:00
Donny
9b36abbe75
chore: Publish crates
2021-12-15 16:22:00 +09:00
Austaras
38955c0c8d
refactor(es/ast): Change type or the key
of ClassProp
to PropName
( #3038 )
2021-12-15 16:21:30 +09:00
Donny
f86c077a37
chore: Publish crates
2021-12-13 06:46:14 +09:00
Donny
bf69cd554b
chore: Publish crates
2021-12-07 18:03:14 +09:00
Donny/강동윤
4a7937d56e
fix(es/minifier): Don't create top level variables ( #2985 )
...
swc_ecma_minifier:
- Add `module` to `TerserCompressorOptions`.
- Don't create top level variables while inlining if `module` is false.
- Drop more unused parameters.
2021-12-07 18:02:43 +09:00
Donny
82ece9d0ca
chore: Publish crates
2021-12-07 15:15:08 +09:00
Donny
b1a47ee971
chore: Publish crates
2021-12-07 14:34:44 +09:00
Donny/강동윤
e48263b2f3
refactor(visit): Remove &dyn Node
from Visit
( #2984 )
...
swc_visit_macros:
- Remove `&dyn Node` from `Visit`.
- Implement `VisitWith<V>` for `[T]`.
2021-12-07 14:34:16 +09:00
Donny/강동윤
694d3c5072
feat(es/minifier): Print more informantion on infinite loops ( #2976 )
...
swc_ecma_minifier:
- Remove `OptimizerState`.
- Dump source code if pass is over 200.
2021-12-06 19:47:02 +09:00
Donny
acc45e7c36
chore: Publish crates
2021-12-05 17:34:04 +09:00
Donny
529f980693
chore: Publish crates
2021-12-05 15:44:50 +09:00
Donny
42a93dd8ef
chore: Publish crates
2021-12-04 11:53:14 +09:00
David Sherret
67280b6fb0
fix(es/typescript): Run resolver
before typescript::strip
( #2951 )
...
swc_ecma_transforms_base:
- `resolver`: Handle some typescript nodes.
swc_ecma_transforms_typescript:
- `strip`: Use identifier span hygiene information for stripping types.
2021-12-04 02:35:16 +00:00
David Sherret
beb2c73c2c
fix(swc/hygiene): Prefer not renaming top level variables ( #2940 )
...
swc_ecma_transforms_base:
- `hygiene`: Use concept of depth to prevent renaming top level nodes.
2021-12-04 01:55:27 +09:00
David Sherret
4d993c26b6
fix(es/hygiene): Reduce renaming ( #2938 )
...
swc_ecma_transforms_base:
- `hygiene`: Treat class methods and constructors as a scope.
2021-12-02 07:28:09 +00:00
RiESAEX
d8c8641e59
fix(es/parser, es/compat): transform tagged template with invalid escape sequence ( #2939 )
...
swc_ecma_parser:
- Preserve more data for invalid escapes in template literals.
swc_ecma_transforms_compat:
- Fix handling of template literals. (Closes #2674 )
2021-12-02 15:49:45 +09:00
Donny
67dc0d3b94
chore: Publish crates
2021-12-02 10:08:22 +09:00
Donny
86d2cebd37
chore: Publish v1.2.115
2021-12-01 14:20:52 +09:00
Donny/강동윤
28850eef5c
chore: Allow using #[doc(cfg)]
( #2871 )
2021-11-25 14:16:18 +09:00
Donny
770da5ae9e
chore: Publish crates
2021-11-24 15:05:46 +09:00
RiESAEX
cf777c5ba1
fix(es/lexer): Fix lexing of hexadecimal escape sequences ( #2838 )
2021-11-24 05:26:38 +00:00
Donny
d4ffce13b5
chore: Publish crates
2021-11-24 10:08:01 +09:00
Donny/강동윤
6b96a3d8ed
feat: Enable logging of timings ( #2833 )
...
swc_timer:
- Add `Timer`.
- Add `timer!()`.
node:
- Enable logging.
2021-11-22 21:01:08 +09:00
Donny
7ec522f165
chore: Publish crates
2021-11-22 17:55:07 +09:00
黄伟
c5768d7672
feat(es/minifier): Improve drop_console
( #2830 )
...
swc_ecma_minifier:
- Implement more rules for `drop_console`. (Closes #2807 )
2021-11-22 17:54:36 +09:00
Donny
cdf7f5f5a0
chore: Publish crates
2021-11-20 17:06:40 +09:00
Donny/강동윤
fa342a0067
fix(es/minifier): Fix bugs ( #2779 )
...
swc_ecma_minifier:
- Don't optimize `1 / t == -1 / 0` as `!1`.
- Don't optimize `e === -1 / 0` as false.
- Don't inline string literals in arguments, if it's used multiple time. (https://github.com/vercel/next.js/issues/31291 )
2021-11-20 17:06:18 +09:00
Donny/강동윤
e1b76654f5
chore(es/minifier): Add a script to copy tests from a next.js app ( #2778 )
2021-11-17 16:18:34 +09:00
Donny
2cd565bfc0
chore: Publish crates
2021-11-15 14:31:44 +09:00
Donny/강동윤
f2c67b8caf
fix(es/minifier): Don't inline string literals if it's used multiple time ( #2748 )
...
swc_ecma_minifier:
- Don't inline strings because it's simple.
- Inline short strings.
2021-11-15 14:03:03 +09:00
Tim Neutkens
3ebc5c6b69
chore: Update markdown files to use "SWC" instead of "swc" ( #2744 )
2021-11-15 04:26:04 +00:00
Donny/강동윤
665c8e05fc
fix(es): Move TargetEnv
to loader from ast ( #2719 )
...
swc_ecma_ast:
- Move `TargetEnv` to `swc_ecma_loader`.
swc_ecma_loader:
- Drop unused dependencies.
2021-11-11 20:00:46 +09:00
Donny
3adeb6bf30
chore: Publish crates
2021-11-10 20:57:43 +09:00
Donny/강동윤
df635c9e6d
fix(es/minifier): Fix minifier ( #2711 )
...
swc_ecma_minifier:
- Respect `inline_prevented`.
- Mark the LHS of an assignment pattern property as a pattern. (https://github.com/vercel/next.js/issues/30498 )
2021-11-10 20:56:50 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript
( #2708 )
2021-11-10 19:00:54 +09:00