@tailwindcss/oxide 4.1.14 → 4.1.16

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/index.js +68 -50
  2. package/package.json +17 -23
  3. package/scripts/install.js +0 -143
package/index.js CHANGED
@@ -80,8 +80,8 @@ function requireNative() {
80
80
  try {
81
81
  const binding = require('@tailwindcss/oxide-android-arm64')
82
82
  const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version
83
- if (bindingPackageVersion !== '4.1.14' && 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 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
83
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
85
  }
86
86
  return binding
87
87
  } catch (e) {
@@ -96,8 +96,8 @@ function requireNative() {
96
96
  try {
97
97
  const binding = require('@tailwindcss/oxide-android-arm-eabi')
98
98
  const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version
99
- if (bindingPackageVersion !== '4.1.14' && 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 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
99
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
101
  }
102
102
  return binding
103
103
  } catch (e) {
@@ -108,7 +108,24 @@ function requireNative() {
108
108
  }
109
109
  } else if (process.platform === 'win32') {
110
110
  if (process.arch === 'x64') {
111
+ if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
112
+ try {
113
+ return require('./tailwindcss-oxide.win32-x64-gnu.node')
114
+ } catch (e) {
115
+ loadErrors.push(e)
116
+ }
111
117
  try {
118
+ const binding = require('@tailwindcss/oxide-win32-x64-gnu')
119
+ const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version
120
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
+ }
123
+ return binding
124
+ } catch (e) {
125
+ loadErrors.push(e)
126
+ }
127
+ } else {
128
+ try {
112
129
  return require('./tailwindcss-oxide.win32-x64-msvc.node')
113
130
  } catch (e) {
114
131
  loadErrors.push(e)
@@ -116,13 +133,14 @@ function requireNative() {
116
133
  try {
117
134
  const binding = require('@tailwindcss/oxide-win32-x64-msvc')
118
135
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version
119
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
120
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
136
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
121
138
  }
122
139
  return binding
123
140
  } catch (e) {
124
141
  loadErrors.push(e)
125
142
  }
143
+ }
126
144
  } else if (process.arch === 'ia32') {
127
145
  try {
128
146
  return require('./tailwindcss-oxide.win32-ia32-msvc.node')
@@ -132,8 +150,8 @@ function requireNative() {
132
150
  try {
133
151
  const binding = require('@tailwindcss/oxide-win32-ia32-msvc')
134
152
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version
135
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
136
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
153
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
155
  }
138
156
  return binding
139
157
  } catch (e) {
@@ -148,8 +166,8 @@ function requireNative() {
148
166
  try {
149
167
  const binding = require('@tailwindcss/oxide-win32-arm64-msvc')
150
168
  const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version
151
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
152
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
153
171
  }
154
172
  return binding
155
173
  } catch (e) {
@@ -167,8 +185,8 @@ function requireNative() {
167
185
  try {
168
186
  const binding = require('@tailwindcss/oxide-darwin-universal')
169
187
  const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version
170
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
188
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
190
  }
173
191
  return binding
174
192
  } catch (e) {
@@ -183,8 +201,8 @@ function requireNative() {
183
201
  try {
184
202
  const binding = require('@tailwindcss/oxide-darwin-x64')
185
203
  const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version
186
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
187
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
188
206
  }
189
207
  return binding
190
208
  } catch (e) {
@@ -199,8 +217,8 @@ function requireNative() {
199
217
  try {
200
218
  const binding = require('@tailwindcss/oxide-darwin-arm64')
201
219
  const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version
202
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
222
  }
205
223
  return binding
206
224
  } catch (e) {
@@ -219,8 +237,8 @@ function requireNative() {
219
237
  try {
220
238
  const binding = require('@tailwindcss/oxide-freebsd-x64')
221
239
  const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version
222
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
223
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
240
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
224
242
  }
225
243
  return binding
226
244
  } catch (e) {
@@ -235,8 +253,8 @@ function requireNative() {
235
253
  try {
236
254
  const binding = require('@tailwindcss/oxide-freebsd-arm64')
237
255
  const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version
238
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
239
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
256
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
240
258
  }
241
259
  return binding
242
260
  } catch (e) {
@@ -256,8 +274,8 @@ function requireNative() {
256
274
  try {
257
275
  const binding = require('@tailwindcss/oxide-linux-x64-musl')
258
276
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version
259
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
260
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
277
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
261
279
  }
262
280
  return binding
263
281
  } catch (e) {
@@ -272,8 +290,8 @@ function requireNative() {
272
290
  try {
273
291
  const binding = require('@tailwindcss/oxide-linux-x64-gnu')
274
292
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version
275
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
276
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
293
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
277
295
  }
278
296
  return binding
279
297
  } catch (e) {
@@ -290,8 +308,8 @@ function requireNative() {
290
308
  try {
291
309
  const binding = require('@tailwindcss/oxide-linux-arm64-musl')
292
310
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version
293
- if (bindingPackageVersion !== '4.1.14' && 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 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
311
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
313
  }
296
314
  return binding
297
315
  } catch (e) {
@@ -306,8 +324,8 @@ function requireNative() {
306
324
  try {
307
325
  const binding = require('@tailwindcss/oxide-linux-arm64-gnu')
308
326
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version
309
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
310
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
327
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
311
329
  }
312
330
  return binding
313
331
  } catch (e) {
@@ -324,8 +342,8 @@ function requireNative() {
324
342
  try {
325
343
  const binding = require('@tailwindcss/oxide-linux-arm-musleabihf')
326
344
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version
327
- if (bindingPackageVersion !== '4.1.14' && 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 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
345
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
347
  }
330
348
  return binding
331
349
  } catch (e) {
@@ -340,8 +358,8 @@ function requireNative() {
340
358
  try {
341
359
  const binding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
342
360
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version
343
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
344
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
361
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
345
363
  }
346
364
  return binding
347
365
  } catch (e) {
@@ -358,8 +376,8 @@ function requireNative() {
358
376
  try {
359
377
  const binding = require('@tailwindcss/oxide-linux-loong64-musl')
360
378
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version
361
- if (bindingPackageVersion !== '4.1.14' && 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 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
379
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
381
  }
364
382
  return binding
365
383
  } catch (e) {
@@ -374,8 +392,8 @@ function requireNative() {
374
392
  try {
375
393
  const binding = require('@tailwindcss/oxide-linux-loong64-gnu')
376
394
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version
377
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
378
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
395
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
379
397
  }
380
398
  return binding
381
399
  } catch (e) {
@@ -392,8 +410,8 @@ function requireNative() {
392
410
  try {
393
411
  const binding = require('@tailwindcss/oxide-linux-riscv64-musl')
394
412
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version
395
- if (bindingPackageVersion !== '4.1.14' && 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 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
413
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
415
  }
398
416
  return binding
399
417
  } catch (e) {
@@ -408,8 +426,8 @@ function requireNative() {
408
426
  try {
409
427
  const binding = require('@tailwindcss/oxide-linux-riscv64-gnu')
410
428
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version
411
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
412
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
429
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
413
431
  }
414
432
  return binding
415
433
  } catch (e) {
@@ -425,8 +443,8 @@ function requireNative() {
425
443
  try {
426
444
  const binding = require('@tailwindcss/oxide-linux-ppc64-gnu')
427
445
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version
428
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
429
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
446
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
430
448
  }
431
449
  return binding
432
450
  } catch (e) {
@@ -441,8 +459,8 @@ function requireNative() {
441
459
  try {
442
460
  const binding = require('@tailwindcss/oxide-linux-s390x-gnu')
443
461
  const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version
444
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
445
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
462
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
446
464
  }
447
465
  return binding
448
466
  } catch (e) {
@@ -461,8 +479,8 @@ function requireNative() {
461
479
  try {
462
480
  const binding = require('@tailwindcss/oxide-openharmony-arm64')
463
481
  const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version
464
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
465
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
482
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
466
484
  }
467
485
  return binding
468
486
  } catch (e) {
@@ -477,8 +495,8 @@ function requireNative() {
477
495
  try {
478
496
  const binding = require('@tailwindcss/oxide-openharmony-x64')
479
497
  const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version
480
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
481
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
498
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
482
500
  }
483
501
  return binding
484
502
  } catch (e) {
@@ -493,8 +511,8 @@ function requireNative() {
493
511
  try {
494
512
  const binding = require('@tailwindcss/oxide-openharmony-arm')
495
513
  const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version
496
- if (bindingPackageVersion !== '4.1.14' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
497
- throw new Error(`Native binding package version mismatch, expected 4.1.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
514
+ if (bindingPackageVersion !== '4.1.16' && 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 4.1.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
498
516
  }
499
517
  return binding
500
518
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailwindcss/oxide",
3
- "version": "4.1.14",
3
+ "version": "4.1.16",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/tailwindlabs/tailwindcss.git",
@@ -32,13 +32,9 @@
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.2.0",
41
- "@napi-rs/wasm-runtime": "^1.0.5",
36
+ "@napi-rs/cli": "^3.3.0",
37
+ "@napi-rs/wasm-runtime": "^1.0.7",
42
38
  "emnapi": "1.5.0"
43
39
  },
44
40
  "engines": {
@@ -46,26 +42,25 @@
46
42
  },
47
43
  "files": [
48
44
  "index.js",
49
- "index.d.ts",
50
- "scripts/install.js"
45
+ "index.d.ts"
51
46
  ],
52
47
  "publishConfig": {
53
48
  "provenance": true,
54
49
  "access": "public"
55
50
  },
56
51
  "optionalDependencies": {
57
- "@tailwindcss/oxide-android-arm64": "4.1.14",
58
- "@tailwindcss/oxide-darwin-arm64": "4.1.14",
59
- "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.14",
60
- "@tailwindcss/oxide-freebsd-x64": "4.1.14",
61
- "@tailwindcss/oxide-linux-arm64-gnu": "4.1.14",
62
- "@tailwindcss/oxide-darwin-x64": "4.1.14",
63
- "@tailwindcss/oxide-linux-x64-musl": "4.1.14",
64
- "@tailwindcss/oxide-linux-arm64-musl": "4.1.14",
65
- "@tailwindcss/oxide-win32-arm64-msvc": "4.1.14",
66
- "@tailwindcss/oxide-win32-x64-msvc": "4.1.14",
67
- "@tailwindcss/oxide-linux-x64-gnu": "4.1.14",
68
- "@tailwindcss/oxide-wasm32-wasi": "4.1.14"
52
+ "@tailwindcss/oxide-darwin-arm64": "4.1.16",
53
+ "@tailwindcss/oxide-darwin-x64": "4.1.16",
54
+ "@tailwindcss/oxide-freebsd-x64": "4.1.16",
55
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.16",
56
+ "@tailwindcss/oxide-linux-arm64-gnu": "4.1.16",
57
+ "@tailwindcss/oxide-linux-arm64-musl": "4.1.16",
58
+ "@tailwindcss/oxide-android-arm64": "4.1.16",
59
+ "@tailwindcss/oxide-linux-x64-musl": "4.1.16",
60
+ "@tailwindcss/oxide-win32-arm64-msvc": "4.1.16",
61
+ "@tailwindcss/oxide-win32-x64-msvc": "4.1.16",
62
+ "@tailwindcss/oxide-linux-x64-gnu": "4.1.16",
63
+ "@tailwindcss/oxide-wasm32-wasi": "4.1.16"
69
64
  },
70
65
  "scripts": {
71
66
  "build": "pnpm run build:platform && pnpm run build:wasm",
@@ -75,7 +70,6 @@
75
70
  "postbuild:wasm": "node ./scripts/move-artifacts.mjs",
76
71
  "dev": "cargo watch --quiet --shell 'npm run build'",
77
72
  "build:debug": "napi build --platform",
78
- "version": "napi version",
79
- "postinstall": "node ./scripts/install.js"
73
+ "version": "napi version"
80
74
  }
81
75
  }
@@ -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()