tailwindcss-patch 9.4.3 → 9.4.4
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/{cli-D0jXMGXf.mjs → cli-CLvyx3xl.mjs} +1 -1
- package/dist/{cli-BztQHMRp.js → cli-srv0kRlt.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/commands/cli-runtime.js +2 -2
- package/dist/commands/cli-runtime.mjs +2 -2
- package/dist/{dist-DDcbvOwe.js → dist-Dn7cMVhi.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{validate-Bug_WYcU.mjs → validate-CUNJFfHh.mjs} +4 -4
- package/dist/{validate-DbuKewV-.js → validate-RpdgpjgT.js} +5 -5
- package/package.json +7 -7
- package/src/api/tailwindcss-patcher.ts +5 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as groupTokensByFile, a as tailwindcssPatchCommands, et as loadPatchOptionsForWorkspace, i as classifyValidateError, it as logger, o as migrateConfigFiles, r as ValidateCommandError, s as restoreConfigFiles, tt as loadWorkspaceConfigModule, u as TailwindcssPatcher } from "./validate-
|
|
1
|
+
import { S as groupTokensByFile, a as tailwindcssPatchCommands, et as loadPatchOptionsForWorkspace, i as classifyValidateError, it as logger, o as migrateConfigFiles, r as ValidateCommandError, s as restoreConfigFiles, tt as loadWorkspaceConfigModule, u as TailwindcssPatcher } from "./validate-CUNJFfHh.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import path from "pathe";
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_validate = require("./validate-
|
|
2
|
-
const require_cli = require("./cli-
|
|
1
|
+
const require_validate = require("./validate-RpdgpjgT.js");
|
|
2
|
+
const require_cli = require("./cli-srv0kRlt.js");
|
|
3
3
|
let node_process = require("node:process");
|
|
4
4
|
node_process = require_validate.__toESM(node_process);
|
|
5
5
|
//#region src/cli.ts
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { it as logger, r as ValidateCommandError } from "./validate-
|
|
2
|
-
import { t as createTailwindcssPatchCli } from "./cli-
|
|
1
|
+
import { it as logger, r as ValidateCommandError } from "./validate-CUNJFfHh.mjs";
|
|
2
|
+
import { t as createTailwindcssPatchCli } from "./cli-CLvyx3xl.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
async function main() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_validate = require("../validate-
|
|
3
|
-
const require_cli = require("../cli-
|
|
2
|
+
const require_validate = require("../validate-RpdgpjgT.js");
|
|
3
|
+
const require_cli = require("../cli-srv0kRlt.js");
|
|
4
4
|
exports.VALIDATE_EXIT_CODES = require_validate.VALIDATE_EXIT_CODES;
|
|
5
5
|
exports.VALIDATE_FAILURE_REASONS = require_validate.VALIDATE_FAILURE_REASONS;
|
|
6
6
|
exports.ValidateCommandError = require_validate.ValidateCommandError;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as tailwindcssPatchCommands, n as VALIDATE_FAILURE_REASONS, r as ValidateCommandError, t as VALIDATE_EXIT_CODES } from "../validate-
|
|
2
|
-
import { n as mountTailwindcssPatchCommands, t as createTailwindcssPatchCli } from "../cli-
|
|
1
|
+
import { a as tailwindcssPatchCommands, n as VALIDATE_FAILURE_REASONS, r as ValidateCommandError, t as VALIDATE_EXIT_CODES } from "../validate-CUNJFfHh.mjs";
|
|
2
|
+
import { n as mountTailwindcssPatchCommands, t as createTailwindcssPatchCli } from "../cli-CLvyx3xl.mjs";
|
|
3
3
|
export { VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, createTailwindcssPatchCli, mountTailwindcssPatchCommands, tailwindcssPatchCommands };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_validate = require("./validate-
|
|
2
|
+
const require_validate = require("./validate-RpdgpjgT.js");
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_validate.__toESM(node_process);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as resolveBareArbitraryValueCandidate, A as createTailwindV4RootSources, B as resolveSourceScanPath, C as resolveProjectSourceFiles, D as TAILWIND_V4_IGNORED_FILES, E as TAILWIND_V4_IGNORED_EXTENSIONS, F as isFileExcludedByTailwindV4SourceEntries, G as canonicalizeBareArbitraryValueCandidates, H as resolveTailwindV4SourceEntry, I as isFileMatchedByTailwindV4SourceEntries, J as resolveValidTailwindV4Candidates, K as extractTailwindV4InlineSourceCandidates, L as mergeTailwindV4SourceEntries, M as createTailwindV4SourceExclusionMatcher, N as expandTailwindV4SourceEntries, O as createTailwindV4CompiledSourceEntries, P as expandTailwindV4SourceEntryBraces, Q as isBareArbitraryValuesEnabled, R as normalizeTailwindV4ScannerSources, S as groupTokensByFile, T as TAILWIND_V4_IGNORED_CONTENT_DIRS, U as compileTailwindV4Source, V as resolveTailwindV4SourceBaseCandidates, W as loadTailwindV4DesignSystem, X as extractBareArbitraryValueSourceCandidates, Y as escapeCssClassName, Z as extractBareArbitraryValueSourceCandidatesWithPositions, _ as extractRawCandidates, a as tailwindcssPatchCommands, b as extractSourceCandidatesWithPositions, c as MIGRATION_REPORT_KIND, d as getPatchStatusReport, f as runTailwindBuild, g as extractProjectCandidatesWithPositions, h as collectClassesFromTailwindV4, it as logger, j as createTailwindV4SourceEntryMatcher, k as createTailwindV4DefaultIgnoreSources, l as MIGRATION_REPORT_SCHEMA_VERSION, m as collectClassesFromContexts, n as VALIDATE_FAILURE_REASONS, nt as normalizeOptions, o as migrateConfigFiles, p as loadRuntimeContexts, q as replaceBareArbitraryValueSelectors, r as ValidateCommandError, rt as CacheStore, s as restoreConfigFiles, t as VALIDATE_EXIT_CODES, u as TailwindcssPatcher, v as extractRawCandidatesWithPositions, w as TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, x as extractValidCandidates, y as extractSourceCandidates, z as normalizeTailwindV4SourceEntries } from "./validate-
|
|
1
|
+
import { $ as resolveBareArbitraryValueCandidate, A as createTailwindV4RootSources, B as resolveSourceScanPath, C as resolveProjectSourceFiles, D as TAILWIND_V4_IGNORED_FILES, E as TAILWIND_V4_IGNORED_EXTENSIONS, F as isFileExcludedByTailwindV4SourceEntries, G as canonicalizeBareArbitraryValueCandidates, H as resolveTailwindV4SourceEntry, I as isFileMatchedByTailwindV4SourceEntries, J as resolveValidTailwindV4Candidates, K as extractTailwindV4InlineSourceCandidates, L as mergeTailwindV4SourceEntries, M as createTailwindV4SourceExclusionMatcher, N as expandTailwindV4SourceEntries, O as createTailwindV4CompiledSourceEntries, P as expandTailwindV4SourceEntryBraces, Q as isBareArbitraryValuesEnabled, R as normalizeTailwindV4ScannerSources, S as groupTokensByFile, T as TAILWIND_V4_IGNORED_CONTENT_DIRS, U as compileTailwindV4Source, V as resolveTailwindV4SourceBaseCandidates, W as loadTailwindV4DesignSystem, X as extractBareArbitraryValueSourceCandidates, Y as escapeCssClassName, Z as extractBareArbitraryValueSourceCandidatesWithPositions, _ as extractRawCandidates, a as tailwindcssPatchCommands, b as extractSourceCandidatesWithPositions, c as MIGRATION_REPORT_KIND, d as getPatchStatusReport, f as runTailwindBuild, g as extractProjectCandidatesWithPositions, h as collectClassesFromTailwindV4, it as logger, j as createTailwindV4SourceEntryMatcher, k as createTailwindV4DefaultIgnoreSources, l as MIGRATION_REPORT_SCHEMA_VERSION, m as collectClassesFromContexts, n as VALIDATE_FAILURE_REASONS, nt as normalizeOptions, o as migrateConfigFiles, p as loadRuntimeContexts, q as replaceBareArbitraryValueSelectors, r as ValidateCommandError, rt as CacheStore, s as restoreConfigFiles, t as VALIDATE_EXIT_CODES, u as TailwindcssPatcher, v as extractRawCandidatesWithPositions, w as TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, x as extractValidCandidates, y as extractSourceCandidates, z as normalizeTailwindV4SourceEntries } from "./validate-CUNJFfHh.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import path from "pathe";
|
|
@@ -18,7 +18,7 @@ import _babelTraverse from "@babel/traverse";
|
|
|
18
18
|
import { parse, parse as parse$1 } from "@babel/parser";
|
|
19
19
|
import { loadConfig } from "tailwindcss-config";
|
|
20
20
|
//#region package.json
|
|
21
|
-
var version = "9.4.
|
|
21
|
+
var version = "9.4.4";
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/constants.ts
|
|
24
24
|
const pkgName = "tailwindcss-patch";
|
|
@@ -3720,9 +3720,9 @@ function createCollector(packageInfo, options, majorVersion, snapshotFactory) {
|
|
|
3720
3720
|
if (majorVersion === 4) return new TailwindV4Collector(packageInfo, options, snapshotFactory);
|
|
3721
3721
|
return new RuntimeCollector(packageInfo, options, majorVersion, snapshotFactory);
|
|
3722
3722
|
}
|
|
3723
|
-
function getPackageInfoFromCwd(packageName, cwd) {
|
|
3723
|
+
function getPackageInfoFromCwd(packageName, cwd, resolvePaths = []) {
|
|
3724
3724
|
try {
|
|
3725
|
-
const packageJsonPath = createRequire(path.join(cwd, "package.json")).resolve(`${packageName}/package.json
|
|
3725
|
+
const packageJsonPath = createRequire(path.join(cwd, "package.json")).resolve(`${packageName}/package.json`, { paths: resolvePaths });
|
|
3726
3726
|
const packageJson = fs.readJSONSync(packageJsonPath);
|
|
3727
3727
|
return {
|
|
3728
3728
|
name: packageName,
|
|
@@ -3737,7 +3737,7 @@ function getPackageInfoFromCwd(packageName, cwd) {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
function getTailwindPackageInfo(options) {
|
|
3739
3739
|
const cwd = options.tailwind.cwd ?? options.projectRoot;
|
|
3740
|
-
return (options.tailwind.resolve?.paths?.length ? getPackageInfoFromCwd(options.tailwind.packageName, cwd) : void 0) ?? getPackageInfoSync(options.tailwind.packageName, options.tailwind.resolve);
|
|
3740
|
+
return (options.tailwind.resolve?.paths?.length ? getPackageInfoFromCwd(options.tailwind.packageName, cwd, options.tailwind.resolve.paths) : void 0) ?? getPackageInfoSync(options.tailwind.packageName, options.tailwind.resolve);
|
|
3741
3741
|
}
|
|
3742
3742
|
var TailwindcssPatcher = class {
|
|
3743
3743
|
options;
|
|
@@ -47,7 +47,7 @@ _babel_traverse = __toESM(_babel_traverse);
|
|
|
47
47
|
let _babel_parser = require("@babel/parser");
|
|
48
48
|
let tailwindcss_config = require("tailwindcss-config");
|
|
49
49
|
//#region package.json
|
|
50
|
-
var version = "9.4.
|
|
50
|
+
var version = "9.4.4";
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/constants.ts
|
|
53
53
|
const pkgName = "tailwindcss-patch";
|
|
@@ -1468,7 +1468,7 @@ async function loadWorkspaceConfigModule() {
|
|
|
1468
1468
|
return configModulePromise;
|
|
1469
1469
|
}
|
|
1470
1470
|
async function loadWorkspaceDefu() {
|
|
1471
|
-
if (!defuPromise) defuPromise = Promise.resolve().then(() => require("./dist-
|
|
1471
|
+
if (!defuPromise) defuPromise = Promise.resolve().then(() => require("./dist-Dn7cMVhi.js")).then((mod) => mod.defu).catch(async (error) => {
|
|
1472
1472
|
if (!isMissingSharedModuleError(error)) throw error;
|
|
1473
1473
|
return (await import((0, node_url.pathToFileURL)(pathe.default.resolve(__dirname, "../../../shared/src/utils.ts")).href)).defu;
|
|
1474
1474
|
});
|
|
@@ -3744,9 +3744,9 @@ function createCollector(packageInfo, options, majorVersion, snapshotFactory) {
|
|
|
3744
3744
|
if (majorVersion === 4) return new TailwindV4Collector(packageInfo, options, snapshotFactory);
|
|
3745
3745
|
return new RuntimeCollector(packageInfo, options, majorVersion, snapshotFactory);
|
|
3746
3746
|
}
|
|
3747
|
-
function getPackageInfoFromCwd(packageName, cwd) {
|
|
3747
|
+
function getPackageInfoFromCwd(packageName, cwd, resolvePaths = []) {
|
|
3748
3748
|
try {
|
|
3749
|
-
const packageJsonPath = (0, node_module.createRequire)(pathe.default.join(cwd, "package.json")).resolve(`${packageName}/package.json
|
|
3749
|
+
const packageJsonPath = (0, node_module.createRequire)(pathe.default.join(cwd, "package.json")).resolve(`${packageName}/package.json`, { paths: resolvePaths });
|
|
3750
3750
|
const packageJson = fs_extra.default.readJSONSync(packageJsonPath);
|
|
3751
3751
|
return {
|
|
3752
3752
|
name: packageName,
|
|
@@ -3761,7 +3761,7 @@ function getPackageInfoFromCwd(packageName, cwd) {
|
|
|
3761
3761
|
}
|
|
3762
3762
|
function getTailwindPackageInfo(options) {
|
|
3763
3763
|
const cwd = options.tailwind.cwd ?? options.projectRoot;
|
|
3764
|
-
return (options.tailwind.resolve?.paths?.length ? getPackageInfoFromCwd(options.tailwind.packageName, cwd) : void 0) ?? (0, local_pkg.getPackageInfoSync)(options.tailwind.packageName, options.tailwind.resolve);
|
|
3764
|
+
return (options.tailwind.resolve?.paths?.length ? getPackageInfoFromCwd(options.tailwind.packageName, cwd, options.tailwind.resolve.paths) : void 0) ?? (0, local_pkg.getPackageInfoSync)(options.tailwind.packageName, options.tailwind.resolve);
|
|
3765
3765
|
}
|
|
3766
3766
|
var TailwindcssPatcher = class {
|
|
3767
3767
|
options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.4",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@babel/parser": "^7.29.7",
|
|
66
66
|
"@babel/traverse": "^7.29.7",
|
|
67
67
|
"@babel/types": "^7.29.7",
|
|
68
|
-
"@tailwindcss/node": "^4.3.
|
|
69
|
-
"@tailwindcss/oxide": "^4.3.
|
|
68
|
+
"@tailwindcss/node": "^4.3.1",
|
|
69
|
+
"@tailwindcss/oxide": "^4.3.1",
|
|
70
70
|
"cac": "6.7.14",
|
|
71
71
|
"consola": "^3.4.2",
|
|
72
72
|
"fs-extra": "^11.3.5",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"@tailwindcss-mangle/config": "7.0.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@tailwindcss/postcss": "^4.3.
|
|
83
|
-
"@tailwindcss/vite": "^4.3.
|
|
84
|
-
"tailwindcss": "^4.3.
|
|
82
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
83
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
84
|
+
"tailwindcss": "^4.3.1",
|
|
85
85
|
"tailwindcss-3": "npm:tailwindcss@^3.4.19",
|
|
86
|
-
"tailwindcss-4": "npm:tailwindcss@^4.3.
|
|
86
|
+
"tailwindcss-4": "npm:tailwindcss@^4.3.1"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"dev": "tsdown --watch --sourcemap",
|
|
@@ -104,9 +104,11 @@ function createCollector(
|
|
|
104
104
|
return new RuntimeCollector(packageInfo, options, majorVersion, snapshotFactory)
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
function getPackageInfoFromCwd(packageName: string, cwd: string): PackageInfo | undefined {
|
|
107
|
+
function getPackageInfoFromCwd(packageName: string, cwd: string, resolvePaths: string[] = []): PackageInfo | undefined {
|
|
108
108
|
try {
|
|
109
|
-
const packageJsonPath = createRequire(path.join(cwd, 'package.json')).resolve(`${packageName}/package.json
|
|
109
|
+
const packageJsonPath = createRequire(path.join(cwd, 'package.json')).resolve(`${packageName}/package.json`, {
|
|
110
|
+
paths: resolvePaths,
|
|
111
|
+
})
|
|
110
112
|
const packageJson = fs.readJSONSync(packageJsonPath) as PackageInfo['packageJson']
|
|
111
113
|
return {
|
|
112
114
|
name: packageName,
|
|
@@ -124,7 +126,7 @@ function getPackageInfoFromCwd(packageName: string, cwd: string): PackageInfo |
|
|
|
124
126
|
function getTailwindPackageInfo(options: NormalizedTailwindCssPatchOptions) {
|
|
125
127
|
const cwd = options.tailwind.cwd ?? options.projectRoot
|
|
126
128
|
const cwdPackageInfo = options.tailwind.resolve?.paths?.length
|
|
127
|
-
? getPackageInfoFromCwd(options.tailwind.packageName, cwd)
|
|
129
|
+
? getPackageInfoFromCwd(options.tailwind.packageName, cwd, options.tailwind.resolve.paths)
|
|
128
130
|
: undefined
|
|
129
131
|
return cwdPackageInfo
|
|
130
132
|
?? getPackageInfoSync(
|