@swc/core 1.2.247 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/package.json +19 -14
  3. package/types.d.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,177 @@
5
5
 
6
6
 
7
7
 
8
+ - **(es)** Use `paren_remover` pass (#5753) ([9c998d4](https://github.com/swc-project/swc/commit/9c998d4406fe641198092074d3ee3a859fc7b97e))
9
+
10
+
11
+ - **(es/compat)** Fix `generator` (#5796) ([aa8672e](https://github.com/swc-project/swc/commit/aa8672e73918e06ab2f7e7430ce35027ecc65cb3))
12
+
13
+
14
+ - **(node-swc)** Fix the type definition of `jsc.paths` (#5811) ([9d16293](https://github.com/swc-project/swc/commit/9d1629369b6bae5fc1d61f64c6b5fb75dea0eddf))
15
+
16
+ ### Features
17
+
18
+
19
+
20
+ - **(es/minifier)** Inline lazily initialized variables (#5737) ([ee26337](https://github.com/swc-project/swc/commit/ee26337a251ecb1fa4f369e6de614d3dc931ab5c))
21
+
22
+ ### Performance
23
+
24
+
25
+
26
+ - **(css/codegen)** Skip useless operations if not required (#5802) ([b96eb1e](https://github.com/swc-project/swc/commit/b96eb1ead8eedfeb8c3f392bf89ca5c037f1efcb))
27
+
28
+
29
+ - **(css/minifier)** Setup benchmark (#5800) ([88e59ff](https://github.com/swc-project/swc/commit/88e59ffcda6b0f00fabe80515c80cf4e0563f2bf))
30
+
31
+
32
+ - **(css/minifier)** Use `JsWord` instead of `&str` (#5806) ([7391cc9](https://github.com/swc-project/swc/commit/7391cc99b1ccfa19b56b67b4c582e9266ec9dab6))
33
+
34
+
35
+ - **(css/parser)** Use ascii operations (#5808) ([96cc888](https://github.com/swc-project/swc/commit/96cc888ef21299f6bcfdd21d576879857c3062a5))
36
+
37
+
38
+ - **(css/parser)** Remove needless branching (#5809) ([91ed13e](https://github.com/swc-project/swc/commit/91ed13e098bc53551332902e43f4d539829fb00f))
39
+
40
+
41
+ - **(css/parser)** Skip whiltespace from lexer (#5810) ([72a8b60](https://github.com/swc-project/swc/commit/72a8b608d649307c33eb9166d175fdce32750230))
42
+
43
+
44
+ - **(es/codegen)** Skip useless operations if not required (#5803) ([49942ca](https://github.com/swc-project/swc/commit/49942ca773d6fe6f44efa92625e274d01f9cdce0))
45
+
46
+ ### Refactor
47
+
48
+
49
+
50
+ - **(es/plugin)** Fix lints (#5801) ([2bbc9bd](https://github.com/swc-project/swc/commit/2bbc9bd73b6a1437b4a31d865c3eb83e44fa88c3))
51
+
52
+
53
+ - **(es/renamer)** Rename `PARALLEL` to `MANGLE` (#5790) ([21fbcb9](https://github.com/swc-project/swc/commit/21fbcb9621d88310ac297504235bd607d64b701a))
54
+
55
+
56
+ - **(swc_core)** Enable bytechecked flag (#5792) ([6f19f89](https://github.com/swc-project/swc/commit/6f19f8902f772ecc282d231dfd12c7b8d4c180fc))
57
+
58
+ ### Testing
59
+
60
+
61
+
62
+ - **(es)** Enable tests for fixed issues (#5784) ([f11461d](https://github.com/swc-project/swc/commit/f11461d3f546799113cc7bda4ac52c10e62bbaa0))
63
+
64
+
65
+ - **(es)** Add more execution tests (#5788) ([097245a](https://github.com/swc-project/swc/commit/097245a1960ee94585aaf8f10ce39947642da03c))
66
+
67
+ ## [1.2.249] - 2022-09-08
68
+
69
+ ### Bug Fixes
70
+
71
+
72
+
73
+ - **(es/minifier)** Don't drop parameters in an exported function (#5757) ([948d708](https://github.com/swc-project/swc/commit/948d7081447c50bc78764f5fe88ec6055ebbcc9c))
74
+
75
+
76
+ - **(es/minifier)** Fix analysis of assignments and classes (#5770) ([90852f5](https://github.com/swc-project/swc/commit/90852f5aa60ba5584729f1cd7284f136a9e00794))
77
+
78
+
79
+ - **(es/minifier)** Fix calculation of character frequency (#5772) ([32a73fb](https://github.com/swc-project/swc/commit/32a73fbf225c416771150add1c4040f6fbe71aaf))
80
+
81
+ ### Features
82
+
83
+
84
+
85
+ - **(es/lexer)** Recover from git merge conflict (#5775) ([7deadd8](https://github.com/swc-project/swc/commit/7deadd86679f820c113d92fe8b034086be2736ff))
86
+
87
+
88
+ - **(es/minifier)** Align name mangler with terser (#5763) ([60ce462](https://github.com/swc-project/swc/commit/60ce46221529f70ccee98f808f532410724ed66b))
89
+
90
+
91
+ - **(es/minifier)** Change order of renaming to align with terser (#5780) ([24b60d2](https://github.com/swc-project/swc/commit/24b60d2b64efad49d101fc8a4f23f04050b0ab9a))
92
+
93
+ ### Miscellaneous Tasks
94
+
95
+
96
+
97
+ - **(ci)** Cleanup CI config (#5769) ([1e8a58d](https://github.com/swc-project/swc/commit/1e8a58da4d6d3ca2bfc6843eb4412245d1154682))
98
+
99
+
100
+ - **(es/minifier)** Fix size calculator script (#5767) ([9d29abc](https://github.com/swc-project/swc/commit/9d29abcd5b9ab08fb3eed4d685806a6b0dac9d95))
101
+
102
+
103
+ - **(html/parser)** Typo (#5778) ([1b200a0](https://github.com/swc-project/swc/commit/1b200a0582f77aaca9abcbd4d693be13e172b9ec))- **general**: Typo (#5758) ([15e2357](https://github.com/swc-project/swc/commit/15e2357d1d7086f3a48def71c38acb7052f8d742))
104
+
105
+ ### Performance
106
+
107
+
108
+
109
+ - **(es/minifier)** Make `MultiReplacer` single-pass (#5761) ([27e9254](https://github.com/swc-project/swc/commit/27e92542808048a12985ce15ee6ee65d44d5ac6c))
110
+
111
+
112
+ - **(es/minifier)** Make passes more parallel (#5773) ([c2d1050](https://github.com/swc-project/swc/commit/c2d10503db724e1b2349d5df9211489c1aa9507a))
113
+
114
+
115
+ - **(es/parser)** Operate on `u8` (#5774) ([c10d557](https://github.com/swc-project/swc/commit/c10d55780e10a75ff0fcd0da87d1e7337fbe10bd))
116
+
117
+ ### Testing
118
+
119
+
120
+
121
+ - **(es/plugin)** Add E2E test for the published plugins (#5771) ([81ab8a2](https://github.com/swc-project/swc/commit/81ab8a29e36787feef3c23c1685ece1f0c82417e))
122
+
123
+
124
+ - **(es/tsc)** Handle tsx (#5764) ([52f6ca5](https://github.com/swc-project/swc/commit/52f6ca5fb826b9952b32946379cd696afb58867b))
125
+
126
+ ## [1.2.248] - 2022-09-06
127
+
128
+ ### Bug Fixes
129
+
130
+
131
+
132
+ - **(es/parser)** Fix detection of wrong delete targets (#5754) ([9fc6eda](https://github.com/swc-project/swc/commit/9fc6eda89a3f9e613468276eea50f90917fa0f91))
133
+
134
+
135
+ - **(swc_core)** Update deps (#5746) ([83dbe6c](https://github.com/swc-project/swc/commit/83dbe6cdc3252af50954938582379268a375e6b6))
136
+
137
+ ### Miscellaneous Tasks
138
+
139
+
140
+
141
+ - **(es/minifier)** Fix example (#5739) ([4e98980](https://github.com/swc-project/swc/commit/4e989807d71aa9a6c019c6a5a01acbbee9ec6020))
142
+
143
+
144
+ - **(swc_core)** Update deps (#5748) ([1202762](https://github.com/swc-project/swc/commit/1202762f30db43c972c1367f85e30e69baaf0c59))- **general**: Fix publish action ([f59d44e](https://github.com/swc-project/swc/commit/f59d44e295ea5b1f5f4b06240921bf4342d51686))
145
+
146
+ ### Performance
147
+
148
+
149
+
150
+ - **(bindings)** Enable LTO (#5740) ([49e0c71](https://github.com/swc-project/swc/commit/49e0c71cba9291ea313deffc891d9db8c9216627))
151
+
152
+
153
+ - **(es/minifier)** Make passes more parallel (#5741) ([2baa640](https://github.com/swc-project/swc/commit/2baa640e98bd8bac2995157c42ff6489b73d85cf))
154
+
155
+
156
+ - **(es/minifier)** Pre-allocate in analyzer (#5743) ([96b2e17](https://github.com/swc-project/swc/commit/96b2e17a8fdb5e500eb1e6a10ffa16d4d0c98957))
157
+
158
+
159
+ - **(es/minifier)** Use efficient logic for entry tracking in DCE (#5749) ([08b2aea](https://github.com/swc-project/swc/commit/08b2aea2b0d1d0bec707394d9f5cf6d2713431a9))
160
+
161
+
162
+ - **(es/minifier)** Cache the list of bindings for DCE (#5750) ([8789184](https://github.com/swc-project/swc/commit/8789184d447eb09e1b0dddc6156ac150d4cbf0d7))
163
+
164
+
165
+ - **(es/minifier)** Improve codegen of name mangler (#5751) ([6e2002a](https://github.com/swc-project/swc/commit/6e2002a148f6d0660b17c4e617049972ee0fb3bf))
166
+
167
+ ### Refactor
168
+
169
+
170
+
171
+ - **(es/utils)** Move utilities for parallel processing (#5742) ([64f42be](https://github.com/swc-project/swc/commit/64f42bec27c4c7cf60cb6d6043fec93e479fb9b8))
172
+
173
+ ## [1.2.247] - 2022-09-04
174
+
175
+ ### Bug Fixes
176
+
177
+
178
+
8
179
  - **(bundler)** Handle star export with top-level `await` (#5707) ([2b7cba8](https://github.com/swc-project/swc/commit/2b7cba8a97b971a00f4e851365462ba6d87e5ee0))
9
180
 
10
181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.247",
3
+ "version": "1.3.0",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -62,6 +62,7 @@
62
62
  "build:wasm": "npm-run-all \"pack -- build ./bindings/binding_core_wasm --scope swc {1} -t {2} --features plugin\" --",
63
63
  "build": "tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts --cargo-cwd ./bindings -p binding_core_node --release",
64
64
  "build:dev": "tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts --cargo-cwd ./bindings -p binding_core_node",
65
+ "build:bytecheck": "tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts --cargo-cwd ./bindings --features swc_v1,plugin_bytecheck -p binding_core_node --cargo-flags=--no-default-features --release",
65
66
  "test": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --config ./node-swc/jest.config.js",
66
67
  "version": "napi version -p scripts/npm"
67
68
  },
@@ -98,14 +99,17 @@
98
99
  "@napi-rs/cli": "^2.10.0",
99
100
  "@swc/core": "^1.2.220",
100
101
  "@swc/helpers": "^0.4.2",
102
+ "@swc/plugin-jest": "^1.2.12",
101
103
  "@taplo/cli": "^0.3.2",
102
104
  "@types/jest": "^28.1.4",
103
105
  "@types/node": "^14.14.41",
106
+ "@types/terser": "^3.12.0",
104
107
  "acorn": "^8.6.0",
105
108
  "acorn-jsx": "^5.3.2",
106
109
  "axios": "^0.21.1",
107
110
  "babel-plugin-transform-node-env-inline": "^0.4.3",
108
111
  "benchmark": "^2.1.4",
112
+ "bootstrap": "^5.2.1",
109
113
  "class-validator": "^0.13.1",
110
114
  "core-js": "^2.6.11",
111
115
  "core-js-compat": "^3.21.1",
@@ -129,6 +133,7 @@
129
133
  "source-map": "^0.7.3",
130
134
  "source-map-support": "^0.5.19",
131
135
  "sourcemap-validator": "^2.1.0",
136
+ "swc-plugin-coverage-instrument": "^0.0.12",
132
137
  "terser": "^5.7.1",
133
138
  "ts-node": "^10.5.0",
134
139
  "typescript": "^4.5.2"
@@ -138,19 +143,19 @@
138
143
  "url": "https://opencollective.com/swc"
139
144
  },
140
145
  "optionalDependencies": {
141
- "@swc/core-win32-x64-msvc": "1.2.247",
142
- "@swc/core-darwin-x64": "1.2.247",
143
- "@swc/core-linux-x64-gnu": "1.2.247",
144
- "@swc/core-linux-x64-musl": "1.2.247",
145
- "@swc/core-freebsd-x64": "1.2.247",
146
- "@swc/core-win32-ia32-msvc": "1.2.247",
147
- "@swc/core-linux-arm64-gnu": "1.2.247",
148
- "@swc/core-linux-arm-gnueabihf": "1.2.247",
149
- "@swc/core-darwin-arm64": "1.2.247",
150
- "@swc/core-android-arm64": "1.2.247",
151
- "@swc/core-linux-arm64-musl": "1.2.247",
152
- "@swc/core-win32-arm64-msvc": "1.2.247",
153
- "@swc/core-android-arm-eabi": "1.2.247"
146
+ "@swc/core-win32-x64-msvc": "1.3.0",
147
+ "@swc/core-darwin-x64": "1.3.0",
148
+ "@swc/core-linux-x64-gnu": "1.3.0",
149
+ "@swc/core-linux-x64-musl": "1.3.0",
150
+ "@swc/core-freebsd-x64": "1.3.0",
151
+ "@swc/core-win32-ia32-msvc": "1.3.0",
152
+ "@swc/core-linux-arm64-gnu": "1.3.0",
153
+ "@swc/core-linux-arm-gnueabihf": "1.3.0",
154
+ "@swc/core-darwin-arm64": "1.3.0",
155
+ "@swc/core-android-arm64": "1.3.0",
156
+ "@swc/core-linux-arm64-musl": "1.3.0",
157
+ "@swc/core-win32-arm64-msvc": "1.3.0",
158
+ "@swc/core-android-arm-eabi": "1.3.0"
154
159
  },
155
160
  "files": [
156
161
  "CHANGELOG.md",
package/types.d.ts CHANGED
@@ -468,7 +468,7 @@ export interface JscConfig {
468
468
  };
469
469
  baseUrl?: string;
470
470
  paths?: {
471
- [from: string]: [string];
471
+ [from: string]: string[];
472
472
  };
473
473
  minify?: JsMinifyOptions;
474
474
  preserveAllComments?: boolean;