Commit Graph

5810 Commits

Author SHA1 Message Date
SWC Bot
48524e2ae8 chore: Bump crates 2024-02-05 06:34:30 +00:00
Donny/강동윤
7f2a2c1e40
refactor(es/ast): Improve type definitions of patterns (#8532)
**Description:**

 - Copy `AssignmentTarget` from `oxc`.
 - Use `BindingIdentifier` in more places.

**Related issue:**
 
 - Closes #8026
2024-02-05 15:32:52 +09:00
SWC Bot
47e7b89a1b chore: Bump crates 2024-02-04 06:19:41 +00:00
magic-akari
d480ab9ae8
fix(es/resolver): Skip property in JSX member (#8598)
**Related issue:**

 - Close #8528
2024-02-04 06:17:52 +00:00
magic-akari
2a70a6b1d4
fix(es/typescript): Handle exported JSX binding name in TypeScript namespace (#8596)
**Related issue:**

 - Closes #8594
2024-02-03 02:10:21 +00:00
Donny/강동윤
fd997d3712
feat(es/minifier): Respect more options (#8582)
**Description:**

This PR makes the ES minifier respect more options.

Changes:
 - `reduce_vars` now enables IIFE invoker.
 - `reduce_vars` now enables seq inliner.
 - `top_retain` is now respected by seq inliner.
 - `arguments` is now ignored by seq inliner.

---------

Co-authored-by: austaras <austaras@outlook.com>
2024-02-02 12:35:58 +00:00
Donny/강동윤
872a47b851
test(es/testing): Ensure that test_inline! is working properly (#8590)
**Related issue:**

 - Closes #8586
2024-02-02 03:17:43 +00:00
Donny/강동윤
a7c5255ad1
fix(es/minifier): Fix top-level check (#8583)
**Description:**

Our logic for checking top-level was wrong.
2024-02-02 01:45:41 +00:00
SWC Bot
ef21736584 chore: Bump crates 2024-02-02 01:19:28 +00:00
yannkaiser
8413a6c48e
fix(es/lexer): Fix typo in package keyword (#8589)
**Description:**

There is a typo in the ES lexer for the keyword `package`.

**Related issue:**

- Closes #8588
2024-02-02 10:17:48 +09:00
SWC Bot
386c391081 chore: Bump crates 2024-02-02 00:43:47 +00:00
Donny/강동윤
18e0b53fbb
feat(es/minifier): Inline more IIFE arguments (#8584)
**Description:**

We can inline more.
2024-02-02 09:42:15 +09:00
SWC Bot
429c1bae44 chore: Bump crates 2024-01-31 08:50:09 +00:00
Donny/강동윤
8c322250b7
fix(es/codegen): Fix codegen of async methods with decorators (#8575)
**Related issue:**

 - Closes #4311
2024-01-31 08:48:30 +00:00
SWC Bot
d006482bd9 chore: Bump crates 2024-01-31 04:38:19 +00:00
Donny/강동윤
82bc061b8c
fix(cli): Make Rust CLI use sourcemap code from the swc crate (#8576)
**Related issue:**

 - Closes #8495
2024-01-31 04:36:41 +00:00
Donny/강동윤
d81596cd2b
fix(es/proposals): Support using using keyword with functions (#8574)
**Related issue:**

 - Closes #8570
 - https://github.com/babel/babel/pull/16150
2024-01-30 15:55:43 +09:00
SWC Bot
f5ee6d1d7f chore: Bump crates 2024-01-30 04:42:21 +00:00
Donny/강동윤
8b86638970
test(es/minifer): Update the passing terser test list (#8573) 2024-01-30 04:40:52 +00:00
SWC Bot
ba1da1de3c chore: Bump crates 2024-01-29 10:27:13 +00:00
Donny/강동윤
d683089be1
fix(es/testing): Make test_inline! not read output as a file (#8569)
**Description:**

I made a mistake while working on `test_inline!`

**Related issue:**

 - #8568
2024-01-29 10:25:42 +00:00
강동윤 (Donny)
fd7cf4c30a chore: Publish crates 2024-01-28 22:51:53 +09:00
SWC Bot
a5c56a9e14 chore: Bump crates 2024-01-28 12:35:38 +00:00
Donny/강동윤
07634a05ba
fix(es/codegen): Do not produce octal literals (#8565) 2024-01-28 12:34:03 +00:00
SWC Bot
160043a2d3 chore: Bump crates 2024-01-27 04:57:56 +00:00
xiao xin
d6a4615898
fix(es/loader): Make tsc resolver work for bare specifier (#8550)
**Description:**

From the typescript
[baseUrl](https://www.typescriptlang.org/docs/handbook/modules/reference.html#baseurl)
doc: When using bare specifiers (module specifiers that don’t begin with
./, ../, or /), baseUrl has a higher precedence than node_modules
package lookups.

In the current tsc resolver implementation, when resolving bare module
specifiers, baseUrl was not used except for `paths`, this cause the
belowing resolution failed, but it worked when used in typescript
project.

`tsconfig.json` / `.swcrc`:
```json
{
    baseUrl: "."
    paths: {
        "@common/*": ["src/common/*"]
    }
}
```

File structure:
- ./src/common/helper.ts
- ./src/index.ts


./src/index.ts content:
```ts
 // tsc can resolve this, but tsc resolver cannot
import sth from "src/common/helper"
```
2024-01-27 04:56:11 +00:00
강동윤 (Donny)
039c1685c6 chore: Publish crates 2024-01-25 21:36:33 +09:00
magic-akari
f416aff7d7
fix(es/decorator): Preserve state while traversing the module_items scope (#8556)
**Related issue:**

 - Closes #8551
2024-01-25 08:44:02 +00:00
SWC Bot
5f9b7b4c8b chore: Bump crates 2024-01-25 07:20:48 +00:00
magic-akari
6a8dd8cbb3
fix(es/decorator): Skip TypeScript class method/prop declarations (#8555)
**Related issue:**

- Closes #8552
2024-01-25 07:19:20 +00:00
강동윤 (Donny)
1890e66023 chore: Publish crates 2024-01-25 14:07:30 +09:00
SWC Bot
c5053d1574 chore: Bump crates 2024-01-24 12:01:48 +00:00
Donny/강동윤
fab27dabed
fix(es/loader): Don't use browser versions for jsc.paths (#8548)
**Related issue:**

 - https://github.com/vercel/next.js/issues/56144
2024-01-24 12:00:05 +00:00
SWC Bot
994d7adcd0 chore: Bump crates 2024-01-24 09:19:54 +00:00
Donny/강동윤
ae786692a0
fix(es/codegen): Set sourceRoot of sourcemaps (#6086)
**Related issue:**

 - Closes #2362
2024-01-24 09:18:09 +00:00
Donny/강동윤
00619b1708
feat(css/parser): Implement error reporting for @value of CSS Modules (#8547) 2024-01-24 05:06:20 +00:00
SWC Bot
c3fd9d081e chore: Bump crates 2024-01-24 02:04:25 +00:00
Donny/강동윤
043ee85d08
fix(common): Fix source map generation with inputSourceMap (#8546)
**Description:**

- This PR fixes the source map generation when `inputSourceMap` is specified.
- This PR fixes `minify()` not accepting parsed source map in the option.


**Related issue:**

 - Closes #8372.
2024-01-24 02:02:45 +00:00
Donny/강동윤
aa70131c55
fix(es/minifier): Fix a bug related to inliner and the variable scoping (#8542)
**Related issue:**

 - Closes #8246
2024-01-24 01:12:02 +00:00
SWC Bot
2d15177ca9 chore: Bump crates 2024-01-23 08:38:01 +00:00
Donny/강동윤
4630426d6a
chore(common): Update sourcemap (#8544)
**Related issue:**

 - Closes #7822
2024-01-23 08:36:04 +00:00
SWC Bot
12be23cfb5 chore: Bump crates 2024-01-23 04:25:38 +00:00
Donny/강동윤
fc929e962b
fix(es/compat): Support vars from reserved_word pass (#8543)
**Related issue:**

 - Closes #8539
2024-01-23 04:23:48 +00:00
SWC Bot
ecd9403c1d chore: Bump crates 2024-01-23 03:46:27 +00:00
SWC Bot
979061f6ba chore: Bump crates 2024-01-22 13:04:29 +00:00
Fy
71930ffb56
fix(es/quote): Add support for import phase to quote macro (#8536)
**Description:**

When using quote! to generate import decl, compile error: missing field `phase` in initializer of 'swc_core::ecma::ast::Import'
2024-01-22 22:02:49 +09:00
SWC Bot
ae75dcb710 chore: Bump crates 2024-01-22 08:53:49 +00:00
Donny/강동윤
793f2651a8
feat(swc_core): Expose preset_env_base (#8537) 2024-01-22 17:51:26 +09:00
SWC Bot
990f291d43 chore: Bump crates 2024-01-21 15:30:11 +00:00
Donny/강동윤
2d8bd9ed89
fix(es/module): Fix handling of * in jsc.paths (#8535)
**Related issue:**

 - Closes #8375
2024-01-21 15:28:38 +00:00