Iron Lu
4a9b31df3e
fix(swc): Fix order of passes ( #1931 )
...
swc:
- Run `import_analyzer` after `regenerator`.
2021-07-17 13:12:30 +09:00
강동윤
104be9837b
fix(es/transforms): Fix transforms ( #1909 )
...
swc_ecma_transforms_compat:
- `regenerator`: Use es6 import while folding module. (#1641 )
- `typeof_symbol`: Handle `undefined` specially. (#1843 )
- `regenerator`: Do not create useless codes. (#1687 )
- `typeof_symbol`: Migrate to `VisitMut`.
swc_ecma_transforms_module:
- Add `import_hoister`.
- Improve import analyzer. (#1682 )
- Allow overriding `export *` wth named exports. (#1714 )
swc_ecma_transforms_testing:
- Add a hack for `regenerator-runtime`.
swc:
- Run import analyzer ahead of time. (#1682 )
misc:
- Downgrade rustc to the version rust-analyzer supports.
2021-07-10 11:18:28 +00:00
강동윤
03be315921
fix(es/transforms): Fix decorator bugs ( #1905 )
...
swc_ecma_transforms_proposal:
- Initialze decorators lazily. (#1278 )
2021-07-08 20:48:07 +09:00
강동윤
19bcb06f73
fix(swc): Fix source path of a source map file ( #1902 )
...
swc:
- Use `output_path` to make sourcemap path relative to the `.map` file. (#1255 )
2021-07-08 07:32:06 +00:00
강동윤
69186eb74d
fix(es/transforms): Fix transforms ( #1900 )
...
node-swc:
- Use proper field name in `ObjectPattern`. (#1886 )
swc_ecma_codegen:
- Fix codegen of private properties. (#1898 )
swc_ecma_transforms_compat:
- Fix optional chaining expressions in a single-line arrow expression. (#1836 )
- `regenerator`: Preserve `ExportDefaultDecl`. (#1799 )
swc_ecma_transforms_module:
- Fix `export default function`. (#1799 )
2021-07-08 04:54:57 +00:00
Iron Lu
f8a3df8cc3
fix(es/transforms/module): Fix for duplicate export ( #1846 )
2021-06-29 15:12:18 +09:00
강동윤
33f2ab2d79
fix(es/transforms): Fix transforms ( #1861 )
...
swc_ecma_transforms_compat:
- Organize logical assignment pass correctly.
swc_ecma_transforms_optimization:
- `dead_branch_remover`: Handle nullish coalescing operator correctly. (#1851 )
2021-06-26 16:02:15 +09:00
강동윤
098e48b8f3
fix(es/codegen): Preserve more comments ( #1856 )
...
swc_ecma_codgen:
- Print more comments. (#1165 )
2021-06-26 02:07:11 +09:00
강동윤
4cd43375a5
feat(swc): Add import resolvers ( #1834 )
...
swc_ecma_loader:
- Add `Resolve`.
- Add `TsConfigResolver`.
swc_ecma_transforms_module:
- Use `Resolve` for remapping import paths.
- Add `ImportResolver`.
- Add `NodeImprortResolver`.
swc:
- Add `paths` to `.swcrc`.
- Use `paths`. (#379 , #702 )
- Canonicalize file names.
2021-06-24 06:32:09 +00:00
강동윤
5a6c4fd5a0
fix(swc): Fix sourcemap ( #1832 )
...
swc_common:
- `SourceMap`: Don't panic for dummy spans.
swc_ecma_codegen:
- Use span for `throw`. (#1685 )
- Use span for `var` / `let` / `const`.
- Use span for `new`.
- Use span for `if`.
- Add spans to braces of a block statement. (#1796 )
swc_ecma_transforms_compat:
- `parameters`: Don't drop the span of block statements. (#1796 )
swc:
- Allow specifying input source map in `.swcrc`.
- Ensure that the inline source map works properly. (#1713 )
2021-06-18 11:34:17 +00:00
강동윤
d3944f5203
fix(swc): Fix bugs ( #1820 )
...
swc_ecma_preset_env:
- [x] Rename directory to be consistant.
- [x] Add es2020::operators. (#1812 )
swc_ecma_transforms_react:
- [x] Don't escpae unicodes. (#1782 )
2021-06-12 15:39:39 +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
강동윤
7730a6ea5a
fix(es/transforms): Fix bugs ( #1795 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Handle await in async generators correctly. (#1752 )
swc_ecma_transforms_module:
- Don't panic on double import from one module. (#1757 )
2021-06-06 22:16:59 +09:00
강동윤
ad55711e45
fix(es/transforms): Fix bugs ( #1769 )
...
swc_ecma_transforms_optimization:
- `dce`: Mark references from decorator as usage. (denoland/deno#10789)
swc_ecma_transforms_proposal:
- Allow using `super` in decorated class methods. (#846 )
2021-05-30 19:52:51 +09:00
강동윤
8726c9caf2
fix(swc): Fix bugs ( #1745 )
...
swc_ecma_codegen:
- Don't escape unicode characters for old targets. (#1744 )
swc_ecma_transforms_compat:
- `class_properties`: Preserve `this` for tagged template literals. (#1742 )
2021-05-26 01:24:58 +09:00
강동윤
a795de7f43
fix(swc): Fix bugs ( #1732 )
...
swc_ecma_transforms_react:
- Escape some characters. (#1661 )
swc_ecma_transforms_compat:
- `regenerator`: Handle `||` properly. (#1684 )
2021-05-24 09:41:22 +00:00
강동윤
a518c83485
fix(es): Fix bugs ( #1728 )
...
swc_ecma_transforms_compat:
- `block_scoping`: Ensure that #1462 is fixed. (#1462 )
- `regenerator`: Inject variables at proper level. (#1718 )
swc_ecam_transforms_typescript:
- `strip`: Handle class expressions in arrow expressions correctly. (#1729 )
2021-05-22 12:14:00 +09:00
강동윤
a1341dcdc6
fix(es/transforms/compat): Fix async_to_generator
pass. ( #1724 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Fix async iife. (#1722 )
- `async_to_generator`: Don't apply iife optimization to named function expressions.
- `async_to_generator`: Remove duplicated works.
- `async_to_generator`: Support `await for`. (#1721 )
- `async_to_generator`: Support async generators.
2021-05-21 13:13:22 +09:00
강동윤
57d1aaf80f
fix(es): Fix various bugs ( #1707 )
...
swc_ecma_codegen:
- Fix codegen of `\r\n` in template literals when targeting `es2020`. (denoland/deno#10282)
swc_ecma_parser:
- Support non-identifier getters in typescript. (#1708 )
swc_ecma_transforms_typescript:
- Skip `export {}` if it was not a module. (#1706 )
- Skip `export {}` if the result is module without it. (#1706 )
2021-05-17 22:27:59 +09:00
강동윤
b044d2c6dd
fix(es/transforms/compat): Support private methods ( #1700 )
...
swc_ecma_transforms_base:
- Add some helpers.
swc_ecma_transforms_compat:
- `class_properties`: Support private methods. (Closes #1694 )
2021-05-15 20:35:24 +09:00
강동윤
b4aa1d48e3
fix(es/transform): Fix bugs ( #1699 )
...
swc_ecma_transforms_base:
- Fix bug of `ts_resolver`.
swc_ecma_transforms_typescript:
- `strip`: Emit `export {}` for type-only modules. (#1698 )
- `strip`: Support scripts.
2021-05-15 16:07:24 +09:00
강동윤
2b918b0c3d
fix(es/transforms/compat): Don't create unnecessary IIFE. ( #1669 )
...
swc_ecma_transforms_compat:
- `class_properties`: Do not create iife if possible. (#1660 )
2021-05-10 16:18:31 +09:00
강동윤
b0b0709e1a
fix(es): Fix various bugs. ( #1664 )
...
swc_ecma_codegen:
- Emit comments of `BytePos(0)`. (#1657 )
swc_ecma_transforms_compat:
- `classes`: Optimize class expresssions. (#1660 )
2021-05-09 14:23:03 +09:00
강동윤
c3bf517dc9
fix(es/transforms/compat): Fix span for comments in classes transform. ( #1658 )
...
swc_ecma_transforms_compat:
- classes: Fix span for `PURE` comments. (#1657 )
2021-05-09 02:26:45 +09:00
Niklas Mischkulnig
f4d0e46cbb
feat(es/transforms/compat): Add pure comment to classes ( #1646 )
...
swc_ecma_transforms_compat:
- Add pure annotations while tranpiling classes.
2021-05-08 15:47:20 +09:00
강동윤
1b1c46b492
fix(es/transforms/compat): Allow keywords in method names. ( #1651 )
...
swc_ecma_transforsm_compat:
- Allow using a keyword as a method name.
2021-05-07 11:27:25 +00:00
강동윤
28bb61fb8d
fix(swc): Fix bugs ( #1624 )
...
spack:
- Add ability to exclude module from the bundle. (#1385 )
swc_ecma_ast:
- Make `Param.decorators` optional. (#1603 ).
swc_ecma_transforms_compat:
- Fix super calls in seq exprs in a class. (#1617 )
swc_ecma_transforms_module:
- `common_js`: Fix dynamic imports. (#1614 )
swc_ecma_transforms_typescript:
- Fix common js imports. (#1593 )
2021-04-30 06:25:24 +00:00
강동윤
5a0bacb5b8
fix(swc): Fix various bugs ( #1613 )
...
swc_ecma_codegen:
- Fix codegen of `\x00`. (#1619 )
swc_ecma_preset_env:
- Fix order of core-js imports. (#1605 )
swc_ecma_transforms_react:
- Preserve ` `. (#1446 )
swc:
- Upgrade dashmap. (#1616 )
2021-04-28 14:49:21 +09:00
강동윤
dbec753ca1
fix(swc): Fix bugs ( #1591 )
...
swc_ecma_parser:
- Support optional async class methods. (#1454 )
swc_ecma_transforms_compat:
- Hoist import statements. (#1457 )
2021-04-21 09:26:07 +09:00
강동윤
c765c7e06e
fix: Fix bugs ( #1590 )
...
swc_ecma_transforms_proposal:
- Detect decorators in typescript parameter properties. (#1456 )
swc:
- Add tests for #1362 . (#1362 )
2021-04-19 10:16:10 +00:00
강동윤
4db24fb7f6
fix(swc): Fix various bugs ( #1588 )
...
swc_ecma_transforms_module:
- Change the order of functions exported as default. (#1568 )
- Handle mixed imports correctly. (#1525 )
swc:
- Ensure that #1581 is fixed. (#1581 )
2021-04-18 20:58:30 +00:00
Devon Govett
d7ea5ae00c
fix(es/transforms/compat): Fix syntax context of super classes ( #1586 )
2021-04-18 15:40:06 +00:00
강동윤
46c3d62ebd
fix(swc): Fix bugs ( #1560 )
...
spack:
- Ensure that #1533 is fixed. (#1533 )
swc_ecma_parser:
- Support `async override` in classes. (#1558 )
swc_ecma_transforms_compat:
- `async_to_generator`: Preserve this in async object methods. (#1575 )
- `nullish_coaelscing`: Fix assignments. (#1570 )
- `export_namespace_from`: Preserve order of statements. (#1457 )
swc:
- Disable aes. (#1583 )
2021-04-17 06:00:14 +00:00
grimly
60ad0df3f5
@swc/helpers exports typeOf instead of typeof ( #1578 )
...
swc_ecma_transforms_base:
- Fix helper names.
2021-04-16 13:48:37 +09:00
Austaras
df2a926e9d
fix(es/transforms/module): Use correct this ( #1561 )
...
swc_ecma_transforms_module:
- Preserve semantics of `this` in imported functions. (#1556 )
2021-04-14 00:18:24 +09:00
Devon Govett
92bbde3b53
fix(es/transforms/base): Fix nested function scopes ( #1559 )
...
swc_ecma_transforms_base:
- `resolver`: Handle nested function scopes correctly.
2021-04-13 16:23:04 +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
강동윤
5ef3c43522
fix(es): Fix bugs. ( #1565 )
...
swc_ecma_parser:
- Don't panic for `try` statements without handler and finalizer. (denoland/deno#10112)
swc_ecma_transforms_base:
- Fix `typeof`s used with `externalHelpers: true`. (#1458 , #1557 )
2021-04-10 20:55:17 +00:00
강동윤
2211a9908a
fix(swc): Fix various bugs ( #1550 )
...
swc:
- Improve error message for invalid configs. (#1532 )
swc_common:
- Handle input source map correctly. (#1404 )
swc_ecma_parser:
- Fix parsing of generics type declarations when tsx is enabled. (#1526 )
swc_ecma_transforms_compat:
- Allow using carriage return. (#1549 )
2021-04-08 12:55:02 +00:00
강동윤
62d0cbcabb
fix(es): Fix sourcemap ( #1548 )
...
swc_ecma_codegen:
- Consider indentions while calculating starting point of source map entries. (denoland/deno#10014 )
2021-04-06 11:26:51 +00:00
강동윤
252804d2e3
fix(swc): Fix bugs ( #1529 )
...
swc_ecma_parser:
- Fix comment positions. (#1530 )
swc_ecam_transforms_compat:
- Handle default in destructuring binding patterns. (#1477 , #1449 )
- `async_to_generator`: Handle `this` correctly for async function in key-value properties. (#1455 )
swc_ecam_transforms_typescript:
- Handle import defaults. (#1448 )
2021-04-02 18:47:05 +09:00
강동윤
5ce4e1e927
fix(es/parser): Use correct position for comments ( #1527 )
...
swc_ecma_parser:
- Use correct position for comments in
```ts
function Bar() {
const [foo, setFoo] = useState(0);
React.useEffect(() => {
// @refresh reset
});
return <h1>{foo}</h1>;
}
```
2021-03-31 19:30:05 +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
강동윤
99f4f0f280
fix(swc): Fix bugs for v1.2.52 ( #1506 )
...
swc_ecma_parser:
- Support `private declare`. (#1503 )
- Recover `backtracking` state while doing some nested backtracking. (#1505 )
- Allow using `readonly` as the name of class properties. (#1514 )
swc_ecma_transforms_base:
- `hygiene`: Keep the name of class expressions. (#1507 )
swc_ecma_transforms_typescript:
- Allow a namespace and a class to have the same name. (#1515 )
swc:
- Disable `tsx` if the ext of a file is ts.
2021-03-29 20:48:48 +09:00
강동윤
232cfc5f4f
fix(es/transforms/react): Handle jsx entities in attributes correctly ( #1501 )
...
swc_ecma_transforms_react:
- Fix jsx entities in attribute values. (#1479 )
2021-03-27 21:06:47 +09:00
강동윤
b7eb1f9154
fix(es/transforms/base): Fix fixer ( #1496 )
...
swc_ecma_transforms_base:
- Fix `('a' ?? 'b') || c`.
2021-03-27 00:45:51 +09:00
Nayeem Rahman
fa3d65cd58
fix(strip): Transform static class fields to assignments ( #1487 )
...
swc_ecam_transforms_compat:
- Deprecate `typescript_class_properties`.
swc_ecma_tranforms_typescript:
- Merge `typescript_class_properties` into `strip`.
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-26 13:48:55 +09:00
강동윤
dcdac2db6f
fix(swc): Fix bugs ( #1453 )
...
swc_ecma_transforms_typescript:
- Add option to use define propert for `strip` pass. (#1472 )
node-swc:
- Fix `keepClassNames`. (Brooooooklyn/swc-node#335 )
2021-03-17 15:24:35 +09:00
강동윤
97269a37b9
fix(swc): Fix bugs for v1.2.50 ( #1444 )
...
swc:
- Respect `react` config.
swc_ecma_transforms_compat:
- `export-namespace-from`: Preserve `use strict`. (#1423 )
swc_ecma_transforms_module:
- Inject `use strict` before imports. (#1423 )
swc_ecma_transforms_proposal:
- Emit metadata for literal types. (#1421 )
2021-03-03 20:39:02 +09:00
강동윤
a3105428ba
fix(swc): Fix various bugs ( #1440 )
...
swc:
- Use `hygiene_with_config` instead. (#1279 )
- Allow enabling source map with `.swcrc`. (#1309 )
swc_ecma_transforms_base:
- `hygiene`: Add an option to preserve class names. (#1279 )
swc_ecma_transforms_compat:
- `block_scoping`: Allow using `break` in switch cases. (#1415 )
2021-03-01 17:19:37 +09:00