Commit Graph

1082 Commits

Author SHA1 Message Date
강동윤
6f006208ac
bundler: Fix bugs (#1154)
swc_bundler:
 - Fix importing from transitive dependencies with aliases.
 - Fix stack overflow while computing plan for modules with cyclic dependencies.
 - Handle `export *` for function / class properly. (#1155)
2020-10-10 18:32:31 +09:00
강동윤
f0ea70cb25
bundler: Allow importing and exporting from same module (#1152)
swc_bundler:
 - Allow importing and exporting from same module. (#1150)
2020-10-09 19:10:25 +09:00
강동윤
75a6211e2d
Fix hygiene and bundler (#1144)
swc_bundler:
 - Change order of execution of modules with circular imports. (#1139)

swc_ecma_transforms:
 - hygiene: Fix handling of default in object patterns. (#1138)
2020-10-07 14:55:02 +09:00
강동윤
0586c733e3
Fix bugs (#1143)
swc_ecma_transforms:
 - fixer: Fix conditional expression in await expressions. (#1133)
 - optional_chaining: Fix call expression. (#1136)
 - hygiene: Fix codegen of computed keys. (#1140)
2020-10-06 23:27:23 +09:00
강동윤
e4ddfcc899
export * as ns is part of ES2020 (#1142)
swc_bundler:
 - Add direct support for `export * as ns from 'foo';`. (#1137)

swc_ecma_transforms:
 - Split `export` pass to `export_namespace_from` and `export_default_from`.

swc:
 - Enable `export * as ns` for targets lower than es2020.
2020-10-06 20:48:29 +09:00
강동윤
c127cb2b48
bundler: fix bugs (#1141)
swc_bundler:
 - Handle aliased imports of reexports correctly. (#1138)
 - Fix import deglobber. (#1139)
2020-10-06 13:39:25 +09:00
강동윤
aa9555865b
Fix bugs (#1132)
swc_ecma_transforms:
 - Handle typescript class properties correctly. (#1122)
 - Handle optional chaining properly. (#1130)
 - Inject variables for nullisn coalescing in correct scope. (#1123)
2020-10-04 21:59:19 +09:00
강동윤
81490dec7b
Fix unexporter (#1128)
swc_bundler:
 - Make DepUnexporter unexport export declarations.
2020-10-04 16:00:56 +09:00
강동윤
205ce4ebe2
bundler: fix extra bugs (#1127)
swc_bundler:
 - Prevent invalid output like `export * as helpers`
 - Prevent stack overflow which occurs while bundling `https://deno.land/x/oak@v6.2.0/mod.ts`

swc_ecma_transforms:
 - Migrate inlining pass to VisitMut
2020-10-04 00:19:35 +09:00
Nayeem Rahman
e4b8a0cc1e
fix(strip): Don't treat type-only exports as concrete references (#1126)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-10-03 17:43:09 +09:00
Juho Vepsäläinen
ea091337d8
fix(jsx): Drop extra spaces around jsx attributes (#1121)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-10-02 17:06:02 +09:00
강동윤
9879fa59c8
bundler: fix bugs (#1105)
swc_bundler:
 - Correct lca for circular dependencies.
 - Handle namespaced imports. (#1109)
 - Handle namespaced reexports. (#1110)
 - Handle shorthand properly. (#1111)
 - Implement `import.meta` (#1115)
 - Handle reexport mixed with imports correctly. (#1116)
 - Handle export default decls in computed-key modules. 
 - Remove all export * from. output. (#1118)
 - Handle export of class or function declaration in a computed module properly. (#1119)


swc_ecma_transforms:
 - Do not rename class members. (#1117)
2020-10-02 11:07:40 +09:00
강동윤
1f00d9ba26
Fix jest extension (#1106) 2020-09-24 19:49:12 +09:00
강동윤
ab8df21797
Fix optional chaining in argument position (#1104) 2020-09-24 15:14:30 +09:00
Nayeem Rahman
a9c3072b65
fix(strip): Fix Config::import_not_used_as_values (#1101)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-09-23 22:52:47 +09:00
강동윤
73671ecd90
chores: Bump version of wasm (#1102) 2020-09-23 21:44:51 +09:00
강동윤
688d16f228
Import assertion / json modules (#1100)
swc_atoms:
 - Add "assert".

swc_ecma_ast
 - Add a field to an import declaration.

swc_ecma_parser:
 - Parse assertions in import statements.
 - Parse assertions in top-level dynamic imports.
 - Parse assertions in non-top-level dynamic imports.

swc_ecma_transforms:
 - Fix compilation.
2020-09-23 14:27:27 +09:00
강동윤
7e8ff1d342
codegen: Fix for jsx (#1097) 2020-09-22 19:56:59 +09:00
강동윤
5cf137154f Bump version 2020-09-22 16:40:02 +09:00
강동윤
6c6f1aaaa3
Fixs bugs (#1095)
spack:
 - fix resolver. (#1076)

swc_common:
 - preserve original sourcemap. (#1091)

swc_ecma_transforms:
 - optional chaining: `a?.b.c.d.e`. (#1092)
 - fixer: preserve parenthesis in `(a || b)()`. (#1093)
 - compat::es2015: Change order of passes (#1036)
2020-09-22 16:39:00 +09:00
강동윤
4490e2551d
swc.rs (#1085)
Changes url from https://swc-project.github.io to https://swc.rs
2020-09-21 22:53:48 +09:00
강동윤
ac0a19c0e8
resolver: Handle pattern in lhs of for of/in correctly (#1089) 2020-09-21 12:04:46 +09:00
LongYinan
2e09616139
Reduce npm package size (#1087) 2020-09-21 11:35:19 +09:00
강동윤
7905b0dcf5
wasm: Automatic deployment (#1084)
wasm:
 - Add auto deployment.
2020-09-19 02:07:28 +09:00
강동윤
fa756a1b48
bundler: Handle export * properly (#1083) 2020-09-18 18:30:02 +09:00
강동윤
b0049c0fa6 Bump version 2020-09-18 16:10:16 +09:00
강동윤
7ffb4c0bf9
Extension for jest (#1081) 2020-09-18 14:29:50 +09:00
강동윤
cfca078aa7
Update docs (#1082) 2020-09-18 14:04:48 +09:00
강동윤
24c597f097
bundler: fix for deno (#1078)
swc_bundler:
 - Run fixer before returning bundles.
 - Fix planning of circular imports.
 - Support circular imports of root entries.
 - Remark properly while merging complex imports mixed with exports.
2020-09-17 21:05:47 +09:00
강동윤
1af1840d01
Fix swc_bundler (#1075)
swc_bundler:
 - Skip least_common_ancestor for roots.
 - Correct planning for circular imports mixed with normal imports.
 - Correct merging of circular imports mixed with normal imports.
2020-09-16 18:28:10 +09:00
강동윤
ff0db8f122
Typo 2020-09-15 14:28:53 +09:00
강동윤
bc82b5567e
typescript_strip: option to remove completely unused imports (#1060) 2020-09-15 14:25:13 +09:00
LongYinan
4795b65b10
Fix musl config (#1074) 2020-09-14 00:25:22 +09:00
강동윤
26595d97a5 Real fix 2020-09-13 21:12:53 +09:00
강동윤
d75b4004c1 Fix dep issue 2020-09-13 21:04:40 +09:00
강동윤
ddc340a352 Fix 2020-09-13 20:51:28 +09:00
강동윤
ab4eb20d48 v1.2.28 2020-09-13 20:41:28 +09:00
강동윤
2b12594cf2
Add musl support (#1072) 2020-09-13 18:27:26 +09:00
강동윤
4d5a0dacec
resolver: Correctly set in_type (#1071) 2020-09-12 23:56:10 +09:00
강동윤
31d4a0ee73 Bump swc_ecmascript 2020-09-12 22:00:06 +09:00
강동윤
8a0172912e
cjs: Fix import order (#1069) 2020-09-12 21:52:37 +09:00
강동윤
f029115914
resolver: No additional scope for function child (#1070) 2020-09-12 19:23:06 +09:00
강동윤
0972db98a1
parser: Parse member expression is object patterns (#1068) 2020-09-12 18:39:25 +09:00
강동윤
5c76aea82b
Fix resolver (#1064)
swc_ecma_transforms:
 - resolver: properly handle let and const
 - resolver: handle catch parameters
 - resolver: handle parameter properties

swc_ecma_visit:
 - reduced compile time of debug build
2020-09-11 23:33:36 +09:00
강동윤
1dd06d525d Ignore /*.node 2020-09-11 16:07:48 +09:00
강동윤
9bf0be1309 Bump version 2020-09-11 15:10:35 +09:00
강동윤
2fff66d985
codegen: Don't emit newline after a block comment (#1062) 2020-09-11 15:09:35 +09:00
강동윤
09e3f96a3e
jsdoc: Fix parser (#1059) 2020-09-11 12:52:57 +09:00
강동윤
dc4c92c9da
common_js: Change order of exports (#1057)
swc_ecma_transforms:
 - Update order of imports and exports (#1043)
2020-09-11 10:21:07 +09:00
강동윤
aec155b58f
resolver: Fix handling of constructor parameters (#1056) 2020-09-10 22:56:35 +09:00