Commit Graph

241 Commits

Author SHA1 Message Date
Donny/강동윤
c7a06b1a5e
fix(es/codegen): Use Str.raw for es5 (#8873)
**Related issue:**

 - Closes #8871
2024-04-23 10:48:33 +09:00
Donny/강동윤
ca9c76b46f
build(cargo): Update rustc to nightly-2024-04-03 (#8821) 2024-04-16 02:20:47 +00:00
Donny/강동윤
4961bb055d
fix(es/module): Fix jsc.paths with resolveFully (#8784)
**Related issue:**

 - Closes #8782
2024-03-28 02:42:07 +00:00
Donny/강동윤
d37125fb8e
fix(es/module): Fix relativeness check for jsc.paths (#8702)
**Related issue:**

 - Closes #8701
2024-03-06 17:23:38 +09:00
Donny/강동윤
761365eb56
fix(es/module): Allow FileName::Anon from node resolver (#8686)
**Related issue:**
 
 - Closes #8674
2024-03-04 09:36:17 +00:00
Donny/강동윤
4e0d240895
build(plugin): Update wasmer to v4.2.5 (#8624)
**Description:**

This is required to update rustc.
2024-02-10 03:40:55 +00:00
Donny/강동윤
71fb5c12a7
fix(es/module): Fix resolving of dependencies (#8533)
**Description:**

I changed the signature of `Resolve` because there was a need to pass the `value` part from `jsc.paths` to the caller.


**Related issue:**

 - Closes #8184
2024-01-21 21:35:57 +09:00
Donny/강동윤
974c6a0036
test(es/codegen): Add a JS test for ascii-only mode (#8519)
**Description:**

The issue was fixed by #8493, but it was not included in the latest release because of the wrong bump comment.

**Related issue:**

 - Closes #8491
2024-01-19 04:14:11 +00:00
Austaras
e68720a76c
fix(es): Apply paren_remover for minify (#8442)
**Related issue:**

 - Closes #8437
2023-12-23 06:45:21 +00:00
LongYinan
8d47b9ab40
chore(ci): Fix prepublish script by upgrading NAPI-RS cli (#8430) 2023-12-17 11:20:59 +09:00
LongYinan
4b8184ca99
chore(ci): Add linux arm build back (#8406) 2023-12-11 04:45:04 +00:00
강동윤 (Donny)
8ac47a370e chore: Fix publish action 2023-11-21 11:50:27 +09:00
Donny/강동윤
1e9b4e027c
chore(bindings): Add @deprecated to JS plugins (#8132) 2023-10-16 22:09:14 +00:00
Anders Kaseorg
b87ac646f8
fix(es/minifier): Parse a file as a module only if opts.module is true (#7943)
**Description:**

Previously it was impossible to minify non-strict code (e.g. `delete identifier;`) because `minify()` unconditionally parsed the input as a module regardless of the `module` setting.

**BREAKING CHANGE:**

`minify()` now respects the `module` parameter instead of ignoring it, so users who had been processing modules with `minify()` without passing `{ module: true }` will now need to pass it.

**Related issue**

 - Closes #6130.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-09-13 05:55:34 +00:00
Donny/강동윤
85d6e9be07
fix(es/module): Revert #7901 (#7906)
**Description:**

I'm reverting #7901 because it caused a regression in next.js CI.
https://github.com/vercel/next.js/pull/54653


**Related issue:**

 - Reverts #7901.
2023-09-01 14:24:50 +09:00
Donny/강동윤
c714dd20de
fix(es/module): Make jsc.paths fully resolve TypeScript files (#7901)
**Related issue:**

 - Closes #7861
 - Closes #7898
2023-08-31 07:24:12 +00:00
Donny/강동윤
5fbc251db1
fix(es/module): Don't create absolute paths for jsc.paths on Windows (#7892)
**Related issue:**

 - Closes #7806
2023-08-30 10:11:34 +00:00
Donny/강동윤
71d01ec127
feat(es): Add an option to disable builtin transforms (#7873) 2023-08-26 01:12:36 +00:00
Donny/강동윤
11ebae1bdd
fix(es/module): Don't resolve as node_modules from TscResolver (#7866)
**Related issue:**

 - Closes #7863
2023-08-25 22:46:53 +09:00
Donny/강동윤
d33a97303c
fix(es/module): Make jsc.paths work for a nest.js app (#7852) 2023-08-25 15:05:43 +09:00
Donny/강동윤
f713f1b2f6
refactor(es/types): Extract @swc/types as a small, reusable package (#7834)
**Related issue:**

 - Closes #7828
2023-08-18 06:24:49 +00:00
Donny/강동윤
fe1ca26218
fix(es): Resolve jsc.baseUrl for .swcrc specified by --config-file (#7801)
**Related issue:**

 - Closes #7800
2023-08-14 16:33:17 +00:00
Donny/강동윤
5c4bfa61f9
fix(es/module): Use jsc.baseUrl while resolving absolute paths (#7775)
**Related issue:**

 - Closes #7761
2023-08-09 13:58:45 +09:00
magic-akari
40136f7c54
fix(es/module): Do not determine module name for modules without exports in UMD (#7718)
**Related issue:**

 - Closes #6263.
2023-07-28 05:20:16 +00:00
Ayoub Adib
73c77694f1
refactor(bindings/node): Remove unused babelify type (#7625) 2023-07-05 15:52:53 +09:00
David Sherret
064bcf4854
fix(es/codegen): Remove extra spaces in AssignPatProp and KeyValuePatProp (#7488)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2023-06-07 05:08:35 +00:00
magic-akari
caee073935
feat(es/module): Add export_interop_annotation flag (#7330)
**Related issue:**

 - https://github.com/vercel/next.js/issues/48801
2023-04-25 10:04:28 +00:00
voorjaar
761ef8389d
fix(bindings/node): Support TsSatisfiesExpression (#7317) 2023-04-24 12:26:13 +09:00
magic-akari
38dfb91ebc
fix(es/helpers): Remove unnecessary parameters in helper_expr! macro (#7296)
**Description:**

We have moved to snake_case, so the last parameter of helper_expr is unnecessary.
2023-04-20 08:26:34 +00:00
Donny/강동윤
5d3313aa7e
feat(es/modules): Use function instead of arrow function unconditionally (#7273) 2023-04-15 13:57:00 +00:00
Donny/강동윤
695ce060e9
test(es/plugin): Enable E2E test again (#7236) 2023-04-10 07:01:56 +00:00
OJ Kwon
56bdacc72d
feat(plugin/runner): Update wasmer to v3 (#7197)
**Description:**

This PR reattempts https://github.com/swc-project/swc/pull/5456.

Most of the changes are for the breaking changes of wasmer@3, as well as enabling rkyv's strict mode (https://github.com/swc-project/swc/pull/6922). This could not be seperated since wasmer@3 enables strict mode by default without a way to turn it off.

There are a couple of changes worth noting:

- Disabling in-memory module lookup: https://github.com/swc-project/swc/pull/7197/files#diff-3bda5def6ce2b7553c3b3a5ad241c0bdb7021e67b7de1e594df4cd5a54d403b3R154-R159
- Disabling plugin_runner in bindings_wasm: https://github.com/swc-project/swc/pull/7197/files#diff-dc3ded556a1fd709a129acd588e5eda651b842c6acc3f5340d40088a1f927facR310-R312
- Skipping plugin compat test: https://github.com/swc-project/swc/pull/7197/files#diff-531197dfcefba05faca53f0cf442ecc2dc6b59d5ead01979f5ffb912aa36249aR64-R66
2023-04-10 03:40:25 +00:00
magic-akari
a13a78e3fe
feat(es/helpers): Use named export and unify import path (#7182)
**BREAKING CHANGE:**

Breaking changes for `@swc/helpers`. A new major version `0.5.0` is required.


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7157
2023-04-04 03:05:47 +00:00
magic-akari
3ca954b9f9
fix(es/helpers): Use snake_case for helpers (#7147)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7144.
 - Closes https://github.com/swc-project/swc/issues/7118.
2023-03-31 15:15:21 +09:00
Donny/강동윤
a785f18740
test(es/plugin): Enable E2E plugin test (#7178) 2023-03-31 04:01:17 +00:00
Donny/강동윤
0259a7465f
build(cargo): Update rustc to nightly-2023-03-20 (#7170)
**Description:**

This PR also updates `rkyv` to `=0.7.40`.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6807.
2023-03-30 08:06:02 +00:00
Donny/강동윤
12546c853a
build(cargo): Revert rustc upgrade (#7162)
**Description:**

The `rkyv` bug is not fixed.
2023-03-29 17:48:45 +09:00
Donny/강동윤
e445502072
build(cargo): Update rustc to nightly-2023-03-28 (#7154)
**Description:**

This PR also updates `rkyv` to `=0.7.40`.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6807.
2023-03-29 06:24:19 +00:00
Ivan Zakharchanka
a4d1af18de
fix(bindings/node): Fix loading of spack.config.js (#7105) 2023-03-21 08:04:55 +00:00
Chen Yangjian
6a1201cfc4
fix(es/minifier): Pass keep_* in config to compress and mangle (#7102) 2023-03-21 02:57:57 +00:00
Chen Yangjian
00869147d3
fix(es/minifier): Accept keep_fnames and keep_classnames (#7090) 2023-03-16 09:38:06 +00:00
magic-akari
7b491a69a5
fix(es/react): Align to babel@8 behavior (#7081)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7044.
2023-03-16 03:35:17 +00:00
Donny/강동윤
873e532f91
chore: Publish v1.3.38 (#7018) 2023-03-06 09:30:21 +00:00
Chen Yangjian
30cff01656
fix(bindings/node): Fix visitBindingIdentifier (#7000) 2023-03-03 02:03:54 +00:00
Donny/강동윤
d5c0dec40c
fix(bindings/node): Treat .cts and .mts as input by default (#6959)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6958.
2023-02-18 11:42:46 +00:00
Daiki Nishikawa
82128e3734
fix(bindings/node): Add esnext to JscTarget (#6908)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6904.
2023-02-07 03:43:37 +00:00
AsPulse
964dfbaf1a
fix(bindings): Don't require unnecessary package (#6902) 2023-02-05 19:48:15 +00:00
Donny/강동윤
ff78b8f7e0
feat(es/ast): Add EsNext to EsVersion (#6816) 2023-01-15 15:43:10 +09:00
Donny/강동윤
1c6fe35313
chore: Publish v1.3.26 (#6787) 2023-01-11 08:40:40 +00:00
Donny/강동윤
6c126da1d4
test(es): Add a test for a fixed source map issue (#6768)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6244.
2023-01-09 06:25:03 +00:00