Skip to content

Commit a767989

Browse files
committed
chore: collect tailwindcss 3.4.5
1 parent bcbebab commit a767989

File tree

18 files changed

+942
-127
lines changed

18 files changed

+942
-127
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/fs-extra": "^11.0.4",
3636
"@types/lodash-es": "^4.17.12",
3737
"@types/node": "^20.14.10",
38-
"@vitest/coverage-v8": "^2.0.2",
38+
"@vitest/coverage-v8": "^2.0.3",
3939
"bumpp": "^9.4.1",
4040
"cross-env": "^7.0.3",
4141
"dedent": "^1.5.3",
@@ -59,6 +59,6 @@
5959
"unplugin": "^1.11.0",
6060
"unplugin-tailwindcss-mangle": "workspace:*",
6161
"vite-tsconfig-paths": "^4.3.2",
62-
"vitest": "^2.0.2"
62+
"vitest": "^2.0.3"
6363
}
6464
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@ast-core/escape": "^1.0.1",
5555
"@babel/parser": "^7.24.8",
5656
"@babel/traverse": "^7.24.8",
57-
"@babel/types": "^7.24.8",
57+
"@babel/types": "^7.24.9",
5858
"@tailwindcss-mangle/config": "workspace:^",
5959
"@tailwindcss-mangle/shared": "workspace:^",
6060
"fast-sort": "^3.4.0",

packages/tailwindcss-patch/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
}
5050
},
5151
"dependencies": {
52-
"@babel/generator": "^7.24.8",
52+
"@babel/generator": "^7.24.9",
5353
"@babel/parser": "^7.24.8",
5454
"@babel/traverse": "^7.24.8",
55-
"@babel/types": "^7.24.8",
55+
"@babel/types": "^7.24.9",
5656
"@tailwindcss-mangle/config": "workspace:^",
5757
"cac": "^6.7.14",
5858
"jiti": "^1.21.6",
@@ -68,7 +68,7 @@
6868
"@types/semver": "^7.5.8",
6969
"pkg-types": "^1.1.3",
7070
"postcss7": "npm:postcss@7",
71-
"tailwindcss": "^3.4.4",
71+
"tailwindcss": "^3.4.5",
7272
"tailwindcss2": "npm:@tailwindcss/postcss7-compat@^2.2.17"
7373
},
7474
"directories": {

packages/tailwindcss-patch/test/__snapshots__/index.test.ts.snap

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,3 +3015,125 @@ function processTailwindFeatures(setupContext) {
30153015
}",
30163016
}
30173017
`;
3018+
3019+
exports[`versions-patch > patch tailwindcss3.4.5 1`] = `
3020+
{
3021+
"plugin": ""use strict";
3022+
3023+
Object.defineProperty(exports, "__esModule", {
3024+
value: true
3025+
});
3026+
const _setupTrackingContext = /*#__PURE__*/_interop_require_default(require("./lib/setupTrackingContext"));
3027+
const _processTailwindFeatures = /*#__PURE__*/_interop_require_default(require("./processTailwindFeatures"));
3028+
const _sharedState = require("./lib/sharedState");
3029+
const _findAtConfigPath = require("./lib/findAtConfigPath");
3030+
function _interop_require_default(obj) {
3031+
return obj && obj.__esModule ? obj : {
3032+
default: obj
3033+
};
3034+
}
3035+
const contextRef = {
3036+
value: []
3037+
};
3038+
module.exports = function tailwindcss(configOrPath) {
3039+
return {
3040+
postcssPlugin: "tailwindcss",
3041+
plugins: [_sharedState.env.DEBUG && function (root) {
3042+
console.log("\\n");
3043+
console.time("JIT TOTAL");
3044+
return root;
3045+
}, async function (root, result) {
3046+
contextRef.value.length = 0;
3047+
var _findAtConfigPath1;
3048+
// Use the path for the \`@config\` directive if it exists, otherwise use the
3049+
// path for the file being processed
3050+
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
3051+
let context = (0, _setupTrackingContext.default)(configOrPath);
3052+
if (root.type === "document") {
3053+
let roots = root.nodes.filter(node => node.type === "root");
3054+
for (const root of roots) {
3055+
if (root.type === "root") {
3056+
contextRef.value.push(await (0, _processTailwindFeatures.default)(context)(root, result));
3057+
}
3058+
}
3059+
return;
3060+
}
3061+
contextRef.value.push(await (0, _processTailwindFeatures.default)(context)(root, result));
3062+
}, _sharedState.env.DEBUG && function (root) {
3063+
console.timeEnd("JIT TOTAL");
3064+
console.log("\\n");
3065+
return root;
3066+
}].filter(Boolean)
3067+
};
3068+
};
3069+
module.exports.postcss = true;
3070+
module.exports.contextRef = contextRef;",
3071+
"processTailwindFeatures": ""use strict";
3072+
3073+
Object.defineProperty(exports, "__esModule", {
3074+
value: true
3075+
});
3076+
Object.defineProperty(exports, "default", {
3077+
enumerable: true,
3078+
get: function () {
3079+
return processTailwindFeatures;
3080+
}
3081+
});
3082+
const _normalizeTailwindDirectives = /*#__PURE__*/_interop_require_default(require("./lib/normalizeTailwindDirectives"));
3083+
const _expandTailwindAtRules = /*#__PURE__*/_interop_require_default(require("./lib/expandTailwindAtRules"));
3084+
const _expandApplyAtRules = /*#__PURE__*/_interop_require_default(require("./lib/expandApplyAtRules"));
3085+
const _evaluateTailwindFunctions = /*#__PURE__*/_interop_require_default(require("./lib/evaluateTailwindFunctions"));
3086+
const _substituteScreenAtRules = /*#__PURE__*/_interop_require_default(require("./lib/substituteScreenAtRules"));
3087+
const _resolveDefaultsAtRules = /*#__PURE__*/_interop_require_default(require("./lib/resolveDefaultsAtRules"));
3088+
const _collapseAdjacentRules = /*#__PURE__*/_interop_require_default(require("./lib/collapseAdjacentRules"));
3089+
const _collapseDuplicateDeclarations = /*#__PURE__*/_interop_require_default(require("./lib/collapseDuplicateDeclarations"));
3090+
const _partitionApplyAtRules = /*#__PURE__*/_interop_require_default(require("./lib/partitionApplyAtRules"));
3091+
const _setupContextUtils = require("./lib/setupContextUtils");
3092+
const _featureFlags = require("./featureFlags");
3093+
function _interop_require_default(obj) {
3094+
return obj && obj.__esModule ? obj : {
3095+
default: obj
3096+
};
3097+
}
3098+
function processTailwindFeatures(setupContext) {
3099+
return async function (root, result) {
3100+
let {
3101+
tailwindDirectives,
3102+
applyDirectives
3103+
} = (0, _normalizeTailwindDirectives.default)(root);
3104+
// Partition apply rules that are found in the css
3105+
// itself.
3106+
(0, _partitionApplyAtRules.default)()(root, result);
3107+
let context = setupContext({
3108+
tailwindDirectives,
3109+
applyDirectives,
3110+
registerDependency(dependency) {
3111+
result.messages.push({
3112+
plugin: "tailwindcss",
3113+
parent: result.opts.from,
3114+
...dependency
3115+
});
3116+
},
3117+
createContext(tailwindConfig, changedContent) {
3118+
return (0, _setupContextUtils.createContext)(tailwindConfig, changedContent, root);
3119+
}
3120+
})(root, result);
3121+
if (context.tailwindConfig.separator === "-") {
3122+
throw new Error("The '-' character cannot be used as a custom separator in JIT mode due to parsing ambiguity. Please use another character like '_' instead.");
3123+
}
3124+
(0, _featureFlags.issueFlagNotices)(context.tailwindConfig);
3125+
await (0, _expandTailwindAtRules.default)(context)(root, result);
3126+
// Partition apply rules that are generated by
3127+
// addComponents, addUtilities and so on.
3128+
(0, _partitionApplyAtRules.default)()(root, result);
3129+
(0, _expandApplyAtRules.default)(context)(root, result);
3130+
(0, _evaluateTailwindFunctions.default)(context)(root, result);
3131+
(0, _substituteScreenAtRules.default)(context)(root, result);
3132+
(0, _resolveDefaultsAtRules.default)(context)(root, result);
3133+
(0, _collapseAdjacentRules.default)(context)(root, result);
3134+
(0, _collapseDuplicateDeclarations.default)(context)(root, result);
3135+
return context;
3136+
};
3137+
}",
3138+
}
3139+
`;

packages/tailwindcss-patch/test/__snapshots__/postcss.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`postcss > getCss 0.common 1`] = `
44
"/*
5-
! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com
5+
! tailwindcss v3.4.5 | MIT License | https://tailwindcss.com
66
*//*
77
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
88
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
module.exports = require("./plugin");
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", {
3+
value: true
4+
});
5+
const _setupTrackingContext = /*#__PURE__*/ _interop_require_default(require("./lib/setupTrackingContext"));
6+
const _processTailwindFeatures = /*#__PURE__*/ _interop_require_default(require("./processTailwindFeatures"));
7+
const _sharedState = require("./lib/sharedState");
8+
const _findAtConfigPath = require("./lib/findAtConfigPath");
9+
function _interop_require_default(obj) {
10+
return obj && obj.__esModule ? obj : {
11+
default: obj
12+
};
13+
}
14+
module.exports = function tailwindcss(configOrPath) {
15+
return {
16+
postcssPlugin: "tailwindcss",
17+
plugins: [
18+
_sharedState.env.DEBUG && function(root) {
19+
console.log("\n");
20+
console.time("JIT TOTAL");
21+
return root;
22+
},
23+
async function(root, result) {
24+
var _findAtConfigPath1;
25+
// Use the path for the `@config` directive if it exists, otherwise use the
26+
// path for the file being processed
27+
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
28+
let context = (0, _setupTrackingContext.default)(configOrPath);
29+
if (root.type === "document") {
30+
let roots = root.nodes.filter((node)=>node.type === "root");
31+
for (const root of roots){
32+
if (root.type === "root") {
33+
await (0, _processTailwindFeatures.default)(context)(root, result);
34+
}
35+
}
36+
return;
37+
}
38+
await (0, _processTailwindFeatures.default)(context)(root, result);
39+
},
40+
_sharedState.env.DEBUG && function(root) {
41+
console.timeEnd("JIT TOTAL");
42+
console.log("\n");
43+
return root;
44+
}
45+
].filter(Boolean)
46+
};
47+
};
48+
module.exports.postcss = true;
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", {
3+
value: true
4+
});
5+
Object.defineProperty(exports, "default", {
6+
enumerable: true,
7+
get: function() {
8+
return processTailwindFeatures;
9+
}
10+
});
11+
const _normalizeTailwindDirectives = /*#__PURE__*/ _interop_require_default(require("./lib/normalizeTailwindDirectives"));
12+
const _expandTailwindAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/expandTailwindAtRules"));
13+
const _expandApplyAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/expandApplyAtRules"));
14+
const _evaluateTailwindFunctions = /*#__PURE__*/ _interop_require_default(require("./lib/evaluateTailwindFunctions"));
15+
const _substituteScreenAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/substituteScreenAtRules"));
16+
const _resolveDefaultsAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/resolveDefaultsAtRules"));
17+
const _collapseAdjacentRules = /*#__PURE__*/ _interop_require_default(require("./lib/collapseAdjacentRules"));
18+
const _collapseDuplicateDeclarations = /*#__PURE__*/ _interop_require_default(require("./lib/collapseDuplicateDeclarations"));
19+
const _partitionApplyAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/partitionApplyAtRules"));
20+
const _setupContextUtils = require("./lib/setupContextUtils");
21+
const _featureFlags = require("./featureFlags");
22+
function _interop_require_default(obj) {
23+
return obj && obj.__esModule ? obj : {
24+
default: obj
25+
};
26+
}
27+
function processTailwindFeatures(setupContext) {
28+
return async function(root, result) {
29+
let { tailwindDirectives , applyDirectives } = (0, _normalizeTailwindDirectives.default)(root);
30+
// Partition apply rules that are found in the css
31+
// itself.
32+
(0, _partitionApplyAtRules.default)()(root, result);
33+
let context = setupContext({
34+
tailwindDirectives,
35+
applyDirectives,
36+
registerDependency (dependency) {
37+
result.messages.push({
38+
plugin: "tailwindcss",
39+
parent: result.opts.from,
40+
...dependency
41+
});
42+
},
43+
createContext (tailwindConfig, changedContent) {
44+
return (0, _setupContextUtils.createContext)(tailwindConfig, changedContent, root);
45+
}
46+
})(root, result);
47+
if (context.tailwindConfig.separator === "-") {
48+
throw new Error("The '-' character cannot be used as a custom separator in JIT mode due to parsing ambiguity. Please use another character like '_' instead.");
49+
}
50+
(0, _featureFlags.issueFlagNotices)(context.tailwindConfig);
51+
await (0, _expandTailwindAtRules.default)(context)(root, result);
52+
// Partition apply rules that are generated by
53+
// addComponents, addUtilities and so on.
54+
(0, _partitionApplyAtRules.default)()(root, result);
55+
(0, _expandApplyAtRules.default)(context)(root, result);
56+
(0, _evaluateTailwindFunctions.default)(context)(root, result);
57+
(0, _substituteScreenAtRules.default)(context)(root, result);
58+
(0, _resolveDefaultsAtRules.default)(context)(root, result);
59+
(0, _collapseAdjacentRules.default)(context)(root, result);
60+
(0, _collapseDuplicateDeclarations.default)(context)(root, result);
61+
};
62+
}

0 commit comments

Comments
 (0)