@csszyx/unplugin 0.11.9 → 0.11.10
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/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/next-prebuild.cjs +3 -3
- package/dist/next-prebuild.d.cts +1 -1
- package/dist/next-prebuild.d.mts +1 -1
- package/dist/next-prebuild.mjs +3 -3
- package/dist/next-turbo-loader.cjs +4 -4
- package/dist/next-turbo-loader.d.cts +1 -1
- package/dist/next-turbo-loader.d.mts +1 -1
- package/dist/next-turbo-loader.mjs +4 -4
- package/dist/next-watcher.cjs +1 -1
- package/dist/next-watcher.mjs +1 -1
- package/dist/shared/{unplugin.Bqx2WfBV.mjs → unplugin.-yLpX1Ck.mjs} +2 -2
- package/dist/shared/{unplugin.jZsBqx54.cjs → unplugin.BZq6FKn2.cjs} +2 -2
- package/dist/shared/{unplugin.DVCQC5wq.cjs → unplugin.CKIOVNOg.cjs} +9 -0
- package/dist/shared/{unplugin.DUI48s3S.cjs → unplugin.CRuVOB4Q.cjs} +19 -21
- package/dist/shared/{unplugin.wx3cvxxX.mjs → unplugin.CVMbUfH5.mjs} +17 -19
- package/dist/shared/{unplugin.CScQRdTp.d.cts → unplugin.CXV7fOa2.d.cts} +1 -1
- package/dist/shared/{unplugin.CScQRdTp.d.mts → unplugin.CXV7fOa2.d.mts} +1 -1
- package/dist/shared/{unplugin.DmuOKVS4.cjs → unplugin.Cnxm1DcC.cjs} +2 -2
- package/dist/shared/{unplugin.nnsa7OVW.mjs → unplugin.Lhzkcj-A.mjs} +2 -2
- package/dist/shared/{unplugin.D-K57LNR.mjs → unplugin.fOnGXWgS.mjs} +9 -1
- package/dist/vite.cjs +3 -3
- package/dist/vite.mjs +3 -3
- package/dist/webpack.cjs +3 -3
- package/dist/webpack.mjs +3 -3
- package/package.json +17 -17
- package/dist/shared/{unplugin.7TELUwsj.mjs → unplugin.DMcbmP01.mjs} +46 -46
- package/dist/shared/{unplugin.WVn08Fln.cjs → unplugin.DblMogcN.cjs} +46 -46
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const cssMangler = require('./css-mangler.cjs');
|
|
6
|
-
const unplugin = require('./shared/unplugin.
|
|
6
|
+
const unplugin = require('./shared/unplugin.CRuVOB4Q.cjs');
|
|
7
7
|
const types = require('@csszyx/types');
|
|
8
8
|
require('postcss');
|
|
9
9
|
require('postcss-selector-parser');
|
|
@@ -19,8 +19,8 @@ require('@csszyx/core/native');
|
|
|
19
19
|
require('@csszyx/svelte-adapter');
|
|
20
20
|
require('@csszyx/vue-adapter');
|
|
21
21
|
require('unplugin');
|
|
22
|
-
require('./shared/unplugin.
|
|
23
|
-
require('./shared/unplugin.
|
|
22
|
+
require('./shared/unplugin.CKIOVNOg.cjs');
|
|
23
|
+
require('./shared/unplugin.Cnxm1DcC.cjs');
|
|
24
24
|
require('./shared/unplugin.BkRah5Ot.cjs');
|
|
25
25
|
require('postcss-value-parser');
|
|
26
26
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.mjs';
|
|
2
|
-
export { a as appendTailwindSourceDirective, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as collectMangleHybridHazards, e as computeSafelistRelPath, f as createGlobalVarAliasValidationOptions, g as createGlobalVarMapAssetSource, h as createGlobalVarScanCacheKey, i as createRSCModuleRecord, j as cssHasContentScope, k as cssImportsTailwind, u as default, l as deleteRSCModuleRecord, m as esbuildPlugin, n as extractGlobalVarAliasesForManifest, o as fileMayContainSafelistableSz, p as findLocalImportSources, q as findRSCBoundaryViolation, r as findRSCGraphViolation, s as hasInjectableTailwindCandidate, t as hasTokens, v as hasUseClientDirective, w as hasUseServerDirective, x as isCompileSourceOptedIn, y as isHardIgnoredPath, z as isMonorepoPackage, A as isPackagesSkippedSource, B as isRSCServerModule, C as isTailwindReservedGlobalVar, D as mangleCodeClassesSync, E as mangleEligibleClasses, F as mangleHybridHazardMessage, G as mergeThemes, H as missingTailwindEntryMessage, I as normalizeGlobalVarAliasesForCache, J as parseThemeBlocks, K as planGlobalVarAliases, L as readGlobalVarScanCache, M as recordGlobalVarSourceFile, N as resolveCompileSourceDirs, O as resolveGlobalVarScanCacheDir, P as resolveNativeCacheIdentity, Q as rewriteGlobalVarCssAliases, R as rollupPlugin, S as scanCustomPropertyNames, T as scanGlobalVarCss, U as shouldEmitWarning, V as shouldTrackGlobalVarSources, W as shouldWarnMissingTailwindEntry, X as shouldWarnUnscopedMonorepo, Y as skippedSzFilesMessage, u as unplugin, Z as unscopedMonorepoMessage, _ as validateGlobalVarAliasInputs, $ as vitePlugin, a0 as webpackPlugin, a1 as writeGlobalVarScanCache } from './shared/unplugin.
|
|
2
|
+
export { a as appendTailwindSourceDirective, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as collectMangleHybridHazards, e as computeSafelistRelPath, f as createGlobalVarAliasValidationOptions, g as createGlobalVarMapAssetSource, h as createGlobalVarScanCacheKey, i as createRSCModuleRecord, j as cssHasContentScope, k as cssImportsTailwind, u as default, l as deleteRSCModuleRecord, m as esbuildPlugin, n as extractGlobalVarAliasesForManifest, o as fileMayContainSafelistableSz, p as findLocalImportSources, q as findRSCBoundaryViolation, r as findRSCGraphViolation, s as hasInjectableTailwindCandidate, t as hasTokens, v as hasUseClientDirective, w as hasUseServerDirective, x as isCompileSourceOptedIn, y as isHardIgnoredPath, z as isMonorepoPackage, A as isPackagesSkippedSource, B as isRSCServerModule, C as isTailwindReservedGlobalVar, D as mangleCodeClassesSync, E as mangleEligibleClasses, F as mangleHybridHazardMessage, G as mergeThemes, H as missingTailwindEntryMessage, I as normalizeGlobalVarAliasesForCache, J as parseThemeBlocks, K as planGlobalVarAliases, L as readGlobalVarScanCache, M as recordGlobalVarSourceFile, N as resolveCompileSourceDirs, O as resolveGlobalVarScanCacheDir, P as resolveNativeCacheIdentity, Q as rewriteGlobalVarCssAliases, R as rollupPlugin, S as scanCustomPropertyNames, T as scanGlobalVarCss, U as shouldEmitWarning, V as shouldTrackGlobalVarSources, W as shouldWarnMissingTailwindEntry, X as shouldWarnUnscopedMonorepo, Y as skippedSzFilesMessage, u as unplugin, Z as unscopedMonorepoMessage, _ as validateGlobalVarAliasInputs, $ as vitePlugin, a0 as webpackPlugin, a1 as writeGlobalVarScanCache } from './shared/unplugin.CVMbUfH5.mjs';
|
|
3
3
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
4
4
|
import 'postcss';
|
|
5
5
|
import 'postcss-selector-parser';
|
|
@@ -15,7 +15,7 @@ import '@csszyx/core/native';
|
|
|
15
15
|
import '@csszyx/svelte-adapter';
|
|
16
16
|
import '@csszyx/vue-adapter';
|
|
17
17
|
import 'unplugin';
|
|
18
|
-
import './shared/unplugin.
|
|
19
|
-
import './shared/unplugin.
|
|
18
|
+
import './shared/unplugin.fOnGXWgS.mjs';
|
|
19
|
+
import './shared/unplugin.Lhzkcj-A.mjs';
|
|
20
20
|
import './shared/unplugin.B3XoSRB8.mjs';
|
|
21
21
|
import 'postcss-value-parser';
|
package/dist/next-prebuild.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
const node_crypto = require('node:crypto');
|
|
4
4
|
const fs = require('node:fs');
|
|
5
5
|
const path = require('node:path');
|
|
6
|
-
const nextTransformMetadata = require('./shared/unplugin.
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
8
|
-
const transformCache = require('./shared/unplugin.
|
|
6
|
+
const nextTransformMetadata = require('./shared/unplugin.BZq6FKn2.cjs');
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.DblMogcN.cjs');
|
|
8
|
+
const transformCache = require('./shared/unplugin.CKIOVNOg.cjs');
|
|
9
9
|
require('@csszyx/compiler');
|
|
10
10
|
require('./shared/unplugin.BkRah5Ot.cjs');
|
|
11
11
|
require('node:os');
|
package/dist/next-prebuild.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { N as NextSourceTransformOutput, a as NextSourceParserMode } from './shared/unplugin.CXV7fOa2.cjs';
|
|
4
4
|
import { N as NextWatcherCycleResult } from './shared/unplugin.xeED_qwh.cjs';
|
|
5
5
|
|
|
6
6
|
/** Serializable options accepted by the Next Turbopack csszyx prebuild core. */
|
package/dist/next-prebuild.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { N as NextSourceTransformOutput, a as NextSourceParserMode } from './shared/unplugin.CXV7fOa2.mjs';
|
|
4
4
|
import { N as NextWatcherCycleResult } from './shared/unplugin.CdZxp0x-.mjs';
|
|
5
5
|
|
|
6
6
|
/** Serializable options accepted by the Next Turbopack csszyx prebuild core. */
|
package/dist/next-prebuild.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
|
-
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.
|
|
5
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.
|
|
6
|
-
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.
|
|
4
|
+
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.-yLpX1Ck.mjs';
|
|
5
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.DMcbmP01.mjs';
|
|
6
|
+
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.fOnGXWgS.mjs';
|
|
7
7
|
import '@csszyx/compiler';
|
|
8
8
|
import './shared/unplugin.B3XoSRB8.mjs';
|
|
9
9
|
import 'node:os';
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const node_crypto = require('node:crypto');
|
|
6
6
|
const path = require('node:path');
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
8
|
-
const nextTransformMetadata = require('./shared/unplugin.
|
|
9
|
-
const runtimeImportScan = require('./shared/unplugin.
|
|
10
|
-
const transformCache = require('./shared/unplugin.
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.DblMogcN.cjs');
|
|
8
|
+
const nextTransformMetadata = require('./shared/unplugin.BZq6FKn2.cjs');
|
|
9
|
+
const runtimeImportScan = require('./shared/unplugin.Cnxm1DcC.cjs');
|
|
10
|
+
const transformCache = require('./shared/unplugin.CKIOVNOg.cjs');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('proper-lockfile');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { a as NextSourceParserMode, N as NextSourceTransformOutput } from './shared/unplugin.CXV7fOa2.cjs';
|
|
4
4
|
|
|
5
5
|
/** Serializable options accepted by the Next Turbopack csszyx loader. */
|
|
6
6
|
interface NextTurboLoaderOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { a as NextSourceParserMode, N as NextSourceTransformOutput } from './shared/unplugin.CXV7fOa2.mjs';
|
|
4
4
|
|
|
5
5
|
/** Serializable options accepted by the Next Turbopack csszyx loader. */
|
|
6
6
|
interface NextTurboLoaderOptions {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.
|
|
4
|
-
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.
|
|
5
|
-
import { i as importsRuntimeHelper, a as insertAfterUseDirective } from './shared/unplugin.
|
|
6
|
-
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.
|
|
3
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.DMcbmP01.mjs';
|
|
4
|
+
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.-yLpX1Ck.mjs';
|
|
5
|
+
import { i as importsRuntimeHelper, a as insertAfterUseDirective } from './shared/unplugin.Lhzkcj-A.mjs';
|
|
6
|
+
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.fOnGXWgS.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'proper-lockfile';
|
package/dist/next-watcher.cjs
CHANGED
package/dist/next-watcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { ensureRustTransformAvailable, transformSourceCode, transformRust, transformOxc, transform } from '@csszyx/compiler';
|
|
3
|
-
import { c as createTransformCacheKey, a as readTransformCache, w as writeTransformCache, n as normalizePathSeparators } from './unplugin.
|
|
3
|
+
import { c as createTransformCacheKey, a as readTransformCache, w as writeTransformCache, n as normalizePathSeparators, b as babelFallbackReason } from './unplugin.fOnGXWgS.mjs';
|
|
4
4
|
import { createHash } from 'node:crypto';
|
|
5
5
|
import { s as sortStrings } from './unplugin.B3XoSRB8.mjs';
|
|
6
6
|
|
|
@@ -148,7 +148,7 @@ function runNextSourceTransform(input, filename) {
|
|
|
148
148
|
throw error;
|
|
149
149
|
}
|
|
150
150
|
const result = transformSourceCode(input.source, filename, compilerOptions);
|
|
151
|
-
const reason =
|
|
151
|
+
const reason = babelFallbackReason(error);
|
|
152
152
|
result.diagnostics.push(
|
|
153
153
|
`[csszyx] oxc parser fell back to Babel for ${filename}: ${reason}`
|
|
154
154
|
);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('node:fs');
|
|
4
4
|
const compiler = require('@csszyx/compiler');
|
|
5
|
-
const transformCache = require('./unplugin.
|
|
5
|
+
const transformCache = require('./unplugin.CKIOVNOg.cjs');
|
|
6
6
|
const node_crypto = require('node:crypto');
|
|
7
7
|
const htmlEscape = require('./unplugin.BkRah5Ot.cjs');
|
|
8
8
|
|
|
@@ -150,7 +150,7 @@ function runNextSourceTransform(input, filename) {
|
|
|
150
150
|
throw error;
|
|
151
151
|
}
|
|
152
152
|
const result = compiler.transformSourceCode(input.source, filename, compilerOptions);
|
|
153
|
-
const reason =
|
|
153
|
+
const reason = transformCache.babelFallbackReason(error);
|
|
154
154
|
result.diagnostics.push(
|
|
155
155
|
`[csszyx] oxc parser fell back to Babel for ${filename}: ${reason}`
|
|
156
156
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const compiler = require('@csszyx/compiler');
|
|
3
4
|
const node_crypto = require('node:crypto');
|
|
4
5
|
const fs = require('node:fs');
|
|
5
6
|
const path = require('node:path');
|
|
@@ -24,6 +25,13 @@ function normalizePathSeparators(value) {
|
|
|
24
25
|
return value.split(WINDOWS_PATH_SEPARATOR).join("/");
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
function babelFallbackReason(error) {
|
|
29
|
+
if (error instanceof compiler.OxcNotImplementedError) {
|
|
30
|
+
return error.detail;
|
|
31
|
+
}
|
|
32
|
+
return error instanceof Error ? error.message : String(error);
|
|
33
|
+
}
|
|
34
|
+
|
|
27
35
|
const CACHE_SCHEMA_VERSION = 10;
|
|
28
36
|
function resolveTransformCacheDir(rootDir, cacheDir) {
|
|
29
37
|
return path__namespace.resolve(rootDir, cacheDir ?? ".csszyx/cache", "transform");
|
|
@@ -223,6 +231,7 @@ function evictMemoryCacheToBudget(cache, totalCodeChars, maxEntries, maxCodeChar
|
|
|
223
231
|
return total;
|
|
224
232
|
}
|
|
225
233
|
|
|
234
|
+
exports.babelFallbackReason = babelFallbackReason;
|
|
226
235
|
exports.createTransformCacheKey = createTransformCacheKey;
|
|
227
236
|
exports.evictMemoryCacheToBudget = evictMemoryCacheToBudget;
|
|
228
237
|
exports.evictOldTransformCacheEntries = evictOldTransformCacheEntries;
|
|
@@ -13,9 +13,9 @@ const svelteAdapter = require('@csszyx/svelte-adapter');
|
|
|
13
13
|
const types = require('@csszyx/types');
|
|
14
14
|
const vueAdapter = require('@csszyx/vue-adapter');
|
|
15
15
|
const unplugin$1 = require('unplugin');
|
|
16
|
+
const transformCache = require('./unplugin.CKIOVNOg.cjs');
|
|
16
17
|
const cssMangler = require('../css-mangler.cjs');
|
|
17
|
-
const runtimeImportScan = require('./unplugin.
|
|
18
|
-
const transformCache = require('./unplugin.DVCQC5wq.cjs');
|
|
18
|
+
const runtimeImportScan = require('./unplugin.Cnxm1DcC.cjs');
|
|
19
19
|
const htmlEscape = require('./unplugin.BkRah5Ot.cjs');
|
|
20
20
|
const postcss = require('postcss');
|
|
21
21
|
const valueParser = require('postcss-value-parser');
|
|
@@ -456,8 +456,8 @@ function scanCssSourceWithOptionalCache(file, cacheDir) {
|
|
|
456
456
|
return result;
|
|
457
457
|
}
|
|
458
458
|
function normalizeBuildAssetPath(rootDir, fileName) {
|
|
459
|
-
return (path__namespace.isAbsolute(fileName) ? fileName : path__namespace.join(rootDir, fileName)).
|
|
460
|
-
|
|
459
|
+
return (path__namespace.isAbsolute(fileName) ? fileName : path__namespace.join(rootDir, fileName)).replaceAll(
|
|
460
|
+
"\\",
|
|
461
461
|
"/"
|
|
462
462
|
);
|
|
463
463
|
}
|
|
@@ -2231,9 +2231,9 @@ let _hasWarnedTransformCacheVersion = false;
|
|
|
2231
2231
|
let _hasWarnedNativeFallback = false;
|
|
2232
2232
|
const _loggedActiveParsers = /* @__PURE__ */ new Set();
|
|
2233
2233
|
const _babelFallbackFiles = /* @__PURE__ */ new Set();
|
|
2234
|
-
const requireFromHere = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.
|
|
2234
|
+
const requireFromHere = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.CRuVOB4Q.cjs', document.baseURI).href)));
|
|
2235
2235
|
const PLUGIN_VERSION = findPackageVersionFromFile(
|
|
2236
|
-
node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.
|
|
2236
|
+
node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.CRuVOB4Q.cjs', document.baseURI).href))),
|
|
2237
2237
|
UNKNOWN_PACKAGE_VERSION
|
|
2238
2238
|
);
|
|
2239
2239
|
const COMPILER_VERSION = findPackageVersionFromModule("@csszyx/compiler", UNKNOWN_PACKAGE_VERSION);
|
|
@@ -2596,6 +2596,9 @@ function rewriteCssWithValidatedGlobalVarPlan(css, filePath, result) {
|
|
|
2596
2596
|
});
|
|
2597
2597
|
return rewrite.css;
|
|
2598
2598
|
}
|
|
2599
|
+
function isCssSyntaxError(error) {
|
|
2600
|
+
return !!error && typeof error === "object" && "name" in error && error.name === "CssSyntaxError";
|
|
2601
|
+
}
|
|
2599
2602
|
function assertGlobalVarPlanMatchesEarlyAliases(result, expectedEntries) {
|
|
2600
2603
|
const actualEntries = [...result.plan.aliases.entries()].sort(
|
|
2601
2604
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -2885,6 +2888,14 @@ function scanClassExpression(source, from) {
|
|
|
2885
2888
|
}
|
|
2886
2889
|
return index;
|
|
2887
2890
|
}
|
|
2891
|
+
function findTemplateInterpolationEnd(templateContent, bodyStart) {
|
|
2892
|
+
let depth = 0;
|
|
2893
|
+
for (let cursor = bodyStart; cursor < templateContent.length; cursor++) {
|
|
2894
|
+
if (templateContent[cursor] === "{") depth++;
|
|
2895
|
+
else if (templateContent[cursor] === "}" && depth-- === 0) return cursor + 1;
|
|
2896
|
+
}
|
|
2897
|
+
return templateContent.length;
|
|
2898
|
+
}
|
|
2888
2899
|
function mangleCodeClassesSync(code, mangleMap) {
|
|
2889
2900
|
function mangleClassString(classString) {
|
|
2890
2901
|
return classString.split(/\s+/).filter(Boolean).map((cls) => {
|
|
@@ -2923,14 +2934,6 @@ function mangleCodeClassesSync(code, mangleMap) {
|
|
|
2923
2934
|
changed: mangled !== trimmed
|
|
2924
2935
|
};
|
|
2925
2936
|
}
|
|
2926
|
-
function findTemplateInterpolationEnd(templateContent, bodyStart) {
|
|
2927
|
-
let depth = 0;
|
|
2928
|
-
for (let cursor = bodyStart; cursor < templateContent.length; cursor++) {
|
|
2929
|
-
if (templateContent[cursor] === "{") depth++;
|
|
2930
|
-
else if (templateContent[cursor] === "}" && depth-- === 0) return cursor + 1;
|
|
2931
|
-
}
|
|
2932
|
-
return templateContent.length;
|
|
2933
|
-
}
|
|
2934
2937
|
function mangleTemplateInterpolation(inner) {
|
|
2935
2938
|
let changed = false;
|
|
2936
2939
|
const value = inner.replace(/"([^"]*)"/g, (quoted, classString) => {
|
|
@@ -3422,7 +3425,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3422
3425
|
}
|
|
3423
3426
|
function runBabelFallback(source, effectiveFilename, compilerOptions, error) {
|
|
3424
3427
|
const result = compiler.transformSourceCode(source, effectiveFilename, compilerOptions);
|
|
3425
|
-
const reason =
|
|
3428
|
+
const reason = transformCache.babelFallbackReason(error);
|
|
3426
3429
|
result.diagnostics.push(
|
|
3427
3430
|
`[csszyx] oxc parser fell back to Babel for ${effectiveFilename}: ${reason}`
|
|
3428
3431
|
);
|
|
@@ -4179,9 +4182,7 @@ ${transformedCode}`;
|
|
|
4179
4182
|
emitWarning(missingTailwindEntryMessage(state.ownedClasses.size));
|
|
4180
4183
|
}
|
|
4181
4184
|
if (!state.contentScopeWarningEmitted && options.contentScopeCheck !== false && state.sawTailwindEntry && !state.tailwindEntryScoped) {
|
|
4182
|
-
|
|
4183
|
-
state.inMonorepo = isMonorepoPackage(state.rootDir);
|
|
4184
|
-
}
|
|
4185
|
+
state.inMonorepo ??= isMonorepoPackage(state.rootDir);
|
|
4185
4186
|
if (shouldWarnUnscopedMonorepo(
|
|
4186
4187
|
state.sawTailwindEntry,
|
|
4187
4188
|
state.tailwindEntryScoped,
|
|
@@ -4406,9 +4407,6 @@ ${transformedCode}`;
|
|
|
4406
4407
|
}
|
|
4407
4408
|
return manifest;
|
|
4408
4409
|
}
|
|
4409
|
-
function isCssSyntaxError(error) {
|
|
4410
|
-
return !!error && typeof error === "object" && "name" in error && error.name === "CssSyntaxError";
|
|
4411
|
-
}
|
|
4412
4410
|
function rewriteOutputCss(source, file, shouldMangle, mangledSources, externalClasses) {
|
|
4413
4411
|
let css = rewriteCssWithValidatedGlobalVarPlan(
|
|
4414
4412
|
source,
|
|
@@ -13,9 +13,9 @@ import { preprocess as preprocess$1 } from '@csszyx/svelte-adapter';
|
|
|
13
13
|
import { isTailwindReservedCustomProperty, CSSZYX_GLOBAL_ALIAS_PREFIX, isCsszyxGlobalAliasCustomProperty, DEFAULT_BUILD_CONFIG, validateGlobalVarMangleConfig } from '@csszyx/types';
|
|
14
14
|
import { preprocess } from '@csszyx/vue-adapter';
|
|
15
15
|
import { createUnplugin } from 'unplugin';
|
|
16
|
+
import { n as normalizePathSeparators, r as resolveTransformCacheDir, c as createTransformCacheKey, w as writeTransformCache, e as evictOldTransformCacheEntries, a as readTransformCache, d as evictMemoryCacheToBudget, b as babelFallbackReason } from './unplugin.fOnGXWgS.mjs';
|
|
16
17
|
import { mangleCSSSync } from '../css-mangler.mjs';
|
|
17
|
-
import { i as importsRuntimeHelper, f as findRuntimeImportClause, a as insertAfterUseDirective } from './unplugin.
|
|
18
|
-
import { n as normalizePathSeparators, r as resolveTransformCacheDir, c as createTransformCacheKey, w as writeTransformCache, e as evictOldTransformCacheEntries, a as readTransformCache, b as evictMemoryCacheToBudget } from './unplugin.D-K57LNR.mjs';
|
|
18
|
+
import { i as importsRuntimeHelper, f as findRuntimeImportClause, a as insertAfterUseDirective } from './unplugin.Lhzkcj-A.mjs';
|
|
19
19
|
import { s as sortStrings, a as replaceEveryLiteral, u as unicodeEscape, b as escapeDoubleQuotedString, c as escapeSingleQuotedString, e as escapeHtmlAttribute, r as renderTailwindScannerCandidates } from './unplugin.B3XoSRB8.mjs';
|
|
20
20
|
import postcss from 'postcss';
|
|
21
21
|
import valueParser from 'postcss-value-parser';
|
|
@@ -436,8 +436,8 @@ function scanCssSourceWithOptionalCache(file, cacheDir) {
|
|
|
436
436
|
return result;
|
|
437
437
|
}
|
|
438
438
|
function normalizeBuildAssetPath(rootDir, fileName) {
|
|
439
|
-
return (path.isAbsolute(fileName) ? fileName : path.join(rootDir, fileName)).
|
|
440
|
-
|
|
439
|
+
return (path.isAbsolute(fileName) ? fileName : path.join(rootDir, fileName)).replaceAll(
|
|
440
|
+
"\\",
|
|
441
441
|
"/"
|
|
442
442
|
);
|
|
443
443
|
}
|
|
@@ -2576,6 +2576,9 @@ function rewriteCssWithValidatedGlobalVarPlan(css, filePath, result) {
|
|
|
2576
2576
|
});
|
|
2577
2577
|
return rewrite.css;
|
|
2578
2578
|
}
|
|
2579
|
+
function isCssSyntaxError(error) {
|
|
2580
|
+
return !!error && typeof error === "object" && "name" in error && error.name === "CssSyntaxError";
|
|
2581
|
+
}
|
|
2579
2582
|
function assertGlobalVarPlanMatchesEarlyAliases(result, expectedEntries) {
|
|
2580
2583
|
const actualEntries = [...result.plan.aliases.entries()].sort(
|
|
2581
2584
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -2865,6 +2868,14 @@ function scanClassExpression(source, from) {
|
|
|
2865
2868
|
}
|
|
2866
2869
|
return index;
|
|
2867
2870
|
}
|
|
2871
|
+
function findTemplateInterpolationEnd(templateContent, bodyStart) {
|
|
2872
|
+
let depth = 0;
|
|
2873
|
+
for (let cursor = bodyStart; cursor < templateContent.length; cursor++) {
|
|
2874
|
+
if (templateContent[cursor] === "{") depth++;
|
|
2875
|
+
else if (templateContent[cursor] === "}" && depth-- === 0) return cursor + 1;
|
|
2876
|
+
}
|
|
2877
|
+
return templateContent.length;
|
|
2878
|
+
}
|
|
2868
2879
|
function mangleCodeClassesSync(code, mangleMap) {
|
|
2869
2880
|
function mangleClassString(classString) {
|
|
2870
2881
|
return classString.split(/\s+/).filter(Boolean).map((cls) => {
|
|
@@ -2903,14 +2914,6 @@ function mangleCodeClassesSync(code, mangleMap) {
|
|
|
2903
2914
|
changed: mangled !== trimmed
|
|
2904
2915
|
};
|
|
2905
2916
|
}
|
|
2906
|
-
function findTemplateInterpolationEnd(templateContent, bodyStart) {
|
|
2907
|
-
let depth = 0;
|
|
2908
|
-
for (let cursor = bodyStart; cursor < templateContent.length; cursor++) {
|
|
2909
|
-
if (templateContent[cursor] === "{") depth++;
|
|
2910
|
-
else if (templateContent[cursor] === "}" && depth-- === 0) return cursor + 1;
|
|
2911
|
-
}
|
|
2912
|
-
return templateContent.length;
|
|
2913
|
-
}
|
|
2914
2917
|
function mangleTemplateInterpolation(inner) {
|
|
2915
2918
|
let changed = false;
|
|
2916
2919
|
const value = inner.replace(/"([^"]*)"/g, (quoted, classString) => {
|
|
@@ -3402,7 +3405,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3402
3405
|
}
|
|
3403
3406
|
function runBabelFallback(source, effectiveFilename, compilerOptions, error) {
|
|
3404
3407
|
const result = transformSourceCode(source, effectiveFilename, compilerOptions);
|
|
3405
|
-
const reason =
|
|
3408
|
+
const reason = babelFallbackReason(error);
|
|
3406
3409
|
result.diagnostics.push(
|
|
3407
3410
|
`[csszyx] oxc parser fell back to Babel for ${effectiveFilename}: ${reason}`
|
|
3408
3411
|
);
|
|
@@ -4159,9 +4162,7 @@ ${transformedCode}`;
|
|
|
4159
4162
|
emitWarning(missingTailwindEntryMessage(state.ownedClasses.size));
|
|
4160
4163
|
}
|
|
4161
4164
|
if (!state.contentScopeWarningEmitted && options.contentScopeCheck !== false && state.sawTailwindEntry && !state.tailwindEntryScoped) {
|
|
4162
|
-
|
|
4163
|
-
state.inMonorepo = isMonorepoPackage(state.rootDir);
|
|
4164
|
-
}
|
|
4165
|
+
state.inMonorepo ??= isMonorepoPackage(state.rootDir);
|
|
4165
4166
|
if (shouldWarnUnscopedMonorepo(
|
|
4166
4167
|
state.sawTailwindEntry,
|
|
4167
4168
|
state.tailwindEntryScoped,
|
|
@@ -4386,9 +4387,6 @@ ${transformedCode}`;
|
|
|
4386
4387
|
}
|
|
4387
4388
|
return manifest;
|
|
4388
4389
|
}
|
|
4389
|
-
function isCssSyntaxError(error) {
|
|
4390
|
-
return !!error && typeof error === "object" && "name" in error && error.name === "CssSyntaxError";
|
|
4391
|
-
}
|
|
4392
4390
|
function rewriteOutputCss(source, file, shouldMangle, mangledSources, externalClasses) {
|
|
4393
4391
|
let css = rewriteCssWithValidatedGlobalVarPlan(
|
|
4394
4392
|
source,
|
|
@@ -11,13 +11,13 @@ function insertAfterUseDirective(code, insertion) {
|
|
|
11
11
|
if (triviaLength === 0) break;
|
|
12
12
|
offset += triviaLength;
|
|
13
13
|
}
|
|
14
|
-
const directive = code.slice(offset)
|
|
14
|
+
const directive = USE_DIRECTIVE_RE.exec(code.slice(offset));
|
|
15
15
|
if (!directive) return `${insertion}${code}`;
|
|
16
16
|
const insertionOffset = offset + directive[0].length;
|
|
17
17
|
return `${code.slice(0, insertionOffset)}${insertion}${code.slice(insertionOffset)}`;
|
|
18
18
|
}
|
|
19
19
|
function leadingTriviaLength(source) {
|
|
20
|
-
return
|
|
20
|
+
return LEADING_WHITESPACE_RE.exec(source)?.[0].length ?? LINE_COMMENT_RE.exec(source)?.[0].length ?? BLOCK_COMMENT_RE.exec(source)?.[0].length ?? 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const RUNTIME_IMPORT_CLAUSE_RE = /(?:import|export)\s+\{([^{}]*)\}\s*from\s*['"]@csszyx\/runtime['"]/g;
|
|
@@ -9,13 +9,13 @@ function insertAfterUseDirective(code, insertion) {
|
|
|
9
9
|
if (triviaLength === 0) break;
|
|
10
10
|
offset += triviaLength;
|
|
11
11
|
}
|
|
12
|
-
const directive = code.slice(offset)
|
|
12
|
+
const directive = USE_DIRECTIVE_RE.exec(code.slice(offset));
|
|
13
13
|
if (!directive) return `${insertion}${code}`;
|
|
14
14
|
const insertionOffset = offset + directive[0].length;
|
|
15
15
|
return `${code.slice(0, insertionOffset)}${insertion}${code.slice(insertionOffset)}`;
|
|
16
16
|
}
|
|
17
17
|
function leadingTriviaLength(source) {
|
|
18
|
-
return
|
|
18
|
+
return LEADING_WHITESPACE_RE.exec(source)?.[0].length ?? LINE_COMMENT_RE.exec(source)?.[0].length ?? BLOCK_COMMENT_RE.exec(source)?.[0].length ?? 0;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const RUNTIME_IMPORT_CLAUSE_RE = /(?:import|export)\s+\{([^{}]*)\}\s*from\s*['"]@csszyx\/runtime['"]/g;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OxcNotImplementedError } from '@csszyx/compiler';
|
|
1
2
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
3
|
import * as fs from 'node:fs';
|
|
3
4
|
import * as path from 'node:path';
|
|
@@ -7,6 +8,13 @@ function normalizePathSeparators(value) {
|
|
|
7
8
|
return value.split(WINDOWS_PATH_SEPARATOR).join("/");
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
function babelFallbackReason(error) {
|
|
12
|
+
if (error instanceof OxcNotImplementedError) {
|
|
13
|
+
return error.detail;
|
|
14
|
+
}
|
|
15
|
+
return error instanceof Error ? error.message : String(error);
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
const CACHE_SCHEMA_VERSION = 10;
|
|
11
19
|
function resolveTransformCacheDir(rootDir, cacheDir) {
|
|
12
20
|
return path.resolve(rootDir, cacheDir ?? ".csszyx/cache", "transform");
|
|
@@ -206,4 +214,4 @@ function evictMemoryCacheToBudget(cache, totalCodeChars, maxEntries, maxCodeChar
|
|
|
206
214
|
return total;
|
|
207
215
|
}
|
|
208
216
|
|
|
209
|
-
export { readTransformCache as a,
|
|
217
|
+
export { readTransformCache as a, babelFallbackReason as b, createTransformCacheKey as c, evictMemoryCacheToBudget as d, evictOldTransformCacheEntries as e, normalizePathSeparators as n, resolveTransformCacheDir as r, writeTransformCache as w };
|
package/dist/vite.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const unplugin = require('./shared/unplugin.
|
|
5
|
+
const unplugin = require('./shared/unplugin.CRuVOB4Q.cjs');
|
|
6
6
|
require('node:crypto');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('node:module');
|
|
@@ -16,11 +16,11 @@ require('@csszyx/svelte-adapter');
|
|
|
16
16
|
require('@csszyx/types');
|
|
17
17
|
require('@csszyx/vue-adapter');
|
|
18
18
|
require('unplugin');
|
|
19
|
+
require('./shared/unplugin.CKIOVNOg.cjs');
|
|
19
20
|
require('./css-mangler.cjs');
|
|
20
21
|
require('postcss');
|
|
21
22
|
require('postcss-selector-parser');
|
|
22
|
-
require('./shared/unplugin.
|
|
23
|
-
require('./shared/unplugin.DVCQC5wq.cjs');
|
|
23
|
+
require('./shared/unplugin.Cnxm1DcC.cjs');
|
|
24
24
|
require('./shared/unplugin.BkRah5Ot.cjs');
|
|
25
25
|
require('postcss-value-parser');
|
|
26
26
|
|
package/dist/vite.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { $ as default } from './shared/unplugin.
|
|
1
|
+
export { $ as default } from './shared/unplugin.CVMbUfH5.mjs';
|
|
2
2
|
import 'node:crypto';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:module';
|
|
@@ -12,10 +12,10 @@ import '@csszyx/svelte-adapter';
|
|
|
12
12
|
import '@csszyx/types';
|
|
13
13
|
import '@csszyx/vue-adapter';
|
|
14
14
|
import 'unplugin';
|
|
15
|
+
import './shared/unplugin.fOnGXWgS.mjs';
|
|
15
16
|
import './css-mangler.mjs';
|
|
16
17
|
import 'postcss';
|
|
17
18
|
import 'postcss-selector-parser';
|
|
18
|
-
import './shared/unplugin.
|
|
19
|
-
import './shared/unplugin.D-K57LNR.mjs';
|
|
19
|
+
import './shared/unplugin.Lhzkcj-A.mjs';
|
|
20
20
|
import './shared/unplugin.B3XoSRB8.mjs';
|
|
21
21
|
import 'postcss-value-parser';
|
package/dist/webpack.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const unplugin = require('./shared/unplugin.
|
|
5
|
+
const unplugin = require('./shared/unplugin.CRuVOB4Q.cjs');
|
|
6
6
|
require('node:crypto');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('node:module');
|
|
@@ -16,11 +16,11 @@ require('@csszyx/svelte-adapter');
|
|
|
16
16
|
require('@csszyx/types');
|
|
17
17
|
require('@csszyx/vue-adapter');
|
|
18
18
|
require('unplugin');
|
|
19
|
+
require('./shared/unplugin.CKIOVNOg.cjs');
|
|
19
20
|
require('./css-mangler.cjs');
|
|
20
21
|
require('postcss');
|
|
21
22
|
require('postcss-selector-parser');
|
|
22
|
-
require('./shared/unplugin.
|
|
23
|
-
require('./shared/unplugin.DVCQC5wq.cjs');
|
|
23
|
+
require('./shared/unplugin.Cnxm1DcC.cjs');
|
|
24
24
|
require('./shared/unplugin.BkRah5Ot.cjs');
|
|
25
25
|
require('postcss-value-parser');
|
|
26
26
|
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a0 as default } from './shared/unplugin.
|
|
1
|
+
export { a0 as default } from './shared/unplugin.CVMbUfH5.mjs';
|
|
2
2
|
import 'node:crypto';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:module';
|
|
@@ -12,10 +12,10 @@ import '@csszyx/svelte-adapter';
|
|
|
12
12
|
import '@csszyx/types';
|
|
13
13
|
import '@csszyx/vue-adapter';
|
|
14
14
|
import 'unplugin';
|
|
15
|
+
import './shared/unplugin.fOnGXWgS.mjs';
|
|
15
16
|
import './css-mangler.mjs';
|
|
16
17
|
import 'postcss';
|
|
17
18
|
import 'postcss-selector-parser';
|
|
18
|
-
import './shared/unplugin.
|
|
19
|
-
import './shared/unplugin.D-K57LNR.mjs';
|
|
19
|
+
import './shared/unplugin.Lhzkcj-A.mjs';
|
|
20
20
|
import './shared/unplugin.B3XoSRB8.mjs';
|
|
21
21
|
import 'postcss-value-parser';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/unplugin",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.10",
|
|
4
4
|
"description": "Vite and Webpack integration for csszyx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"csszyx",
|
|
@@ -112,35 +112,35 @@
|
|
|
112
112
|
"dist"
|
|
113
113
|
],
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"postcss": "^8.
|
|
116
|
-
"postcss-selector-parser": "^
|
|
115
|
+
"postcss": "^8.5.19",
|
|
116
|
+
"postcss-selector-parser": "^7.1.4",
|
|
117
117
|
"postcss-value-parser": "^4.2.0",
|
|
118
118
|
"proper-lockfile": "^4.1.2",
|
|
119
|
-
"unplugin": "^
|
|
120
|
-
"@csszyx/compiler": "0.11.
|
|
121
|
-
"@csszyx/core": "0.11.
|
|
122
|
-
"@csszyx/
|
|
123
|
-
"@csszyx/
|
|
124
|
-
"@csszyx/
|
|
119
|
+
"unplugin": "^3.3.0",
|
|
120
|
+
"@csszyx/compiler": "0.11.10",
|
|
121
|
+
"@csszyx/core": "0.11.10",
|
|
122
|
+
"@csszyx/vue-adapter": "0.11.10",
|
|
123
|
+
"@csszyx/svelte-adapter": "0.11.10",
|
|
124
|
+
"@csszyx/types": "0.11.10"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
|
-
"@csszyx/runtime": "^0.11.
|
|
127
|
+
"@csszyx/runtime": "^0.11.10"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
|
-
"@tailwindcss/node": "4.3.
|
|
131
|
-
"@types/node": "^20.
|
|
130
|
+
"@tailwindcss/node": "4.3.3",
|
|
131
|
+
"@types/node": "^22.20.1",
|
|
132
132
|
"@types/proper-lockfile": "^4.1.4",
|
|
133
133
|
"esbuild": "^0.28.1",
|
|
134
|
-
"rollup": "^4.
|
|
134
|
+
"rollup": "^4.62.2",
|
|
135
135
|
"typescript": "^6.0.3",
|
|
136
136
|
"unbuild": "^3.6.1",
|
|
137
|
-
"vite": "^8.
|
|
138
|
-
"vitest": "^4.1.
|
|
139
|
-
"webpack": "^5.
|
|
137
|
+
"vite": "^8.1.5",
|
|
138
|
+
"vitest": "^4.1.10",
|
|
139
|
+
"webpack": "^5.108.4"
|
|
140
140
|
},
|
|
141
141
|
"sideEffects": false,
|
|
142
142
|
"engines": {
|
|
143
|
-
"node": "
|
|
143
|
+
"node": "^22.18.0 || >=24.11.0"
|
|
144
144
|
},
|
|
145
145
|
"scripts": {
|
|
146
146
|
"build": "unbuild",
|
|
@@ -353,6 +353,52 @@ function sleepSync(ms) {
|
|
|
353
353
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
+
function createNextCacheIdentity(input) {
|
|
357
|
+
const configHash = hashString(stableStringify(input.config));
|
|
358
|
+
const envHash = hashString(stableStringify(pickEnv(input.env ?? {}, input.envKeys ?? [])));
|
|
359
|
+
const generation = hashString(
|
|
360
|
+
stableStringify({
|
|
361
|
+
root: input.root,
|
|
362
|
+
configHash,
|
|
363
|
+
envHash,
|
|
364
|
+
nextVersion: input.nextVersion,
|
|
365
|
+
csszyxVersion: input.csszyxVersion,
|
|
366
|
+
nativeVersion: input.nativeVersion,
|
|
367
|
+
mode: input.mode
|
|
368
|
+
})
|
|
369
|
+
);
|
|
370
|
+
return { configHash, envHash, generation };
|
|
371
|
+
}
|
|
372
|
+
function stableStringify(value) {
|
|
373
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
374
|
+
return JSON.stringify(value);
|
|
375
|
+
}
|
|
376
|
+
if (typeof value === "number") {
|
|
377
|
+
return Number.isFinite(value) ? JSON.stringify(value) : "null";
|
|
378
|
+
}
|
|
379
|
+
if (Array.isArray(value)) {
|
|
380
|
+
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
381
|
+
}
|
|
382
|
+
if (typeof value === "object") {
|
|
383
|
+
const entries = Object.entries(value).filter((entry) => entry[1] !== void 0).sort(([left], [right]) => left.localeCompare(right));
|
|
384
|
+
return `{${entries.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableStringify(entryValue)}`).join(",")}}`;
|
|
385
|
+
}
|
|
386
|
+
return "null";
|
|
387
|
+
}
|
|
388
|
+
function pickEnv(env, envKeys) {
|
|
389
|
+
const selected = {};
|
|
390
|
+
for (const key of sortStrings(new Set(envKeys))) {
|
|
391
|
+
const value = env[key];
|
|
392
|
+
if (value !== void 0) {
|
|
393
|
+
selected[key] = value;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return selected;
|
|
397
|
+
}
|
|
398
|
+
function hashString(value) {
|
|
399
|
+
return `sha256:${createHash("sha256").update(value).digest("hex")}`;
|
|
400
|
+
}
|
|
401
|
+
|
|
356
402
|
function resolveNextGenerationManifestPath(rootDir, cacheDir = ".csszyx/cache") {
|
|
357
403
|
return path.resolve(rootDir, cacheDir, "generation-manifest.json");
|
|
358
404
|
}
|
|
@@ -417,52 +463,6 @@ function normalizeManifest(manifest) {
|
|
|
417
463
|
};
|
|
418
464
|
}
|
|
419
465
|
|
|
420
|
-
function createNextCacheIdentity(input) {
|
|
421
|
-
const configHash = hashString(stableStringify(input.config));
|
|
422
|
-
const envHash = hashString(stableStringify(pickEnv(input.env ?? {}, input.envKeys ?? [])));
|
|
423
|
-
const generation = hashString(
|
|
424
|
-
stableStringify({
|
|
425
|
-
root: input.root,
|
|
426
|
-
configHash,
|
|
427
|
-
envHash,
|
|
428
|
-
nextVersion: input.nextVersion,
|
|
429
|
-
csszyxVersion: input.csszyxVersion,
|
|
430
|
-
nativeVersion: input.nativeVersion,
|
|
431
|
-
mode: input.mode
|
|
432
|
-
})
|
|
433
|
-
);
|
|
434
|
-
return { configHash, envHash, generation };
|
|
435
|
-
}
|
|
436
|
-
function stableStringify(value) {
|
|
437
|
-
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
438
|
-
return JSON.stringify(value);
|
|
439
|
-
}
|
|
440
|
-
if (typeof value === "number") {
|
|
441
|
-
return Number.isFinite(value) ? JSON.stringify(value) : "null";
|
|
442
|
-
}
|
|
443
|
-
if (Array.isArray(value)) {
|
|
444
|
-
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
445
|
-
}
|
|
446
|
-
if (typeof value === "object") {
|
|
447
|
-
const entries = Object.entries(value).filter((entry) => entry[1] !== void 0).sort(([left], [right]) => left.localeCompare(right));
|
|
448
|
-
return `{${entries.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableStringify(entryValue)}`).join(",")}}`;
|
|
449
|
-
}
|
|
450
|
-
return "null";
|
|
451
|
-
}
|
|
452
|
-
function pickEnv(env, envKeys) {
|
|
453
|
-
const selected = {};
|
|
454
|
-
for (const key of sortStrings(new Set(envKeys))) {
|
|
455
|
-
const value = env[key];
|
|
456
|
-
if (value !== void 0) {
|
|
457
|
-
selected[key] = value;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
return selected;
|
|
461
|
-
}
|
|
462
|
-
function hashString(value) {
|
|
463
|
-
return `sha256:${createHash("sha256").update(value).digest("hex")}`;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
466
|
function resolveNextAppRoot(input) {
|
|
467
467
|
if (input.explicitRoot) {
|
|
468
468
|
return { root: path.resolve(input.explicitRoot), source: "explicit" };
|
|
@@ -373,6 +373,52 @@ function sleepSync(ms) {
|
|
|
373
373
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
function createNextCacheIdentity(input) {
|
|
377
|
+
const configHash = hashString(stableStringify(input.config));
|
|
378
|
+
const envHash = hashString(stableStringify(pickEnv(input.env ?? {}, input.envKeys ?? [])));
|
|
379
|
+
const generation = hashString(
|
|
380
|
+
stableStringify({
|
|
381
|
+
root: input.root,
|
|
382
|
+
configHash,
|
|
383
|
+
envHash,
|
|
384
|
+
nextVersion: input.nextVersion,
|
|
385
|
+
csszyxVersion: input.csszyxVersion,
|
|
386
|
+
nativeVersion: input.nativeVersion,
|
|
387
|
+
mode: input.mode
|
|
388
|
+
})
|
|
389
|
+
);
|
|
390
|
+
return { configHash, envHash, generation };
|
|
391
|
+
}
|
|
392
|
+
function stableStringify(value) {
|
|
393
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
394
|
+
return JSON.stringify(value);
|
|
395
|
+
}
|
|
396
|
+
if (typeof value === "number") {
|
|
397
|
+
return Number.isFinite(value) ? JSON.stringify(value) : "null";
|
|
398
|
+
}
|
|
399
|
+
if (Array.isArray(value)) {
|
|
400
|
+
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
401
|
+
}
|
|
402
|
+
if (typeof value === "object") {
|
|
403
|
+
const entries = Object.entries(value).filter((entry) => entry[1] !== void 0).sort(([left], [right]) => left.localeCompare(right));
|
|
404
|
+
return `{${entries.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableStringify(entryValue)}`).join(",")}}`;
|
|
405
|
+
}
|
|
406
|
+
return "null";
|
|
407
|
+
}
|
|
408
|
+
function pickEnv(env, envKeys) {
|
|
409
|
+
const selected = {};
|
|
410
|
+
for (const key of htmlEscape.sortStrings(new Set(envKeys))) {
|
|
411
|
+
const value = env[key];
|
|
412
|
+
if (value !== void 0) {
|
|
413
|
+
selected[key] = value;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return selected;
|
|
417
|
+
}
|
|
418
|
+
function hashString(value) {
|
|
419
|
+
return `sha256:${node_crypto.createHash("sha256").update(value).digest("hex")}`;
|
|
420
|
+
}
|
|
421
|
+
|
|
376
422
|
function resolveNextGenerationManifestPath(rootDir, cacheDir = ".csszyx/cache") {
|
|
377
423
|
return path__namespace.resolve(rootDir, cacheDir, "generation-manifest.json");
|
|
378
424
|
}
|
|
@@ -437,52 +483,6 @@ function normalizeManifest(manifest) {
|
|
|
437
483
|
};
|
|
438
484
|
}
|
|
439
485
|
|
|
440
|
-
function createNextCacheIdentity(input) {
|
|
441
|
-
const configHash = hashString(stableStringify(input.config));
|
|
442
|
-
const envHash = hashString(stableStringify(pickEnv(input.env ?? {}, input.envKeys ?? [])));
|
|
443
|
-
const generation = hashString(
|
|
444
|
-
stableStringify({
|
|
445
|
-
root: input.root,
|
|
446
|
-
configHash,
|
|
447
|
-
envHash,
|
|
448
|
-
nextVersion: input.nextVersion,
|
|
449
|
-
csszyxVersion: input.csszyxVersion,
|
|
450
|
-
nativeVersion: input.nativeVersion,
|
|
451
|
-
mode: input.mode
|
|
452
|
-
})
|
|
453
|
-
);
|
|
454
|
-
return { configHash, envHash, generation };
|
|
455
|
-
}
|
|
456
|
-
function stableStringify(value) {
|
|
457
|
-
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
458
|
-
return JSON.stringify(value);
|
|
459
|
-
}
|
|
460
|
-
if (typeof value === "number") {
|
|
461
|
-
return Number.isFinite(value) ? JSON.stringify(value) : "null";
|
|
462
|
-
}
|
|
463
|
-
if (Array.isArray(value)) {
|
|
464
|
-
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
465
|
-
}
|
|
466
|
-
if (typeof value === "object") {
|
|
467
|
-
const entries = Object.entries(value).filter((entry) => entry[1] !== void 0).sort(([left], [right]) => left.localeCompare(right));
|
|
468
|
-
return `{${entries.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableStringify(entryValue)}`).join(",")}}`;
|
|
469
|
-
}
|
|
470
|
-
return "null";
|
|
471
|
-
}
|
|
472
|
-
function pickEnv(env, envKeys) {
|
|
473
|
-
const selected = {};
|
|
474
|
-
for (const key of htmlEscape.sortStrings(new Set(envKeys))) {
|
|
475
|
-
const value = env[key];
|
|
476
|
-
if (value !== void 0) {
|
|
477
|
-
selected[key] = value;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
return selected;
|
|
481
|
-
}
|
|
482
|
-
function hashString(value) {
|
|
483
|
-
return `sha256:${node_crypto.createHash("sha256").update(value).digest("hex")}`;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
486
|
function resolveNextAppRoot(input) {
|
|
487
487
|
if (input.explicitRoot) {
|
|
488
488
|
return { root: path__namespace.resolve(input.explicitRoot), source: "explicit" };
|