Commit Graph

35 Commits

Author SHA1 Message Date
Donny/강동윤
ecf0d7507c
feat(swc): Allow removing filename from error output ()
swc:
 - Add an option to exclude filename from error messages.
2021-10-21 04:45:12 +00:00
Donny/강동윤
2ca6e5d79b
feat(es/transforms/optimization): Support inlining of typeofs ()
swc_ecma_transforms_optimization:
 - `inline_globals`: Support inlining of `typeof`s.

swc:
 - Change error message for parsing failure to mention `Syntax Error`.
2021-10-19 09:49:18 +00:00
Donny/강동윤
ee880d63ae
fix(swc): Change default value of inlineSourcesContent ()
swc:
 - Make `inlineSourcesContent` `true` by default. ()
2021-10-19 06:37:58 +00:00
Donny/강동윤
9ba68c6863
fix(common): Fix sourcemap ()
swc_common:
 - Include the index to the name in `mappings` of a sourcemap.

swc:
 - Fix handling of `inputSourceMap`.
2021-10-18 06:43:59 +00:00
Donny/강동윤
98cc79a2be
fix(es/minifer): Fix bugs ()
swc_ecma_codegen:
 - Fix sourcemap of `export` tokens.
 - Fix codegen of numeric operands in left of a binary expression.
 - Fix codegen of unary operations.

swc_ecma_minifier:
 - Visit `AssignPatProp.valie`.
 - Move `inline_prevented` to analyzer.
 - Add `Ctx.dont_invoke_iife`.
 - `iife`: Check for `arugments`

swc:
 - `inline_sources_content`: true by default for `minify()`.
2021-10-11 07:44:42 +00:00
Donny/강동윤
1b2e6706bd
fix(swc): Fix simple bugs ()
swc:
 - Ensure that  is not the case. ()

node_swc:
 - Verify `sourceMaps: true` in `.swcrc`. (, )
2021-09-23 08:10:12 +00:00
강동윤
48d61039d2
fix(common, node/swc): Allow inlining sourcesContent ()
swc_common:
 - Allow setting `sourceContents` of source map files. ()

swc:
 - Support `inlineSourceContents`. ()
2021-09-14 02:31:32 +00:00
Iron Lu
4ca85ec79c
feat(node/swc): Enable tsx automatically based on the extension () 2021-09-14 10:47:53 +09:00
강동윤
9eafd0c6c4
fix(es/loader): Fix support for jsc.paths. ()
swc_ecma_loader:
 - `TsConfigResolver`: Use `baseUrl`. ()

swc:
 - Change type of `JscConfig.base_url` to `PathBuf`.

testing:
 - Improve `NormalizedOutput::compare_to_file`.
2021-09-10 12:29:26 +00:00
강동윤
cb2b0c671f
fix(es/transforms/base): Optimize hygiene ()
swc_ecma_transforms_base:
 - `hygiene`: Don't rename if not required. ()

swc_ecma_minifier:
 - Remove `hygiene_optimizer`.
2021-09-01 13:11:55 +00:00
강동윤
d975a197c9
fix(es): Fix source map ()
swc:
 - Fill `names` of sourcemap.
 - Don't add `sourceContents` to sourcemap if `sources` is added.

node_swc:
 - Handle source map for `minify` correctly.
 - `minify`: Accept `{ filename: code }`.
2021-08-26 10:44:38 +00:00
강동윤
883c1ac4e4
fix(bundler): Prepare renaming of bundler ()
- Rename `spack` crate to `swc_node_bundler`. ()
2021-08-13 10:03:04 +00:00
강동윤
9793926cc8
fix(es/minifier): Fix bugs and implement more rules ()
swc_ecma_minifier:
 - Fix an infinite loop. ()
 - Don't remove span hygiene. ()

swc_ecma_codegen:
 - Fix codegen of `return` with `async` arrow. ()

swc:
 - Respect `minify = false`. ()
2021-08-08 14:19:04 +00:00
OJ Kwon
abb1451061
fix(node/swc): Allow specifying filename when parsing () 2021-08-08 20:14:45 +09:00
강동윤
f44e25c3af
fix(es/minifier): Improve output of minifier ()
swc_common:
 - Add `Span.has_mark`.

swc_ecma_codegen:
 - Emit `1e3` for `1000`.
 - Optimize output. ()

swc_ecma_minifier:
 - name mangler: Don't use keywords as an id.
 - `properties`: Optimize member expression with string properties.
 - `inline`: Inline some function expressions even if it's not fn-local.
 - `analyzer`: Track reassignment correctly.
 - `analyzer`: Track fn-local correctly.
 - `sequences`: Inject `void` if required.
 - `inline`: Inline function declarations correctly.
 - `sequences`: Merge expressions into test of if statements.
 - `sequences`: Reduce calls to an assigned variable.
 - Use `Marks` instead of `&dyn Comments`.


swc_ecma_transforms_optimization:
 - `expr_simplifier`: Fix infinite loops.

node/swc:
 - Ensure that `.transform` performs minification. ()
2021-08-04 00:52:47 +09:00
강동윤
d1c481790c
feat(swc): Expose minifier api ()
swc_ecma_codegen:
 - Fix codegen of imports when minification is enabled.

swc_ecma_minifier:
 - Mangle identifiers used by imports.

swc:
 - Support specifing `jsc.minify`. (, )

swc/node:
 - Add `.minify()`.
 - Add `.minifySync()`.

swc/wasm:
 - Add `.minifySync()`.
2021-07-31 06:30:06 +00:00
강동윤
ff47e2539e
fix(swc): Fix bugs ()
swc_common:
 - Fix handling of input source map. ()

swc:
 - Respect `paths`. ()

node:
 - Fix typings of `paths`.
2021-07-17 11:16:00 +00:00
강동윤
211e208219
fix(node-swc): Fix visitor ()
node/binding:
 - Fix visitor methods for array elements. (, )
 - Fix for const assertion. ()
 - Verify object properties. ()
2021-07-04 12:35:25 +00:00
강동윤
4db24fb7f6
fix(swc): Fix various bugs ()
swc_ecma_transforms_module:
 - Change the order of functions exported as default. ()
 - Handle mixed imports correctly. ()

swc:
 - Ensure that  is fixed. ()
2021-04-18 20:58:30 +00:00
Devon Govett
d7ea5ae00c
fix(es/transforms/compat): Fix syntax context of super classes () 2021-04-18 15:40:06 +00:00
강동윤
2211a9908a
fix(swc): Fix various bugs ()
swc:
 - Improve error message for invalid configs. ()

swc_common:
 - Handle input source map correctly. ()

swc_ecma_parser:
 - Fix parsing of generics type declarations when tsx is enabled. ()

swc_ecma_transforms_compat:
 - Allow using carriage return. ()
2021-04-08 12:55:02 +00:00
Arend van Beelen jr
228429c7bb
fix(node-swc): Fix handling of tagged template expressions in Visitor () 2021-04-06 15:22:05 +09:00
강동윤
dcdac2db6f
fix(swc): Fix bugs ()
swc_ecma_transforms_typescript:
  - Add option to use define propert for `strip` pass. ()

node-swc:
  - Fix `keepClassNames`. ()
2021-03-17 15:24:35 +09:00
강동윤
af25a88902
fix(swc): Fix bugs for v1.2.47 ()
swc_ecma_parser:
 - Fix generic parsing issue in jsx context. ()

swc_ecma_transforms_module:
 - Allow importing a module multiple time. ()
 - Handle imports in the constructor of an exported class decl. ()

swc:
 - Respect `sourceMappingURL`. ()
 - Resolve `sourceMappingURL` relative from file. ()
 - Respect `isModule: false` ()

spack:
 - Support loading json files. ()
2021-01-29 22:19:04 +09:00
강동윤
5b2532e7e3 Remove some spack tests 2020-11-21 20:58:50 +09:00
강동윤
1f00d9ba26
Fix jest extension () 2020-09-24 19:49:12 +09:00
강동윤
7ffb4c0bf9
Extension for jest () 2020-09-18 14:29:50 +09:00
강동윤
8e237288d7
Migrate to napi () 2020-08-30 15:29:42 +09:00
강동윤
2fedf32747
swc_bundler ()
swc_bundler:
 - Splitted from spack

swc_ecma_parser:
 - Fix unexpected eof problem which occurs if log level is trace

swc_ecma_transforms:
 - Fix bugs of dce pass

spack:
 - Support cyclic dependencies
2020-08-12 22:18:47 +09:00
강동윤
ca43112d2a
codegen: Preserve quotes () 2020-07-28 21:56:19 +09:00
강동윤
ff440157a0
Fix regenerator ()
swc_ecma_transforms:
 - Fix regenerator scoping issue.
2020-06-18 17:04:49 +09:00
강동윤
31020e46d8
spack: enhancement ()
- Handle modules (via swcrc)
 - swc.bundle([conf1, conf2])
 - Correct chunking
2020-06-15 23:28:15 +09:00
강동윤
fcef201695
spack: super-fast bundler ()
Version is alpha as it's not complete
2020-06-13 23:09:45 +09:00
강동윤
28456d0b49
Default value for options.jsc.parser.syntax () 2020-06-13 02:05:49 +09:00
강동윤
3a372ad29a
Move node-swc into the repository ()
The commit will help

 - Better testing
 - Preventing regression like .
 - **Implementing spack** (It requires access to neon api because of the plugin system)
2020-05-22 20:36:39 +09:00