@swc/core 1.2.249 → 1.3.1

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 +178 -0
  2. package/package.json +16 -14
  3. package/types.d.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,184 @@
5
5
 
6
6
 
7
7
 
8
+ - **(cli)** Update the plugin template (#5824) ([969ecde](https://github.com/swc-project/swc/commit/969ecdee3d63b2f4b9ffc7f854d25ceb5bff32f4))
9
+
10
+
11
+ - **(css/minifier)** Compress alpha (#5825) ([b531410](https://github.com/swc-project/swc/commit/b531410ea90f38da7e491862097cf7a2dea51fe9))
12
+
13
+
14
+ - **(css/minifier)** Fix minification of universal selectors (#5826) ([1803874](https://github.com/swc-project/swc/commit/1803874f1484ab2a3c7b23b5e027e72f99740fba))
15
+
16
+
17
+ - **(es/ast)** Revert #5798 (#5798) (#5855) ([4cde553](https://github.com/swc-project/swc/commit/4cde5538119ccafee8e4d324c4fa4ffdf1ca4f12))
18
+
19
+
20
+ - **(es/codegen)** Remove redundant `;` after export default decl (#5851) ([2b24642](https://github.com/swc-project/swc/commit/2b2464271aa938968986287fa03e2ef06dcd3fd7))
21
+
22
+
23
+ - **(es/minifier)** Don't replace parameters of IIFE if it's recursive (#5852) ([a5f7b69](https://github.com/swc-project/swc/commit/a5f7b6946fcf020b4669ac301b944ba5c0adbbba))
24
+
25
+
26
+ - **(es/minifier)** Preserve more side effects (#5853) ([32f1806](https://github.com/swc-project/swc/commit/32f18068ad90ba2bfc7cf34b82245f9db2473077))
27
+
28
+
29
+ - **(es/modules)** Improve compatibility with `cjs-module-lexer` (#5835) ([bf75981](https://github.com/swc-project/swc/commit/bf759819e4ad577e89c2605e80e80c928017029d))
30
+
31
+
32
+ - **(es/parser)** Keep comments of the RHS of a binary expression (#5812) ([8adbe16](https://github.com/swc-project/swc/commit/8adbe1675e6e86b0d1eb2f67ecdba3eb4ed5ee96))
33
+
34
+
35
+ - **(es/parser)** Handle more `TS1185` (#5834) ([10637b0](https://github.com/swc-project/swc/commit/10637b006fb5c66b9bf7b9fef417ee04924f2845))
36
+
37
+
38
+ - **(swc_core)** Fix reexport of `testing` (#5848) ([c0da2e9](https://github.com/swc-project/swc/commit/c0da2e998ada947563de83ba19feed789f1a1aea))
39
+
40
+ ### Features
41
+
42
+
43
+
44
+ - **(css/minifier)** Compress `@media` and `@supports` (#5828) ([211b0a9](https://github.com/swc-project/swc/commit/211b0a93fd994084e20dca47aad42d2e9e66e63f))
45
+
46
+
47
+ - **(es/minifier)** Extend inlining of identifiers to multi-usage (#5832) ([8567a38](https://github.com/swc-project/swc/commit/8567a38c4a9363c41d0cab1c8adec02ee2e9b202))
48
+
49
+
50
+ - **(es/parser)** Improve jsx lexer (#5805) ([97729e5](https://github.com/swc-project/swc/commit/97729e5d2bc74841ac2907902ddbd413d5645f9a))
51
+
52
+
53
+ - **(swc_core)** Export `swc_common/sourcemap` (#5818) ([2819be5](https://github.com/swc-project/swc/commit/2819be5aac9d341bfb57335b5c9f96c267f9883d))
54
+
55
+
56
+ - **(swc_core)** Export testing utilities (#5839) ([856d741](https://github.com/swc-project/swc/commit/856d741ec77f46eb04be8489a3a18340269dbe4d))
57
+
58
+ ### Performance
59
+
60
+
61
+
62
+ - **(atoms)** Reduce size of `Atom` (#5831) ([2400427](https://github.com/swc-project/swc/commit/24004270d949f0e8fb87151b1fce342fe39360ef))
63
+
64
+
65
+ - **(css)** Optimize memory layout of ast types (#5823) ([4f119b2](https://github.com/swc-project/swc/commit/4f119b26935aeb06fb16a116c4f96783f6edfdae))
66
+
67
+
68
+ - **(css/minifier)** Merge passes (#5820) ([f523502](https://github.com/swc-project/swc/commit/f523502f4cf03b238bd7b859930f344169302907))
69
+
70
+
71
+ - **(css/minifier)** Merge more passes into the compressor (#5821) ([4fa5a27](https://github.com/swc-project/swc/commit/4fa5a2778b3fd8627f52f3040041bdcb9b86467c))
72
+
73
+
74
+ - **(css/minifier)** Merge passes and reduce clone (#5822) ([9e81c26](https://github.com/swc-project/swc/commit/9e81c2639b4182ebbc5ec87b77b4b6ba052cab72))
75
+
76
+
77
+ - **(es/minifier)** Optimize usage of `IndexSet` (#5814) ([704ea3d](https://github.com/swc-project/swc/commit/704ea3d48d8c98b7a3f7400621ef93d041c27860))
78
+
79
+
80
+ - **(es/minifier)** Make expression simplifier stateless and parallel (#5819) ([cfe575e](https://github.com/swc-project/swc/commit/cfe575e35a47c8a0d0550df9fc8dd0db932b6c41))
81
+
82
+
83
+ - **(es/minifier)** Make the expression simplifier more parallel (#5841) ([b6cf975](https://github.com/swc-project/swc/commit/b6cf9750ecda6d4a7b1f1c9c7c26a801dc40c213))
84
+
85
+
86
+ - **(es/minifier)** Reduce type sizes (#5843) ([fe3072b](https://github.com/swc-project/swc/commit/fe3072b12a32cbae3b4f9e904add8ad2ab6cc7f3))
87
+
88
+
89
+ - **(es/parser)** Optimize memory layout (#5833) ([10484ed](https://github.com/swc-project/swc/commit/10484edbf768dcf96a99960a53cfb5968750b0c2))
90
+
91
+
92
+ - **(html/minifier)** Improve performance (#5840) ([b691fec](https://github.com/swc-project/swc/commit/b691fec7b7949c4fff016e53b32b7f001403773a))
93
+
94
+
95
+ - **(html/minifier)** Improve performance (#5838) ([ccd618c](https://github.com/swc-project/swc/commit/ccd618ce54cc21dbdeecd766f91816b395629678))
96
+
97
+ ### Refactor
98
+
99
+
100
+
101
+ - **(es/ast)** Apply rkyv-bytecheck flag (#5798) ([37f42df](https://github.com/swc-project/swc/commit/37f42df877b63479c3c6ed0f2d7fb24791da6589))
102
+
103
+ ### Testing
104
+
105
+
106
+
107
+ - **(es/transforms)** Enable tests for fixed issues (#5845) ([0284c1b](https://github.com/swc-project/swc/commit/0284c1bf40de7d199733ee8f93c189d9658fe6b0))
108
+
109
+ ### Build
110
+
111
+
112
+
113
+ - **(bindings)** Use new llvm pass manager (#5816) ([bb427c4](https://github.com/swc-project/swc/commit/bb427c4267d005f77e3aca4bd6c8c65b2c508ee8))
114
+
115
+ ## [1.3.0] - 2022-09-10
116
+
117
+ ### Bug Fixes
118
+
119
+
120
+
121
+ - **(es)** Use `paren_remover` pass (#5753) ([9c998d4](https://github.com/swc-project/swc/commit/9c998d4406fe641198092074d3ee3a859fc7b97e))
122
+
123
+
124
+ - **(es/compat)** Fix `generator` (#5796) ([aa8672e](https://github.com/swc-project/swc/commit/aa8672e73918e06ab2f7e7430ce35027ecc65cb3))
125
+
126
+
127
+ - **(node-swc)** Fix the type definition of `jsc.paths` (#5811) ([9d16293](https://github.com/swc-project/swc/commit/9d1629369b6bae5fc1d61f64c6b5fb75dea0eddf))
128
+
129
+ ### Features
130
+
131
+
132
+
133
+ - **(es/minifier)** Inline lazily initialized variables (#5737) ([ee26337](https://github.com/swc-project/swc/commit/ee26337a251ecb1fa4f369e6de614d3dc931ab5c))
134
+
135
+ ### Performance
136
+
137
+
138
+
139
+ - **(css/codegen)** Skip useless operations if not required (#5802) ([b96eb1e](https://github.com/swc-project/swc/commit/b96eb1ead8eedfeb8c3f392bf89ca5c037f1efcb))
140
+
141
+
142
+ - **(css/minifier)** Setup benchmark (#5800) ([88e59ff](https://github.com/swc-project/swc/commit/88e59ffcda6b0f00fabe80515c80cf4e0563f2bf))
143
+
144
+
145
+ - **(css/minifier)** Use `JsWord` instead of `&str` (#5806) ([7391cc9](https://github.com/swc-project/swc/commit/7391cc99b1ccfa19b56b67b4c582e9266ec9dab6))
146
+
147
+
148
+ - **(css/parser)** Use ascii operations (#5808) ([96cc888](https://github.com/swc-project/swc/commit/96cc888ef21299f6bcfdd21d576879857c3062a5))
149
+
150
+
151
+ - **(css/parser)** Remove needless branching (#5809) ([91ed13e](https://github.com/swc-project/swc/commit/91ed13e098bc53551332902e43f4d539829fb00f))
152
+
153
+
154
+ - **(css/parser)** Skip whiltespace from lexer (#5810) ([72a8b60](https://github.com/swc-project/swc/commit/72a8b608d649307c33eb9166d175fdce32750230))
155
+
156
+
157
+ - **(es/codegen)** Skip useless operations if not required (#5803) ([49942ca](https://github.com/swc-project/swc/commit/49942ca773d6fe6f44efa92625e274d01f9cdce0))
158
+
159
+ ### Refactor
160
+
161
+
162
+
163
+ - **(es/plugin)** Fix lints (#5801) ([2bbc9bd](https://github.com/swc-project/swc/commit/2bbc9bd73b6a1437b4a31d865c3eb83e44fa88c3))
164
+
165
+
166
+ - **(es/renamer)** Rename `PARALLEL` to `MANGLE` (#5790) ([21fbcb9](https://github.com/swc-project/swc/commit/21fbcb9621d88310ac297504235bd607d64b701a))
167
+
168
+
169
+ - **(swc_core)** Enable bytechecked flag (#5792) ([6f19f89](https://github.com/swc-project/swc/commit/6f19f8902f772ecc282d231dfd12c7b8d4c180fc))
170
+
171
+ ### Testing
172
+
173
+
174
+
175
+ - **(es)** Enable tests for fixed issues (#5784) ([f11461d](https://github.com/swc-project/swc/commit/f11461d3f546799113cc7bda4ac52c10e62bbaa0))
176
+
177
+
178
+ - **(es)** Add more execution tests (#5788) ([097245a](https://github.com/swc-project/swc/commit/097245a1960ee94585aaf8f10ce39947642da03c))
179
+
180
+ ## [1.2.249] - 2022-09-08
181
+
182
+ ### Bug Fixes
183
+
184
+
185
+
8
186
  - **(es/minifier)** Don't drop parameters in an exported function (#5757) ([948d708](https://github.com/swc-project/swc/commit/948d7081447c50bc78764f5fe88ec6055ebbcc9c))
9
187
 
10
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.249",
3
+ "version": "1.3.1",
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
  },
@@ -108,6 +109,7 @@
108
109
  "axios": "^0.21.1",
109
110
  "babel-plugin-transform-node-env-inline": "^0.4.3",
110
111
  "benchmark": "^2.1.4",
112
+ "bootstrap": "^5.2.1",
111
113
  "class-validator": "^0.13.1",
112
114
  "core-js": "^2.6.11",
113
115
  "core-js-compat": "^3.21.1",
@@ -141,19 +143,19 @@
141
143
  "url": "https://opencollective.com/swc"
142
144
  },
143
145
  "optionalDependencies": {
144
- "@swc/core-win32-x64-msvc": "1.2.249",
145
- "@swc/core-darwin-x64": "1.2.249",
146
- "@swc/core-linux-x64-gnu": "1.2.249",
147
- "@swc/core-linux-x64-musl": "1.2.249",
148
- "@swc/core-freebsd-x64": "1.2.249",
149
- "@swc/core-win32-ia32-msvc": "1.2.249",
150
- "@swc/core-linux-arm64-gnu": "1.2.249",
151
- "@swc/core-linux-arm-gnueabihf": "1.2.249",
152
- "@swc/core-darwin-arm64": "1.2.249",
153
- "@swc/core-android-arm64": "1.2.249",
154
- "@swc/core-linux-arm64-musl": "1.2.249",
155
- "@swc/core-win32-arm64-msvc": "1.2.249",
156
- "@swc/core-android-arm-eabi": "1.2.249"
146
+ "@swc/core-win32-x64-msvc": "1.3.1",
147
+ "@swc/core-darwin-x64": "1.3.1",
148
+ "@swc/core-linux-x64-gnu": "1.3.1",
149
+ "@swc/core-linux-x64-musl": "1.3.1",
150
+ "@swc/core-freebsd-x64": "1.3.1",
151
+ "@swc/core-win32-ia32-msvc": "1.3.1",
152
+ "@swc/core-linux-arm64-gnu": "1.3.1",
153
+ "@swc/core-linux-arm-gnueabihf": "1.3.1",
154
+ "@swc/core-darwin-arm64": "1.3.1",
155
+ "@swc/core-android-arm64": "1.3.1",
156
+ "@swc/core-linux-arm64-musl": "1.3.1",
157
+ "@swc/core-win32-arm64-msvc": "1.3.1",
158
+ "@swc/core-android-arm-eabi": "1.3.1"
157
159
  },
158
160
  "files": [
159
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;