Commit Graph

270 Commits

Author SHA1 Message Date
SWC Bot
97b92aa6ff chore: Bump crates 2024-06-29 09:26:51 +00:00
SWC Bot
10eab94d81 chore: Bump crates 2024-06-14 14:47:30 +00:00
SWC Bot
931f752d54 chore: Bump crates 2024-06-14 05:24:10 +00:00
SWC Bot
6400140999 chore: Bump crates 2024-06-11 11:22:41 +00:00
Donny/강동윤
cb16994a8d
fix(es/minifier): Visit RHS while hoisting properties (#9032)
**Description:**

Handles 

```js
var FRUITS = { MANGO: "mango" }, getMangoLabel = (label) => label[FRUITS.MANGO];
```

while hoisting properties. In the code above, the initializer of the second variable declarator should be visited after hoisting the first variable declarator. Otherwise `FRUITS.MANGO` cannot be handled.


**Related issue:**

 - Closes #9030
2024-06-11 20:20:39 +09:00
SWC Bot
7c62a79d9b chore: Bump crates 2024-05-24 05:12:45 +00:00
Donny/강동윤
a753c8d191
fix(es/minifier): Mark usage in TaggedTpl as ref (#8975)
**Related issue:**

 - Closes #8974
2024-05-24 05:11:00 +00:00
SWC Bot
f681924023 chore: Bump crates 2024-05-16 02:11:50 +00:00
Donny/강동윤
255485e373
fix(es/minifier): Abort array property inliner if the array is used as a ref (#8956)
**Description:**

Repro:
 - https://github.com/kdy1/repro-next-46887

**Related issue:**

 - https://github.com/vercel/next.js/issues/46887
2024-05-16 11:09:41 +09:00
강동윤 (Donny)
7ac3b0a7dc chore: Bump crates 2024-04-29 09:56:27 +09:00
magic-akari
cc1432a12f
chore: Apply cargo autoinherit (#8902) 2024-04-29 00:54:45 +00:00
SWC Bot
f9106a50c0 chore: Bump crates 2024-04-24 00:37:30 +00:00
SWC Bot
0af201043a chore: Bump crates 2024-04-16 02:24:47 +00:00
Donny/강동윤
ca9c76b46f
build(cargo): Update rustc to nightly-2024-04-03 (#8821) 2024-04-16 02:20:47 +00:00
Donny/강동윤
207582ff25
chore(deps): Update dependencies (#8810) 2024-04-04 15:07:49 +09:00
SWC Bot
82d1b8e49a chore: Bump crates 2024-03-17 13:04:54 +00:00
SWC Bot
31ecd2a6c1 chore: Bump crates 2024-03-14 01:32:37 +00:00
SWC Bot
e46dd5a208 chore: Bump crates 2024-03-12 06:00:28 +00:00
SWC Bot
90aaabaf15 chore: Bump crates 2024-03-06 04:41:56 +00:00
SWC Bot
98aa9824d5 chore: Bump crates 2024-03-04 10:08:47 +00:00
SWC Bot
7a5c7df195 chore: Bump crates 2024-03-04 07:48:09 +00:00
SWC Bot
5dc40d347b chore: Bump crates 2024-03-02 10:24:52 +00:00
SWC Bot
7c5113b6a9 chore: Bump crates 2024-02-22 02:56:23 +00:00
SWC Bot
359ae7a16a chore: Bump crates 2024-02-21 10:22:20 +00:00
SWC Bot
5cab610db1 chore: Bump crates 2024-02-20 01:27:25 +00:00
SWC Bot
d7434beaf8 chore: Bump crates 2024-02-19 03:15:59 +00:00
SWC Bot
6cca7cbfe8 chore: Bump crates 2024-02-13 05:14:07 +00:00
SWC Bot
906cca43c1 chore: Bump crates 2024-02-08 01:51:17 +00:00
SWC Bot
f7baf240ba chore: Bump crates 2024-02-07 07:25:27 +00:00
SWC Bot
927b14a2e4 chore: Bump crates 2024-02-07 03:27:01 +00:00
Donny/강동윤
3122e944a8
feat(es/minifier): Implement correct hoist_props (#8593)
**Description:**

 - The option `hoist_props` now does what it's supposed to do.
- Dropping of unused properties now does not drop properties too aggressively.
- The initializer of a dropped variable declaration is now properly visited.
- Indexing with string literals is not marked as a dynamic index anymore. This is required to handle codes like c3f67ceb1e/crates/swc_ecma_minifier/tests/terser/compress/hoist_props/name_collision_1/input.js (L1-L7).
2024-02-07 03:25:27 +00:00
SWC Bot
7a3b5545cd chore: Bump crates 2024-02-06 02:47:51 +00:00
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
SWC Bot
ef21736584 chore: Bump crates 2024-02-02 01:19:28 +00:00
SWC Bot
f5ee6d1d7f chore: Bump crates 2024-01-30 04:42:21 +00:00
SWC Bot
2d15177ca9 chore: Bump crates 2024-01-23 08:38:01 +00:00
SWC Bot
6210bf19de chore: Bump crates 2024-01-21 03:08:11 +00:00
Donny/강동윤
bc38ac906c fix(es/ast): Fix definition of SetterProp (#8314)
**Related issue:**

 - Closes #8157
 - Closes #8377
2024-01-21 12:05:46 +09:00
SWC Bot
1ca0d65c29 chore: Bump crates 2024-01-21 02:34:11 +00:00
SWC Bot
d9a79a0a39 chore: Publish crates 2024-01-04 12:28:02 +00:00
SWC Bot
4e860c988d chore: Publish crates 2024-01-04 04:49:50 +00:00
SWC Bot
8997ed1547 chore: Publish crates 2024-01-04 04:25:54 +00:00
SWC Bot
e3f25c2011 chore: Publish crates 2023-12-29 12:26:47 +00:00
Luke Page
d681785b42
fix(es/minifier): Add WeakRef as a safe global reference (#8458)
**Description:**

I was trying to remove references to Weak Ref from minified code and
despite the expression not being used, it was still included.

E.g.
```
var x = WeakRef;
```
with

```
{
   "minify": true,
  "jsc": {
      "minify": {
            "compress": {
                "pure_getters": true,
                "unused": true
            },
            "mangle": true
        }
    }
}
```
outputs

```
WeakRef;
```

but when I use something on this list e.g. parseFloat, it gets cleaned
up and outputs empty string.

btw - I tried different options for pure_getters that I assumed would
allow me to say WeakRef as a getter was pure, but it had no effect.

WeakRef getter is as safe to remove as the other items on this list and
has no effect in accessing it.
2023-12-29 12:25:23 +00:00
SWC Bot
4229e7b99b chore: Publish crates 2023-12-29 08:49:51 +00:00
SWC Bot
dd9ed9c565 chore: Publish crates 2023-12-12 06:14:41 +00:00
SWC Bot
f202a2839f chore: Publish crates 2023-12-12 04:39:47 +00:00
SWC Bot
595f13c019 chore: Publish crates 2023-12-08 07:18:16 +00:00