oxc-transform-relay 0.151.0 → 0.152.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/browser.js +1 -1
- package/index.d.ts +34 -1
- package/index.js +103 -55
- package/package.json +54 -23
- package/transform-relay.wasm32-wasip1.wasm +0 -0
- package/transform-relay.wasm32-wasip1.wasm.d.mts +6 -0
- package/transform-relay.wasm32-wasip1.workerd.d.mts +2 -0
- package/transform-relay.wasm32-wasip1.workerd.mjs +2 -0
package/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@oxc-transform-relay/binding-wasm32-
|
|
1
|
+
export * from '@oxc-transform-relay/binding-wasm32-wasip1'
|
package/index.d.ts
CHANGED
|
@@ -36,6 +36,39 @@ export declare const enum Severity {
|
|
|
36
36
|
Advice = 'Advice',
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/** See <https://tc39.es/ecma426/#sec-source-map-format>. */
|
|
40
|
+
export interface JSONSourceMap {
|
|
41
|
+
/** The version field, must be 3. */
|
|
42
|
+
version: number
|
|
43
|
+
/** An optional name of the generated code that this source map is associated with. */
|
|
44
|
+
file?: string
|
|
45
|
+
/** A string with the encoded mapping data. */
|
|
46
|
+
mappings: string
|
|
47
|
+
/**
|
|
48
|
+
* An optional source root, useful for relocating source files on a server or removing repeated values in the "sources" entry.
|
|
49
|
+
* This value is prepended to the individual entries in the "source" field.
|
|
50
|
+
*/
|
|
51
|
+
sourceRoot?: string
|
|
52
|
+
/** A list of original sources used by the "mappings" entry. */
|
|
53
|
+
sources: Array<string>
|
|
54
|
+
/**
|
|
55
|
+
* An optional list of source content, useful when the "source" can't be hosted.
|
|
56
|
+
* The contents are listed in the same order as the sources in line 5. "null" may be used if some original sources should be retrieved by name.
|
|
57
|
+
*/
|
|
58
|
+
sourcesContent?: Array<string | undefined | null>
|
|
59
|
+
/** A list of symbol names used by the "mappings" entry. */
|
|
60
|
+
names: Array<string>
|
|
61
|
+
/** An optional field containing the debugId for this sourcemap. */
|
|
62
|
+
debugId?: string
|
|
63
|
+
/**
|
|
64
|
+
* Identifies third-party sources (such as framework code or bundler-generated code), allowing developers to avoid code that they don't want to see or step through, without having to configure this beforehand.
|
|
65
|
+
* The `ignoreList` field refers to the `sources` array, and lists the indices of all the known third-party sources in that source map.
|
|
66
|
+
* When parsing the source map, developer tools can use this to determine sections of the code that the browser loads and runs that could be automatically ignore-listed.
|
|
67
|
+
* JSON input falls back to the deprecated `x_google_ignoreList` when `ignoreList` is missing or null.
|
|
68
|
+
*/
|
|
69
|
+
ignoreList?: Array<number>
|
|
70
|
+
}
|
|
71
|
+
|
|
39
72
|
export interface SourceMap {
|
|
40
73
|
file?: string
|
|
41
74
|
mappings: string
|
|
@@ -44,7 +77,7 @@ export interface SourceMap {
|
|
|
44
77
|
sources: Array<string>
|
|
45
78
|
sourcesContent?: Array<string>
|
|
46
79
|
version: number
|
|
47
|
-
|
|
80
|
+
ignoreList?: Array<number>
|
|
48
81
|
}
|
|
49
82
|
|
|
50
83
|
/**
|
package/index.js
CHANGED
|
@@ -92,8 +92,8 @@ function requireNative() {
|
|
|
92
92
|
try {
|
|
93
93
|
const binding = require('@oxc-transform-relay/binding-android-arm64')
|
|
94
94
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-android-arm64/package.json').version
|
|
95
|
-
if (bindingPackageVersion !== '0.
|
|
96
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
95
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
96
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
97
97
|
}
|
|
98
98
|
return binding
|
|
99
99
|
} catch (e) {
|
|
@@ -108,8 +108,8 @@ function requireNative() {
|
|
|
108
108
|
try {
|
|
109
109
|
const binding = require('@oxc-transform-relay/binding-android-arm-eabi')
|
|
110
110
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-android-arm-eabi/package.json').version
|
|
111
|
-
if (bindingPackageVersion !== '0.
|
|
112
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
111
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
112
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
113
113
|
}
|
|
114
114
|
return binding
|
|
115
115
|
} catch (e) {
|
|
@@ -129,8 +129,8 @@ function requireNative() {
|
|
|
129
129
|
try {
|
|
130
130
|
const binding = require('@oxc-transform-relay/binding-win32-x64-gnu')
|
|
131
131
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-win32-x64-gnu/package.json').version
|
|
132
|
-
if (bindingPackageVersion !== '0.
|
|
133
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
132
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
133
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
134
134
|
}
|
|
135
135
|
return binding
|
|
136
136
|
} catch (e) {
|
|
@@ -145,8 +145,8 @@ function requireNative() {
|
|
|
145
145
|
try {
|
|
146
146
|
const binding = require('@oxc-transform-relay/binding-win32-x64-msvc')
|
|
147
147
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-win32-x64-msvc/package.json').version
|
|
148
|
-
if (bindingPackageVersion !== '0.
|
|
149
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
148
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
149
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
150
150
|
}
|
|
151
151
|
return binding
|
|
152
152
|
} catch (e) {
|
|
@@ -162,8 +162,8 @@ function requireNative() {
|
|
|
162
162
|
try {
|
|
163
163
|
const binding = require('@oxc-transform-relay/binding-win32-ia32-msvc')
|
|
164
164
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-win32-ia32-msvc/package.json').version
|
|
165
|
-
if (bindingPackageVersion !== '0.
|
|
166
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
165
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
166
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
167
167
|
}
|
|
168
168
|
return binding
|
|
169
169
|
} catch (e) {
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@oxc-transform-relay/binding-win32-arm64-msvc')
|
|
180
180
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-win32-arm64-msvc/package.json').version
|
|
181
|
-
if (bindingPackageVersion !== '0.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
181
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
183
183
|
}
|
|
184
184
|
return binding
|
|
185
185
|
} catch (e) {
|
|
@@ -197,8 +197,8 @@ function requireNative() {
|
|
|
197
197
|
try {
|
|
198
198
|
const binding = require('@oxc-transform-relay/binding-darwin-universal')
|
|
199
199
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-darwin-universal/package.json').version
|
|
200
|
-
if (bindingPackageVersion !== '0.
|
|
201
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
200
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
201
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
202
202
|
}
|
|
203
203
|
return binding
|
|
204
204
|
} catch (e) {
|
|
@@ -213,8 +213,8 @@ function requireNative() {
|
|
|
213
213
|
try {
|
|
214
214
|
const binding = require('@oxc-transform-relay/binding-darwin-x64')
|
|
215
215
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-darwin-x64/package.json').version
|
|
216
|
-
if (bindingPackageVersion !== '0.
|
|
217
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
216
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
217
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
218
218
|
}
|
|
219
219
|
return binding
|
|
220
220
|
} catch (e) {
|
|
@@ -229,8 +229,8 @@ function requireNative() {
|
|
|
229
229
|
try {
|
|
230
230
|
const binding = require('@oxc-transform-relay/binding-darwin-arm64')
|
|
231
231
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-darwin-arm64/package.json').version
|
|
232
|
-
if (bindingPackageVersion !== '0.
|
|
233
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
232
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
233
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
234
234
|
}
|
|
235
235
|
return binding
|
|
236
236
|
} catch (e) {
|
|
@@ -249,8 +249,8 @@ function requireNative() {
|
|
|
249
249
|
try {
|
|
250
250
|
const binding = require('@oxc-transform-relay/binding-freebsd-x64')
|
|
251
251
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-freebsd-x64/package.json').version
|
|
252
|
-
if (bindingPackageVersion !== '0.
|
|
253
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
252
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
253
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
254
254
|
}
|
|
255
255
|
return binding
|
|
256
256
|
} catch (e) {
|
|
@@ -265,8 +265,8 @@ function requireNative() {
|
|
|
265
265
|
try {
|
|
266
266
|
const binding = require('@oxc-transform-relay/binding-freebsd-arm64')
|
|
267
267
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-freebsd-arm64/package.json').version
|
|
268
|
-
if (bindingPackageVersion !== '0.
|
|
269
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
268
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
269
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
270
270
|
}
|
|
271
271
|
return binding
|
|
272
272
|
} catch (e) {
|
|
@@ -286,8 +286,8 @@ function requireNative() {
|
|
|
286
286
|
try {
|
|
287
287
|
const binding = require('@oxc-transform-relay/binding-linux-x64-musl')
|
|
288
288
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-x64-musl/package.json').version
|
|
289
|
-
if (bindingPackageVersion !== '0.
|
|
290
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
289
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
291
291
|
}
|
|
292
292
|
return binding
|
|
293
293
|
} catch (e) {
|
|
@@ -302,8 +302,8 @@ function requireNative() {
|
|
|
302
302
|
try {
|
|
303
303
|
const binding = require('@oxc-transform-relay/binding-linux-x64-gnu')
|
|
304
304
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-x64-gnu/package.json').version
|
|
305
|
-
if (bindingPackageVersion !== '0.
|
|
306
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
305
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
306
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
307
307
|
}
|
|
308
308
|
return binding
|
|
309
309
|
} catch (e) {
|
|
@@ -320,8 +320,8 @@ function requireNative() {
|
|
|
320
320
|
try {
|
|
321
321
|
const binding = require('@oxc-transform-relay/binding-linux-arm64-musl')
|
|
322
322
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-arm64-musl/package.json').version
|
|
323
|
-
if (bindingPackageVersion !== '0.
|
|
324
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
323
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
325
325
|
}
|
|
326
326
|
return binding
|
|
327
327
|
} catch (e) {
|
|
@@ -336,8 +336,8 @@ function requireNative() {
|
|
|
336
336
|
try {
|
|
337
337
|
const binding = require('@oxc-transform-relay/binding-linux-arm64-gnu')
|
|
338
338
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-arm64-gnu/package.json').version
|
|
339
|
-
if (bindingPackageVersion !== '0.
|
|
340
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
339
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
340
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
341
341
|
}
|
|
342
342
|
return binding
|
|
343
343
|
} catch (e) {
|
|
@@ -354,8 +354,8 @@ function requireNative() {
|
|
|
354
354
|
try {
|
|
355
355
|
const binding = require('@oxc-transform-relay/binding-linux-arm-musleabihf')
|
|
356
356
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-arm-musleabihf/package.json').version
|
|
357
|
-
if (bindingPackageVersion !== '0.
|
|
358
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
357
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
359
359
|
}
|
|
360
360
|
return binding
|
|
361
361
|
} catch (e) {
|
|
@@ -370,8 +370,8 @@ function requireNative() {
|
|
|
370
370
|
try {
|
|
371
371
|
const binding = require('@oxc-transform-relay/binding-linux-arm-gnueabihf')
|
|
372
372
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-arm-gnueabihf/package.json').version
|
|
373
|
-
if (bindingPackageVersion !== '0.
|
|
374
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
373
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
374
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
375
375
|
}
|
|
376
376
|
return binding
|
|
377
377
|
} catch (e) {
|
|
@@ -388,8 +388,8 @@ function requireNative() {
|
|
|
388
388
|
try {
|
|
389
389
|
const binding = require('@oxc-transform-relay/binding-linux-loong64-musl')
|
|
390
390
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-loong64-musl/package.json').version
|
|
391
|
-
if (bindingPackageVersion !== '0.
|
|
392
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
391
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
393
393
|
}
|
|
394
394
|
return binding
|
|
395
395
|
} catch (e) {
|
|
@@ -404,8 +404,8 @@ function requireNative() {
|
|
|
404
404
|
try {
|
|
405
405
|
const binding = require('@oxc-transform-relay/binding-linux-loong64-gnu')
|
|
406
406
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-loong64-gnu/package.json').version
|
|
407
|
-
if (bindingPackageVersion !== '0.
|
|
408
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
407
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
408
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
409
409
|
}
|
|
410
410
|
return binding
|
|
411
411
|
} catch (e) {
|
|
@@ -422,8 +422,8 @@ function requireNative() {
|
|
|
422
422
|
try {
|
|
423
423
|
const binding = require('@oxc-transform-relay/binding-linux-riscv64-musl')
|
|
424
424
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-riscv64-musl/package.json').version
|
|
425
|
-
if (bindingPackageVersion !== '0.
|
|
426
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
425
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
427
427
|
}
|
|
428
428
|
return binding
|
|
429
429
|
} catch (e) {
|
|
@@ -438,8 +438,8 @@ function requireNative() {
|
|
|
438
438
|
try {
|
|
439
439
|
const binding = require('@oxc-transform-relay/binding-linux-riscv64-gnu')
|
|
440
440
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-riscv64-gnu/package.json').version
|
|
441
|
-
if (bindingPackageVersion !== '0.
|
|
442
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
441
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
442
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
443
443
|
}
|
|
444
444
|
return binding
|
|
445
445
|
} catch (e) {
|
|
@@ -455,8 +455,8 @@ function requireNative() {
|
|
|
455
455
|
try {
|
|
456
456
|
const binding = require('@oxc-transform-relay/binding-linux-ppc64-gnu')
|
|
457
457
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-ppc64-gnu/package.json').version
|
|
458
|
-
if (bindingPackageVersion !== '0.
|
|
459
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
458
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
459
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
460
460
|
}
|
|
461
461
|
return binding
|
|
462
462
|
} catch (e) {
|
|
@@ -471,8 +471,8 @@ function requireNative() {
|
|
|
471
471
|
try {
|
|
472
472
|
const binding = require('@oxc-transform-relay/binding-linux-s390x-gnu')
|
|
473
473
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-linux-s390x-gnu/package.json').version
|
|
474
|
-
if (bindingPackageVersion !== '0.
|
|
475
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
474
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
475
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
476
476
|
}
|
|
477
477
|
return binding
|
|
478
478
|
} catch (e) {
|
|
@@ -491,8 +491,8 @@ function requireNative() {
|
|
|
491
491
|
try {
|
|
492
492
|
const binding = require('@oxc-transform-relay/binding-openharmony-arm64')
|
|
493
493
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-openharmony-arm64/package.json').version
|
|
494
|
-
if (bindingPackageVersion !== '0.
|
|
495
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
494
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
495
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
496
496
|
}
|
|
497
497
|
return binding
|
|
498
498
|
} catch (e) {
|
|
@@ -507,8 +507,8 @@ function requireNative() {
|
|
|
507
507
|
try {
|
|
508
508
|
const binding = require('@oxc-transform-relay/binding-openharmony-x64')
|
|
509
509
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-openharmony-x64/package.json').version
|
|
510
|
-
if (bindingPackageVersion !== '0.
|
|
511
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
510
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
511
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
512
512
|
}
|
|
513
513
|
return binding
|
|
514
514
|
} catch (e) {
|
|
@@ -523,8 +523,8 @@ function requireNative() {
|
|
|
523
523
|
try {
|
|
524
524
|
const binding = require('@oxc-transform-relay/binding-openharmony-arm')
|
|
525
525
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-openharmony-arm/package.json').version
|
|
526
|
-
if (bindingPackageVersion !== '0.
|
|
527
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
526
|
+
if (bindingPackageVersion !== '0.152.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
527
|
+
throw new Error(`Native binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
528
528
|
}
|
|
529
529
|
return binding
|
|
530
530
|
} catch (e) {
|
|
@@ -565,7 +565,7 @@ function createLoadErrorChain(errors) {
|
|
|
565
565
|
//
|
|
566
566
|
// NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
|
|
567
567
|
// WASI loading. It never crosses into another flavor or falls back to native.
|
|
568
|
-
const __napiWasiFlavors = ['wasm32-wasi']
|
|
568
|
+
const __napiWasiFlavors = ['wasm32-wasi', 'wasm32-wasip1']
|
|
569
569
|
const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
|
|
570
570
|
const __napiWasiFlavorRequested =
|
|
571
571
|
typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
|
|
@@ -655,6 +655,27 @@ if (!nativeBinding || forceWasi) {
|
|
|
655
655
|
loadErrors.push(candidateError)
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasip1')) {
|
|
659
|
+
let candidateError = null
|
|
660
|
+
let candidateFailed = false
|
|
661
|
+
try {
|
|
662
|
+
candidateError = __napiWasiResolveCandidate('./transform-relay.wasip1.cjs', false, ['./transform-relay.wasm32-wasip1.debug.wasm', './transform-relay.wasm32-wasip1.wasm'])
|
|
663
|
+
candidateFailed = candidateError !== null
|
|
664
|
+
if (!candidateFailed) {
|
|
665
|
+
wasiBinding = require('./transform-relay.wasip1.cjs')
|
|
666
|
+
nativeBinding = wasiBinding
|
|
667
|
+
__napiLoadedBindingTarget = 'wasm32-wasip1'
|
|
668
|
+
wasiBindingLoaded = true
|
|
669
|
+
}
|
|
670
|
+
} catch (err) {
|
|
671
|
+
candidateError = err
|
|
672
|
+
candidateFailed = true
|
|
673
|
+
}
|
|
674
|
+
if (candidateFailed) {
|
|
675
|
+
wasiBindingErrors.push(candidateError)
|
|
676
|
+
loadErrors.push(candidateError)
|
|
677
|
+
}
|
|
678
|
+
}
|
|
658
679
|
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
659
680
|
let candidateError = null
|
|
660
681
|
let candidateFailed = false
|
|
@@ -664,8 +685,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
664
685
|
if (!candidateFailed) {
|
|
665
686
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
666
687
|
const bindingPackageVersion = require('@oxc-transform-relay/binding-wasm32-wasi/package.json').version
|
|
667
|
-
if (bindingPackageVersion !== '0.
|
|
668
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
688
|
+
if (bindingPackageVersion !== '0.152.0') {
|
|
689
|
+
throw new Error(`WASI binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
669
690
|
}
|
|
670
691
|
}
|
|
671
692
|
wasiBinding = require('@oxc-transform-relay/binding-wasm32-wasi')
|
|
@@ -682,6 +703,33 @@ if (!nativeBinding || forceWasi) {
|
|
|
682
703
|
loadErrors.push(candidateError)
|
|
683
704
|
}
|
|
684
705
|
}
|
|
706
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasip1')) {
|
|
707
|
+
let candidateError = null
|
|
708
|
+
let candidateFailed = false
|
|
709
|
+
try {
|
|
710
|
+
candidateError = __napiWasiResolveCandidate('@oxc-transform-relay/binding-wasm32-wasip1', true, undefined)
|
|
711
|
+
candidateFailed = candidateError !== null
|
|
712
|
+
if (!candidateFailed) {
|
|
713
|
+
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
714
|
+
const bindingPackageVersion = require('@oxc-transform-relay/binding-wasm32-wasip1/package.json').version
|
|
715
|
+
if (bindingPackageVersion !== '0.152.0') {
|
|
716
|
+
throw new Error(`WASI binding package version mismatch, expected 0.152.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
wasiBinding = require('@oxc-transform-relay/binding-wasm32-wasip1')
|
|
720
|
+
nativeBinding = wasiBinding
|
|
721
|
+
__napiLoadedBindingTarget = 'wasm32-wasip1'
|
|
722
|
+
wasiBindingLoaded = true
|
|
723
|
+
}
|
|
724
|
+
} catch (err) {
|
|
725
|
+
candidateError = err
|
|
726
|
+
candidateFailed = true
|
|
727
|
+
}
|
|
728
|
+
if (candidateFailed) {
|
|
729
|
+
wasiBindingErrors.push(candidateError)
|
|
730
|
+
loadErrors.push(candidateError)
|
|
731
|
+
}
|
|
732
|
+
}
|
|
685
733
|
if (
|
|
686
734
|
!wasiBindingLoaded &&
|
|
687
735
|
forceWasi &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-transform-relay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.152.0",
|
|
4
4
|
"description": "Oxc Relay Transform Node API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -26,7 +26,11 @@
|
|
|
26
26
|
"browser.js",
|
|
27
27
|
"index.d.ts",
|
|
28
28
|
"index.js",
|
|
29
|
-
"webcontainer-fallback.cjs"
|
|
29
|
+
"webcontainer-fallback.cjs",
|
|
30
|
+
"transform-relay.wasm32-wasip1.workerd.mjs",
|
|
31
|
+
"transform-relay.wasm32-wasip1.workerd.d.mts",
|
|
32
|
+
"transform-relay.wasm32-wasip1.wasm",
|
|
33
|
+
"transform-relay.wasm32-wasip1.wasm.d.mts"
|
|
30
34
|
],
|
|
31
35
|
"type": "module",
|
|
32
36
|
"sideEffects": false,
|
|
@@ -39,10 +43,10 @@
|
|
|
39
43
|
"devDependencies": {
|
|
40
44
|
"@emnapi/core": "2.0.0-alpha.3",
|
|
41
45
|
"@emnapi/runtime": "2.0.0-alpha.3",
|
|
42
|
-
"@napi-rs/cli": "3.10.
|
|
46
|
+
"@napi-rs/cli": "3.10.5",
|
|
43
47
|
"@types/node": "24.1.0",
|
|
44
48
|
"publint": "0.3.24",
|
|
45
|
-
"vitest": "5.0.
|
|
49
|
+
"vitest": "5.0.1"
|
|
46
50
|
},
|
|
47
51
|
"napi": {
|
|
48
52
|
"binaryName": "transform-relay",
|
|
@@ -62,6 +66,7 @@
|
|
|
62
66
|
"riscv64gc-unknown-linux-gnu",
|
|
63
67
|
"riscv64gc-unknown-linux-musl",
|
|
64
68
|
"s390x-unknown-linux-gnu",
|
|
69
|
+
"wasm32-wasip1",
|
|
65
70
|
"wasm32-wasip1-threads",
|
|
66
71
|
"x86_64-apple-darwin",
|
|
67
72
|
"x86_64-pc-windows-msvc",
|
|
@@ -79,25 +84,49 @@
|
|
|
79
84
|
"node": "^20.19.0 || >=22.12.0"
|
|
80
85
|
},
|
|
81
86
|
"optionalDependencies": {
|
|
82
|
-
"@oxc-transform-relay/binding-darwin-arm64": "0.
|
|
83
|
-
"@oxc-transform-relay/binding-android-arm64": "0.
|
|
84
|
-
"@oxc-transform-relay/binding-win32-arm64-msvc": "0.
|
|
85
|
-
"@oxc-transform-relay/binding-linux-arm64-gnu": "0.
|
|
86
|
-
"@oxc-transform-relay/binding-linux-arm64-musl": "0.
|
|
87
|
-
"@oxc-transform-relay/binding-openharmony-arm64": "0.
|
|
88
|
-
"@oxc-transform-relay/binding-android-arm-eabi": "0.
|
|
89
|
-
"@oxc-transform-relay/binding-linux-arm-gnueabihf": "0.
|
|
90
|
-
"@oxc-transform-relay/binding-linux-arm-musleabihf": "0.
|
|
91
|
-
"@oxc-transform-relay/binding-win32-ia32-msvc": "0.
|
|
92
|
-
"@oxc-transform-relay/binding-linux-ppc64-gnu": "0.
|
|
93
|
-
"@oxc-transform-relay/binding-linux-riscv64-gnu": "0.
|
|
94
|
-
"@oxc-transform-relay/binding-linux-riscv64-musl": "0.
|
|
95
|
-
"@oxc-transform-relay/binding-linux-s390x-gnu": "0.
|
|
96
|
-
"@oxc-transform-relay/binding-darwin-x64": "0.
|
|
97
|
-
"@oxc-transform-relay/binding-win32-x64-msvc": "0.
|
|
98
|
-
"@oxc-transform-relay/binding-freebsd-x64": "0.
|
|
99
|
-
"@oxc-transform-relay/binding-linux-x64-gnu": "0.
|
|
100
|
-
"@oxc-transform-relay/binding-linux-x64-musl": "0.
|
|
87
|
+
"@oxc-transform-relay/binding-darwin-arm64": "0.152.0",
|
|
88
|
+
"@oxc-transform-relay/binding-android-arm64": "0.152.0",
|
|
89
|
+
"@oxc-transform-relay/binding-win32-arm64-msvc": "0.152.0",
|
|
90
|
+
"@oxc-transform-relay/binding-linux-arm64-gnu": "0.152.0",
|
|
91
|
+
"@oxc-transform-relay/binding-linux-arm64-musl": "0.152.0",
|
|
92
|
+
"@oxc-transform-relay/binding-openharmony-arm64": "0.152.0",
|
|
93
|
+
"@oxc-transform-relay/binding-android-arm-eabi": "0.152.0",
|
|
94
|
+
"@oxc-transform-relay/binding-linux-arm-gnueabihf": "0.152.0",
|
|
95
|
+
"@oxc-transform-relay/binding-linux-arm-musleabihf": "0.152.0",
|
|
96
|
+
"@oxc-transform-relay/binding-win32-ia32-msvc": "0.152.0",
|
|
97
|
+
"@oxc-transform-relay/binding-linux-ppc64-gnu": "0.152.0",
|
|
98
|
+
"@oxc-transform-relay/binding-linux-riscv64-gnu": "0.152.0",
|
|
99
|
+
"@oxc-transform-relay/binding-linux-riscv64-musl": "0.152.0",
|
|
100
|
+
"@oxc-transform-relay/binding-linux-s390x-gnu": "0.152.0",
|
|
101
|
+
"@oxc-transform-relay/binding-darwin-x64": "0.152.0",
|
|
102
|
+
"@oxc-transform-relay/binding-win32-x64-msvc": "0.152.0",
|
|
103
|
+
"@oxc-transform-relay/binding-freebsd-x64": "0.152.0",
|
|
104
|
+
"@oxc-transform-relay/binding-linux-x64-gnu": "0.152.0",
|
|
105
|
+
"@oxc-transform-relay/binding-linux-x64-musl": "0.152.0"
|
|
106
|
+
},
|
|
107
|
+
"exports": {
|
|
108
|
+
".": {
|
|
109
|
+
"browser": "./browser.js",
|
|
110
|
+
"import": "./index.js",
|
|
111
|
+
"node": "./index.js",
|
|
112
|
+
"default": "./index.js"
|
|
113
|
+
},
|
|
114
|
+
"./*": "./*",
|
|
115
|
+
"./browser": "./browser.js",
|
|
116
|
+
"./index": "./index.js",
|
|
117
|
+
"./package": "./package.json",
|
|
118
|
+
"./workerd": {
|
|
119
|
+
"types": "./transform-relay.wasm32-wasip1.workerd.d.mts",
|
|
120
|
+
"default": "./transform-relay.wasm32-wasip1.workerd.mjs"
|
|
121
|
+
},
|
|
122
|
+
"./wasm": {
|
|
123
|
+
"types": "./transform-relay.wasm32-wasip1.wasm.d.mts",
|
|
124
|
+
"default": "./transform-relay.wasm32-wasip1.wasm"
|
|
125
|
+
},
|
|
126
|
+
"./wasm.wasm": {
|
|
127
|
+
"types": "./transform-relay.wasm32-wasip1.wasm.d.mts",
|
|
128
|
+
"default": "./transform-relay.wasm32-wasip1.wasm"
|
|
129
|
+
}
|
|
101
130
|
},
|
|
102
131
|
"scripts": {
|
|
103
132
|
"build-dev": "napi build --esm --platform",
|
|
@@ -107,6 +136,8 @@
|
|
|
107
136
|
"postbuild-dev": "node scripts/patch.js",
|
|
108
137
|
"build-wasm": "pnpm run build-wasm-dev --release",
|
|
109
138
|
"build-wasm-dev": "pnpm run build-dev --target wasm32-wasip1-threads --dts transform-relay.wasi.d.cts",
|
|
139
|
+
"build-wasip1": "pnpm run build-wasip1-dev --release",
|
|
140
|
+
"build-wasip1-dev": "pnpm run build-dev --target wasm32-wasip1 --dts transform-relay.wasip1.d.cts",
|
|
110
141
|
"test": "vitest run --dir ./test"
|
|
111
142
|
}
|
|
112
143
|
}
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// napi-rs-wasi-root-facade:{"version":1,"flavorPackage":"@oxc-transform-relay/binding-wasm32-wasip1","wasmSha256":"f7581b8e02682252f2ba279277d32081599391098f5aad3008dc527e4d9795f7"}
|
|
2
|
+
/* auto-generated by NAPI-RS */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
declare const wasmModule: WebAssembly.Module
|
|
6
|
+
export default wasmModule
|