Commit Graph

1398 Commits

Author SHA1 Message Date
강동윤
85a216ef56
feat(es/parser): Allow stripping out typescript parser (#1962)
swc_ecma_parser:
 - Add a cargo feature to remove typescript parser.
2021-07-25 09:37:59 +00:00
Makuza Mugabo Verite
cd4a564eea
chore: Fix typo (#1958) 2021-07-24 13:37:47 +09:00
강동윤
204a71ca94
fix(es/transforms): Fix bugs (#1950)
swc_ecma_trasnsforms_base:
 - `fixer`: Don't de-optimize `++foo || bar`.

swc_ecma_trasnsforms_typescript:
 - Allow using properties from a decorated class. (#1869)

swc_ecma_transforms_optimization:
 - Fix infinite loop. (#1901, #1946)
2021-07-22 07:33:00 +00:00
강동윤
ebdd04d7c7
fix(es/transforms/typescript): Fix typescript stripper (#1945)
swc_ecma_transforms_typescript:
 - Fix usage detection logic. (denoland/deno#10684)
2021-07-21 14:24:57 +00:00
강동윤
21848ce2ea
fix(es/transforms): Fix passes related to optimizations (#1942)
swc_ecma_transofrms_base:
 - `fixer`: Handle `in`.
 - `fixer`: Handle `in` in the head of for statements.
 - `fixer`: Optimize `- (1 / 0)`.
 - `fixer`: Optimize `void 0 === a`.
 - `fixer`: Optimize `a-- && b = c`.
 - `fixer`: Don't de-optimize if statements.
 - `fixer`: Fix handling of if statements.

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Preserve `var`s in dropped switch cases.
2021-07-20 11:07:36 +00:00
OJ Kwon
de24ff275d
fix(es/transforms/module): Allow namespace import with default import (#1940)
swc_ecma_transforms_module:
 - Allow using a namespace import specifier with a default import specifier. (#1938)
2021-07-20 18:00:27 +09:00
LongYinan
d6454add72
fix(node/swc): Fix for m1 mac (#1939) 2021-07-20 14:54:02 +09:00
강동윤
39ee7b962d
fix(es/codegen): Fix codegen of template literals (#1936)
swc_ecma_codegen:
 - Fix codegen of template literals. (Closes #1791)
2021-07-20 14:11:33 +09:00
plylrnsdy
d5cdf444e8
fix(node/swc): Fix field name (#1923)
node/swc:
 - Rename `member` of `TsEnumDeclaration` to `members`.
2021-07-18 19:40:01 +09:00
강동윤
7f968472fb chore: Publish v1.2.65 2021-07-18 19:29:08 +09:00
강동윤
ff47e2539e
fix(swc): Fix bugs (#1932)
swc_common:
 - Fix handling of input source map. (#1930)

swc:
 - Respect `paths`. (#1858)

node:
 - Fix typings of `paths`.
2021-07-17 11:16:00 +00:00
Iron Lu
4a9b31df3e
fix(swc): Fix order of passes (#1931)
swc:
 - Run `import_analyzer` after  `regenerator`.
2021-07-17 13:12:30 +09:00
강동윤
a26a18989f
fix(es/transforms): Allow using rest pattern in arrow functions. (#1926)
swc_ecma_transforms_compat:
 - `parameters`: Allow using rest pattern within arrow functions.
2021-07-16 07:05:00 +00:00
강동윤
7a8ad8826a
fix(es/transforms): Fix fixer (#1919)
swc_ecma_transforms_base:
 - `fixer`: Allow using await expressions as a callee of a new expression.
2021-07-14 22:43:17 +09:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency (#1908) 2021-07-14 00:59:13 +09:00
Iron Lu
d13eff99d8
fix(es/transforms/proposal): Fix order of constructor statements (#1914)
swc_ecma_transforms_proposal:
 - `decorators`: Fix order. (#1913)
2021-07-13 22:32:45 +09:00
David Sherret
4e42c66663
chore(ci): Switch installation method of deno (#1915) 2021-07-13 21:41:40 +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
강동윤
8694b11959
chore: Update README.md (#1910) 2021-07-09 20:01:23 +09:00
OJ Kwon
480287aec4
fix(es/transforms/compat): Fix regenerator (#1906)
swc_ecma_transforms_compat:
 - `regenerator`: Handle labeled continue jumps. (#1892)
2021-07-09 14:13:16 +09: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
강동윤
fe7f7b691b
fix(es/transforms/base): Fix ts_resolver (#1903)
swc_ecma_transforms_base:
 - `ts_resolver`: Handle class declarations properly.
2021-07-07 15:45:45 +00:00
David Sherret
ed274b02f2
fix(es/parser): Fix parsing of file with onlly shebang (#1896) 2021-07-07 17:41:58 +09:00
OJ Kwon
6037332cb4
fix(es/transforms/compat): Handle nested optional chaining expression (#1899)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-07-07 17:41:03 +09:00
강동윤
04d4384482
fix(ci): Use cross-env (#1897) 2021-07-06 14:29:45 +09:00
강동윤
44b6400385
chore: Publish v1.2.63 (#1895) 2021-07-05 23:49:24 +09:00
강동윤
35af4c5186
chore: Publish v1.2.63 & Update rustc (#1894) 2021-07-05 12:51:09 +00:00
강동윤
211e208219
fix(node-swc): Fix visitor (#1890)
node/binding:
 - Fix visitor methods for array elements. (#1819, #1888)
 - Fix for const assertion. (#1625)
 - Verify object properties. (#906)
2021-07-04 12:35:25 +00:00
Austaras
76341068d0
fix(es/ast): Fix handling of reserved words (#1891) 2021-07-04 19:44:33 +09:00
Simon Rask
14cee03a43
fix(es/parser): Allow using '>' and '<' in template literal types (#1885)
swc_ecma_parser:
 - Allow using `<` and `>` in template literal types. (#1862)
2021-07-03 20:44:06 +09:00
David Sherret
534c0b19c8
fix(es/parser): Make comments in empty file be in leading comments (#1879) 2021-07-03 12:19:30 +09:00
강동윤
ab161793a1
fix(es/transforms/optimization): Migrate to VisitMut (#1880)
swc_ecma_transforms_optimization:
 - Migrate `expr_simplifier` to `VisitMut`.
 - Migrate `dead_branch_remover` to `VisitMut`.
2021-07-02 12:20:24 +09:00
Austaras
1a01d0f2c5
fix(es/transform/react): Handle TypeScript declare module (#1875)
swc_ecma_transforms_module:
 - Handle typescirpt declare module. (#1865)
2021-07-02 10:07:34 +09:00
강동윤
c4e013441b
chore(wasm): Fix license (#1874)
wasm:
 - Use spdx-compatible license. (#1798)
2021-07-01 13:48:25 +00:00
강동윤
ea93e1d1be
fix(bundler): Prevent infinite loop (#1872)
swc_bundler:
 - Fix cycle detection. (#1756)
 - Add fallback logic for topoligcal sorting.
2021-07-01 12:56:08 +00:00
강동윤
33a43f85b1
feat(es/minifier): Implement more rules (#1766)
swc_ecma_minifier:
 - Implement more rules.

swc_ecma_transforms_base:
 - `resolver`: Fix syntax context of catch block.

swc_ecma_transforms_optimization:
 - `expr_simplifier`: Fix a bug related to `this` of call expressions.
 - `dead_branch_remover`: Don't reduce switch cases if test is now known.
 - `dead_branch_remover`: Don't break `&&`.
2021-06-29 16:11:22 +09:00
Iron Lu
f8a3df8cc3
fix(es/transforms/module): Fix for duplicate export (#1846) 2021-06-29 15:12:18 +09:00
강동윤
c49e9b0b8d
feat(babel/compat): Implement reverse operation of babelify (#1655)
swc_babel_compat:
 - Move `babelify` to a submodule.
 - Add `swcify`.
2021-06-27 15:30:40 +00:00
강동윤
eaaf32d806
feat(es/loader): Add more logics to tsconfig.paths handler (#1860) 2021-06-27 07:19:05 +00:00
Vladimir Guguiev
7488950f90
fix(es/parser): Fix span of ExportDefaultDeclaration (#1818) 2021-06-27 11:02:45 +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
Moti Zilberman
5345c90989
fix(es/transforms/base): Fix fixer for the call in callee position (#1857) 2021-06-26 13:12:26 +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
강동윤
737ce63b78
chore(es/ast): Bump version (#1853) 2021-06-25 08:19:15 +00:00
Maxime Guerreiro
c5f1c6b8ba
chore(es/ast): Upgrade arbitrary crate to v1 (#1844)
swc_ecma_ast:
 - Upgrade arbitrary crate.
2021-06-25 14:40:51 +09:00
강동윤
ff440d47a4
chore: Organize project (#1849) 2021-06-24 17:01:21 +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
Andrew Bradley
a31ca40dbb
fix(es/transforms/module): Share usage data between passes (#1829)
swc_ecma_transforms_module:
 - Share scope data between import analyzer and module passes.
2021-06-24 13:37:30 +09:00