@tailwindcss/oxide 0.0.0-insiders.de6b54c → 0.0.0-insiders.de9e71c

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/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export declare class Scanner {
6
6
  scanFiles(input: Array<ChangedContent>): Array<string>
7
7
  getCandidatesWithPositions(input: ChangedContent): Array<CandidateWithPosition>
8
8
  get files(): Array<string>
9
+ get scannedFiles(): Array<string>
9
10
  get globs(): Array<GlobEntry>
10
11
  get normalizedSources(): Array<GlobEntry>
11
12
  }
package/index.js CHANGED
@@ -3,10 +3,7 @@
3
3
  // @ts-nocheck
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- const { createRequire } = require('node:module')
7
- require = createRequire(__filename)
8
-
9
- const { readFileSync } = require('node:fs')
6
+ const { readFileSync } = require('fs')
10
7
  let nativeBinding = null
11
8
  const loadErrors = []
12
9
 
@@ -36,7 +33,7 @@ const isMuslFromFilesystem = () => {
36
33
 
37
34
  const isMuslFromReport = () => {
38
35
  let report = null
39
- if (typeof process.report?.getReport === 'function') {
36
+ if (process.report && typeof process.report.getReport === 'function') {
40
37
  process.report.excludeNetwork = true
41
38
  report = process.report.getReport()
42
39
  }
@@ -80,8 +77,8 @@ function requireNative() {
80
77
  try {
81
78
  const binding = require('@tailwindcss/oxide-android-arm64')
82
79
  const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version
83
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
84
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
82
  }
86
83
  return binding
87
84
  } catch (e) {
@@ -96,8 +93,8 @@ function requireNative() {
96
93
  try {
97
94
  const binding = require('@tailwindcss/oxide-android-arm-eabi')
98
95
  const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version
99
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
100
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
98
  }
102
99
  return binding
103
100
  } catch (e) {
@@ -108,7 +105,7 @@ function requireNative() {
108
105
  }
109
106
  } else if (process.platform === 'win32') {
110
107
  if (process.arch === 'x64') {
111
- if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
108
+ if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
112
109
  try {
113
110
  return require('./tailwindcss-oxide.win32-x64-gnu.node')
114
111
  } catch (e) {
@@ -117,8 +114,8 @@ function requireNative() {
117
114
  try {
118
115
  const binding = require('@tailwindcss/oxide-win32-x64-gnu')
119
116
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version
120
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
121
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
119
  }
123
120
  return binding
124
121
  } catch (e) {
@@ -133,8 +130,8 @@ function requireNative() {
133
130
  try {
134
131
  const binding = require('@tailwindcss/oxide-win32-x64-msvc')
135
132
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version
136
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
137
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
135
  }
139
136
  return binding
140
137
  } catch (e) {
@@ -150,8 +147,8 @@ function requireNative() {
150
147
  try {
151
148
  const binding = require('@tailwindcss/oxide-win32-ia32-msvc')
152
149
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version
153
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
154
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
152
  }
156
153
  return binding
157
154
  } catch (e) {
@@ -166,8 +163,8 @@ function requireNative() {
166
163
  try {
167
164
  const binding = require('@tailwindcss/oxide-win32-arm64-msvc')
168
165
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version
169
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
170
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
168
  }
172
169
  return binding
173
170
  } catch (e) {
@@ -185,8 +182,8 @@ function requireNative() {
185
182
  try {
186
183
  const binding = require('@tailwindcss/oxide-darwin-universal')
187
184
  const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version
188
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
189
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
187
  }
191
188
  return binding
192
189
  } catch (e) {
@@ -201,8 +198,8 @@ function requireNative() {
201
198
  try {
202
199
  const binding = require('@tailwindcss/oxide-darwin-x64')
203
200
  const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version
204
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
203
  }
207
204
  return binding
208
205
  } catch (e) {
@@ -217,8 +214,8 @@ function requireNative() {
217
214
  try {
218
215
  const binding = require('@tailwindcss/oxide-darwin-arm64')
219
216
  const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version
220
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
221
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
219
  }
223
220
  return binding
224
221
  } catch (e) {
@@ -237,8 +234,8 @@ function requireNative() {
237
234
  try {
238
235
  const binding = require('@tailwindcss/oxide-freebsd-x64')
239
236
  const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version
240
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
241
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
239
  }
243
240
  return binding
244
241
  } catch (e) {
@@ -253,8 +250,8 @@ function requireNative() {
253
250
  try {
254
251
  const binding = require('@tailwindcss/oxide-freebsd-arm64')
255
252
  const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version
256
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
257
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
255
  }
259
256
  return binding
260
257
  } catch (e) {
@@ -274,8 +271,8 @@ function requireNative() {
274
271
  try {
275
272
  const binding = require('@tailwindcss/oxide-linux-x64-musl')
276
273
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version
277
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
278
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
276
  }
280
277
  return binding
281
278
  } catch (e) {
@@ -290,8 +287,8 @@ function requireNative() {
290
287
  try {
291
288
  const binding = require('@tailwindcss/oxide-linux-x64-gnu')
292
289
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version
293
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
294
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
292
  }
296
293
  return binding
297
294
  } catch (e) {
@@ -308,8 +305,8 @@ function requireNative() {
308
305
  try {
309
306
  const binding = require('@tailwindcss/oxide-linux-arm64-musl')
310
307
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version
311
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
312
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
310
  }
314
311
  return binding
315
312
  } catch (e) {
@@ -324,8 +321,8 @@ function requireNative() {
324
321
  try {
325
322
  const binding = require('@tailwindcss/oxide-linux-arm64-gnu')
326
323
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version
327
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
328
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
326
  }
330
327
  return binding
331
328
  } catch (e) {
@@ -342,8 +339,8 @@ function requireNative() {
342
339
  try {
343
340
  const binding = require('@tailwindcss/oxide-linux-arm-musleabihf')
344
341
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version
345
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
346
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
344
  }
348
345
  return binding
349
346
  } catch (e) {
@@ -358,8 +355,8 @@ function requireNative() {
358
355
  try {
359
356
  const binding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
360
357
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version
361
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
362
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
360
  }
364
361
  return binding
365
362
  } catch (e) {
@@ -376,8 +373,8 @@ function requireNative() {
376
373
  try {
377
374
  const binding = require('@tailwindcss/oxide-linux-loong64-musl')
378
375
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version
379
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
380
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
378
  }
382
379
  return binding
383
380
  } catch (e) {
@@ -392,8 +389,8 @@ function requireNative() {
392
389
  try {
393
390
  const binding = require('@tailwindcss/oxide-linux-loong64-gnu')
394
391
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version
395
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
396
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
394
  }
398
395
  return binding
399
396
  } catch (e) {
@@ -410,8 +407,8 @@ function requireNative() {
410
407
  try {
411
408
  const binding = require('@tailwindcss/oxide-linux-riscv64-musl')
412
409
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version
413
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
414
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
412
  }
416
413
  return binding
417
414
  } catch (e) {
@@ -426,8 +423,8 @@ function requireNative() {
426
423
  try {
427
424
  const binding = require('@tailwindcss/oxide-linux-riscv64-gnu')
428
425
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version
429
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
428
  }
432
429
  return binding
433
430
  } catch (e) {
@@ -443,8 +440,8 @@ function requireNative() {
443
440
  try {
444
441
  const binding = require('@tailwindcss/oxide-linux-ppc64-gnu')
445
442
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version
446
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
447
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
445
  }
449
446
  return binding
450
447
  } catch (e) {
@@ -459,8 +456,8 @@ function requireNative() {
459
456
  try {
460
457
  const binding = require('@tailwindcss/oxide-linux-s390x-gnu')
461
458
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version
462
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
463
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
461
  }
465
462
  return binding
466
463
  } catch (e) {
@@ -479,8 +476,8 @@ function requireNative() {
479
476
  try {
480
477
  const binding = require('@tailwindcss/oxide-openharmony-arm64')
481
478
  const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version
482
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
483
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
481
  }
485
482
  return binding
486
483
  } catch (e) {
@@ -495,8 +492,8 @@ function requireNative() {
495
492
  try {
496
493
  const binding = require('@tailwindcss/oxide-openharmony-x64')
497
494
  const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version
498
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
499
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
497
  }
501
498
  return binding
502
499
  } catch (e) {
@@ -511,8 +508,8 @@ function requireNative() {
511
508
  try {
512
509
  const binding = require('@tailwindcss/oxide-openharmony-arm')
513
510
  const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version
514
- if (bindingPackageVersion !== '0.0.0-insiders.de6b54c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
515
- throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de6b54c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '0.0.0-insiders.de9e71c' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.de9e71c but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
513
  }
517
514
  return binding
518
515
  } catch (e) {
@@ -528,24 +525,38 @@ function requireNative() {
528
525
 
529
526
  nativeBinding = requireNative()
530
527
 
531
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
528
+ // NAPI_RS_FORCE_WASI is a tri-state flag:
529
+ // unset / any other value → native binding preferred, WASI is only a fallback
530
+ // 'true' → force WASI fallback even if native loaded
531
+ // 'error' → force WASI and throw if no WASI binding is found
532
+ // Treating any non-empty string as truthy (the historical behavior) meant
533
+ // NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
534
+ // the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
535
+ const forceWasi =
536
+ process.env.NAPI_RS_FORCE_WASI === 'true' || process.env.NAPI_RS_FORCE_WASI === 'error'
537
+
538
+ if (!nativeBinding || forceWasi) {
532
539
  let wasiBinding = null
533
540
  let wasiBindingError = null
534
541
  try {
535
542
  wasiBinding = require('./tailwindcss-oxide.wasi.cjs')
536
543
  nativeBinding = wasiBinding
537
544
  } catch (err) {
538
- if (process.env.NAPI_RS_FORCE_WASI) {
545
+ if (forceWasi) {
539
546
  wasiBindingError = err
540
547
  }
541
548
  }
542
- if (!nativeBinding) {
549
+ if (!nativeBinding || forceWasi) {
543
550
  try {
544
551
  wasiBinding = require('@tailwindcss/oxide-wasm32-wasi')
545
552
  nativeBinding = wasiBinding
546
553
  } catch (err) {
547
- if (process.env.NAPI_RS_FORCE_WASI) {
548
- wasiBindingError.cause = err
554
+ if (forceWasi) {
555
+ if (!wasiBindingError) {
556
+ wasiBindingError = err
557
+ } else {
558
+ wasiBindingError.cause = err
559
+ }
549
560
  loadErrors.push(err)
550
561
  }
551
562
  }
@@ -559,17 +570,18 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
559
570
 
560
571
  if (!nativeBinding) {
561
572
  if (loadErrors.length > 0) {
562
- throw new Error(
573
+ const error = new Error(
563
574
  `Cannot find native binding. ` +
564
575
  `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
565
576
  'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
566
- {
567
- cause: loadErrors.reduce((err, cur) => {
568
- cur.cause = err
569
- return cur
570
- }),
571
- },
572
577
  )
578
+ // assign instead of the `new Error(message, { cause })` options form,
579
+ // which Node < 16.9 silently ignores
580
+ error.cause = loadErrors.reduce((err, cur) => {
581
+ cur.cause = err
582
+ return cur
583
+ })
584
+ throw error
573
585
  }
574
586
  throw new Error(`Failed to load native binding`)
575
587
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailwindcss/oxide",
3
- "version": "0.0.0-insiders.de6b54c",
3
+ "version": "0.0.0-insiders.de9e71c",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/tailwindlabs/tailwindcss.git",
@@ -32,40 +32,37 @@
32
32
  }
33
33
  },
34
34
  "license": "MIT",
35
- "dependencies": {
36
- "tar": "^7.5.1",
37
- "detect-libc": "^2.0.4"
38
- },
39
35
  "devDependencies": {
40
- "@napi-rs/cli": "^3.3.0",
41
- "@napi-rs/wasm-runtime": "^1.0.5",
42
- "emnapi": "1.5.0"
36
+ "@emnapi/core": "1.11.3",
37
+ "@emnapi/runtime": "1.11.3",
38
+ "@napi-rs/cli": "3.7.4",
39
+ "@napi-rs/wasm-runtime": "^1.2.2",
40
+ "emnapi": "1.11.3"
43
41
  },
44
42
  "engines": {
45
- "node": ">= 10"
43
+ "node": ">= 20"
46
44
  },
47
45
  "files": [
48
46
  "index.js",
49
- "index.d.ts",
50
- "scripts/install.js"
47
+ "index.d.ts"
51
48
  ],
52
49
  "publishConfig": {
53
50
  "provenance": true,
54
51
  "access": "public"
55
52
  },
56
53
  "optionalDependencies": {
57
- "@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.de6b54c",
58
- "@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.de6b54c",
59
- "@tailwindcss/oxide-android-arm64": "0.0.0-insiders.de6b54c",
60
- "@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.de6b54c",
61
- "@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.de6b54c",
62
- "@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.de6b54c",
63
- "@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.de6b54c",
64
- "@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.de6b54c",
65
- "@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.de6b54c",
66
- "@tailwindcss/oxide-win32-arm64-msvc": "0.0.0-insiders.de6b54c",
67
- "@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.de6b54c",
68
- "@tailwindcss/oxide-wasm32-wasi": "0.0.0-insiders.de6b54c"
54
+ "@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.de9e71c",
55
+ "@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.de9e71c",
56
+ "@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.de9e71c",
57
+ "@tailwindcss/oxide-android-arm64": "0.0.0-insiders.de9e71c",
58
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.de9e71c",
59
+ "@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.de9e71c",
60
+ "@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.de9e71c",
61
+ "@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.de9e71c",
62
+ "@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.de9e71c",
63
+ "@tailwindcss/oxide-wasm32-wasi": "0.0.0-insiders.de9e71c",
64
+ "@tailwindcss/oxide-win32-arm64-msvc": "0.0.0-insiders.de9e71c",
65
+ "@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.de9e71c"
69
66
  },
70
67
  "scripts": {
71
68
  "build": "pnpm run build:platform && pnpm run build:wasm",
@@ -75,7 +72,6 @@
75
72
  "postbuild:wasm": "node ./scripts/move-artifacts.mjs",
76
73
  "dev": "cargo watch --quiet --shell 'npm run build'",
77
74
  "build:debug": "napi build --platform",
78
- "version": "napi version",
79
- "postinstall": "node ./scripts/install.js"
75
+ "version": "napi version"
80
76
  }
81
77
  }
@@ -1,143 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * @tailwindcss/oxide postinstall script
5
- *
6
- * This script ensures that the correct binary for the current platform and
7
- * architecture is downloaded and available.
8
- */
9
-
10
- const fs = require('fs')
11
- const path = require('path')
12
- const https = require('https')
13
- const { extract } = require('tar')
14
- const packageJson = require('../package.json')
15
- const detectLibc = require('detect-libc')
16
-
17
- const version = packageJson.version
18
-
19
- function getPlatformPackageName() {
20
- let platform = process.platform
21
- let arch = process.arch
22
-
23
- let libc = ''
24
- if (platform === 'linux') {
25
- libc = detectLibc.isNonGlibcLinuxSync() ? 'musl' : 'gnu'
26
- }
27
-
28
- // Map to our package naming conventions
29
- switch (platform) {
30
- case 'darwin':
31
- return arch === 'arm64' ? '@tailwindcss/oxide-darwin-arm64' : '@tailwindcss/oxide-darwin-x64'
32
- case 'win32':
33
- if (arch === 'arm64') return '@tailwindcss/oxide-win32-arm64-msvc'
34
- if (arch === 'ia32') return '@tailwindcss/oxide-win32-ia32-msvc'
35
- return '@tailwindcss/oxide-win32-x64-msvc'
36
- case 'linux':
37
- if (arch === 'x64') {
38
- return libc === 'musl'
39
- ? '@tailwindcss/oxide-linux-x64-musl'
40
- : '@tailwindcss/oxide-linux-x64-gnu'
41
- } else if (arch === 'arm64') {
42
- return libc === 'musl'
43
- ? '@tailwindcss/oxide-linux-arm64-musl'
44
- : '@tailwindcss/oxide-linux-arm64-gnu'
45
- } else if (arch === 'arm') {
46
- return '@tailwindcss/oxide-linux-arm-gnueabihf'
47
- }
48
- break
49
- case 'freebsd':
50
- return '@tailwindcss/oxide-freebsd-x64'
51
- case 'android':
52
- return '@tailwindcss/oxide-android-arm64'
53
- default:
54
- return '@tailwindcss/oxide-wasm32-wasi'
55
- }
56
- }
57
-
58
- function isPackageAvailable(packageName) {
59
- try {
60
- require.resolve(packageName)
61
- return true
62
- } catch (e) {
63
- return false
64
- }
65
- }
66
-
67
- // Extract all files from a tarball to a destination directory
68
- async function extractTarball(tarballStream, destDir) {
69
- if (!fs.existsSync(destDir)) {
70
- fs.mkdirSync(destDir, { recursive: true })
71
- }
72
-
73
- return new Promise((resolve, reject) => {
74
- tarballStream
75
- .pipe(extract({ cwd: destDir, strip: 1 }))
76
- .on('error', (err) => reject(err))
77
- .on('end', () => resolve())
78
- })
79
- }
80
-
81
- async function downloadAndExtractBinary(packageName) {
82
- let tarballUrl = `https://registry.npmjs.org/${packageName}/-/${packageName.replace('@tailwindcss/', '')}-${version}.tgz`
83
- console.log(`Downloading ${tarballUrl}...`)
84
-
85
- return new Promise((resolve) => {
86
- https
87
- .get(tarballUrl, (response) => {
88
- if (response.statusCode === 302 || response.statusCode === 301) {
89
- // Handle redirects
90
- https.get(response.headers.location, handleResponse).on('error', (err) => {
91
- console.error('Download error:', err)
92
- resolve()
93
- })
94
- return
95
- }
96
-
97
- handleResponse(response)
98
-
99
- async function handleResponse(response) {
100
- try {
101
- if (response.statusCode !== 200) {
102
- throw new Error(`Download failed with status code: ${response.statusCode}`)
103
- }
104
-
105
- await extractTarball(
106
- response,
107
- path.join(__dirname, '..', 'node_modules', ...packageName.split('/')),
108
- )
109
- console.log(`Successfully downloaded and installed ${packageName}`)
110
- } catch (error) {
111
- console.error('Error during extraction:', error)
112
- resolve()
113
- } finally {
114
- resolve()
115
- }
116
- }
117
- })
118
- .on('error', (err) => {
119
- console.error('Download error:', err)
120
- resolve()
121
- })
122
- })
123
- }
124
-
125
- async function main() {
126
- // Don't run this script in the package source
127
- try {
128
- if (fs.existsSync(path.join(__dirname, '..', 'build.rs'))) {
129
- return
130
- }
131
-
132
- let packageName = getPlatformPackageName()
133
- if (!packageName) return
134
- if (isPackageAvailable(packageName)) return
135
-
136
- await downloadAndExtractBinary(packageName)
137
- } catch (error) {
138
- console.error(error)
139
- return
140
- }
141
- }
142
-
143
- main()