@oxc-minify/binding-wasm32-wasi 0.144.0 → 0.145.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.
- package/minify.wasi-browser.js +1 -1
- package/minify.wasi.d.cts +43 -0
- package/minify.wasm32-wasi.wasm +0 -0
- package/package.json +2 -2
package/minify.wasi-browser.js
CHANGED
|
@@ -565,7 +565,7 @@ try {
|
|
|
565
565
|
} = await __emnapiInstantiateNapiModule(__wasmFile, {
|
|
566
566
|
context: __emnapiContext,
|
|
567
567
|
asyncWorkPoolSize: __asyncWorkPoolSize,
|
|
568
|
-
reuseWorker:
|
|
568
|
+
reuseWorker: false,
|
|
569
569
|
plugins: [__emnapiAsyncWorkPlugin, __emnapiTSFNPlugin],
|
|
570
570
|
wasi: __wasi,
|
|
571
571
|
onCreateWorker() {
|
package/minify.wasi.d.cts
CHANGED
|
@@ -167,6 +167,38 @@ export interface MangleOptionsKeepNames {
|
|
|
167
167
|
class: boolean
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
export interface ManglePropertiesOptions {
|
|
171
|
+
/**
|
|
172
|
+
* JavaScript `RegExp` selecting property names to mangle. The source and flags are compiled
|
|
173
|
+
* with Rust's regex engine. Flags `i`, `m`, `s`, and `u` are supported.
|
|
174
|
+
*/
|
|
175
|
+
include: RegExp
|
|
176
|
+
/** JavaScript `RegExp` excluding property names selected by `include`. */
|
|
177
|
+
exclude?: RegExp
|
|
178
|
+
/** Exact names that are neither mangled nor emitted as automatic output names. */
|
|
179
|
+
reserved?: Array<string>
|
|
180
|
+
/**
|
|
181
|
+
* Mangle quoted property occurrences in addition to unquoted occurrences.
|
|
182
|
+
*
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
quoted?: boolean
|
|
186
|
+
/**
|
|
187
|
+
* Generate readable `_$name$_`-style output names.
|
|
188
|
+
*
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
debug?: boolean
|
|
192
|
+
/**
|
|
193
|
+
* Stable mappings from original names to output names. `false` reserves an original name.
|
|
194
|
+
* Entries that do not match `include`, or that match `exclude`, remain inert but are
|
|
195
|
+
* preserved in the returned `mangleCache`. String targets must be `IdentifierName` values
|
|
196
|
+
* other than `__proto__`, `constructor`, or `prototype`. The original name `__proto__` is
|
|
197
|
+
* always reserved and cannot be used as a cache key.
|
|
198
|
+
*/
|
|
199
|
+
cache?: Record<string, string | false>
|
|
200
|
+
}
|
|
201
|
+
|
|
170
202
|
/**
|
|
171
203
|
* Minify asynchronously.
|
|
172
204
|
*
|
|
@@ -179,6 +211,12 @@ export interface MinifyOptions {
|
|
|
179
211
|
module?: boolean
|
|
180
212
|
compress?: boolean | CompressOptions
|
|
181
213
|
mangle?: boolean | MangleOptions
|
|
214
|
+
/**
|
|
215
|
+
* Mangle matching property names independently of identifier mangling. Properties owned by
|
|
216
|
+
* unminified code, imported module namespaces, globals, or host APIs must be excluded or
|
|
217
|
+
* reserved.
|
|
218
|
+
*/
|
|
219
|
+
mangleProps?: ManglePropertiesOptions
|
|
182
220
|
codegen?: boolean | CodegenOptions
|
|
183
221
|
sourcemap?: boolean
|
|
184
222
|
}
|
|
@@ -192,6 +230,11 @@ export interface MinifyResult {
|
|
|
192
230
|
* Only populated when `codegen.legalComments` is `"linked"` or `"external"`.
|
|
193
231
|
*/
|
|
194
232
|
legalComments: Array<string>
|
|
233
|
+
/**
|
|
234
|
+
* Updated property-name cache sorted by original name. Present when `mangleProps` ran on a
|
|
235
|
+
* parse without errors.
|
|
236
|
+
*/
|
|
237
|
+
mangleCache?: Record<string, string | false>
|
|
195
238
|
}
|
|
196
239
|
|
|
197
240
|
/** Minify synchronously. */
|
package/minify.wasm32-wasi.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxc-minify/binding-wasm32-wasi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.145.0",
|
|
4
4
|
"main": "minify.wasi.cjs",
|
|
5
5
|
"files": [
|
|
6
6
|
"minify.wasm32-wasi.wasm",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"browser": "minify.wasi-browser.js",
|
|
41
41
|
"type": "module",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@napi-rs/wasm-runtime": "~1.2.
|
|
43
|
+
"@napi-rs/wasm-runtime": "~1.2.3",
|
|
44
44
|
"@emnapi/core": "2.0.0-alpha.3",
|
|
45
45
|
"@emnapi/runtime": "2.0.0-alpha.3"
|
|
46
46
|
}
|