Skip to content

Commit

Permalink
chore(deps): upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Jan 17, 2024
1 parent 86c4e0c commit d6093b4
Show file tree
Hide file tree
Showing 18 changed files with 1,566 additions and 657 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@
"@tailwindcss-mangle/shared": "workspace:*",
"@tsconfig/recommended": "^1.0.3",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.5",
"@vitest/coverage-v8": "^1.1.0",
"bumpp": "^9.2.1",
"@types/node": "^20.11.5",
"@vitest/coverage-v8": "^1.2.0",
"bumpp": "^9.3.0",
"cross-env": "^7.0.3",
"dedent": "^1.5.1",
"defu": "^6.1.3",
"defu": "^6.1.4",
"del": "^7.1.0",
"eslint": "^8.56.0",
"eslint-config-icebreaker": "^1.2.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.0",
"eslint-plugin-prettier": "^5.1.3",
"lodash-es": "^4.17.21",
"only-allow": "^1.2.1",
"prettier": "^3.1.1",
"rollup": "^4.9.1",
"prettier": "^3.2.3",
"rollup": "^4.9.5",
"tailwindcss-patch": "workspace:*",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"unplugin-tailwindcss-mangle": "workspace:*",
"vitest": "^1.1.0"
"vitest": "^1.2.0"
},
"engines": {
"node": ">=16.6.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"dependencies": {
"@tailwindcss-mangle/shared": "workspace:^",
"c12": "^1.5.1",
"c12": "^1.6.1",
"dedent": "^1.5.1"
},
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"dependencies": {
"@ast-core/escape": "^1.0.1",
"@babel/core": "^7.23.6",
"@babel/core": "^7.23.7",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/preset-typescript": "^7.23.3",
"@babel/types": "^7.23.6",
Expand All @@ -54,15 +54,15 @@
"magic-string": "^0.30.5",
"micromatch": "^4.0.5",
"parse5": "^7.1.2",
"postcss": "^8.4.32",
"postcss-selector-parser": "^6.0.13"
"postcss": "^8.4.33",
"postcss-selector-parser": "^6.0.15"
},
"devDependencies": {
"@parse5/tools": "^0.3.0",
"@parse5/tools": "^0.4.0",
"@types/babel__core": "^7.20.5",
"@types/micromatch": "^4.0.6",
"@vue/compiler-core": "^3.3.13",
"@vue/compiler-sfc": "^3.3.13"
"@vue/compiler-core": "^3.4.14",
"@vue/compiler-sfc": "^3.4.14"
},
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions packages/tailwindcss-patch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@
},
"devDependencies": {
"@types/babel__generator": "^7.6.8",
"@types/babel__traverse": "^7.20.4",
"@types/babel__traverse": "^7.20.5",
"@types/resolve": "^1.20.6",
"@types/semver": "^7.5.6",
"pkg-types": "^1.0.3",
"tailwindcss": "^3.4.0"
"tailwindcss": "^3.4.1"
},
"dependencies": {
"@babel/generator": "^7.23.6",
"@babel/parser": "^7.23.6",
"@babel/traverse": "^7.23.6",
"@babel/traverse": "^7.23.7",
"@babel/types": "^7.23.6",
"@tailwindcss-mangle/config": "workspace:^",
"cac": "^6.7.14",
"jiti": "^1.21.0",
"lilconfig": "^3.0.0",
"postcss": "^8.4.32",
"postcss": "^8.4.33",
"resolve": "^1.22.8",
"semver": "^7.5.4"
},
Expand Down
163 changes: 163 additions & 0 deletions packages/tailwindcss-patch/test/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2527,3 +2527,166 @@ function processTailwindFeatures(setupContext) {
}",
}
`;

exports[`versions-patch > patch tailwindcss3.4.1 1`] = `
{
"plugin": ""use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _setupTrackingContext = /*#__PURE__*/_interop_require_default(require("./lib/setupTrackingContext"));
const _processTailwindFeatures = /*#__PURE__*/_interop_require_default(require("./processTailwindFeatures"));
const _sharedState = require("./lib/sharedState");
const _findAtConfigPath = require("./lib/findAtConfigPath");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
const contextRef = {
value: []
};
module.exports = function tailwindcss(configOrPath) {
return {
postcssPlugin: "tailwindcss",
plugins: [_sharedState.env.DEBUG && function (root) {
console.log("\\n");
console.time("JIT TOTAL");
return root;
}, async function (root, result) {
contextRef.value.length = 0;
var _findAtConfigPath1;
// Use the path for the \`@config\` directive if it exists, otherwise use the
// path for the file being processed
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
let context = (0, _setupTrackingContext.default)(configOrPath);
if (root.type === "document") {
let roots = root.nodes.filter(node => node.type === "root");
for (const root of roots) {
if (root.type === "root") {
contextRef.value.push(await (0, _processTailwindFeatures.default)(context)(root, result));
}
}
return;
}
contextRef.value.push(await (0, _processTailwindFeatures.default)(context)(root, result));
}, false && function lightningCssPlugin(_root, result) {
let postcss = require("postcss");
let lightningcss = require("lightningcss");
let browserslist = require("browserslist");
try {
let transformed = lightningcss.transform({
filename: result.opts.from,
code: Buffer.from(result.root.toString()),
minify: false,
sourceMap: !!result.map,
inputSourceMap: result.map ? result.map.toString() : undefined,
targets: typeof process !== "undefined" && process.env.JEST_WORKER_ID ? {
chrome: 106 << 16
} : lightningcss.browserslistToTargets(browserslist(require("../package.json").browserslist)),
drafts: {
nesting: true,
customMedia: true
}
});
var _result_map;
result.map = Object.assign((_result_map = result.map) !== null && _result_map !== void 0 ? _result_map : {}, {
toJSON() {
return transformed.map.toJSON();
},
toString() {
return transformed.map.toString();
}
});
result.root = postcss.parse(transformed.code.toString("utf8"));
} catch (err) {
if (typeof process !== "undefined" && process.env.JEST_WORKER_ID) {
let lines = err.source.split("\\n");
err = new Error(["Error formatting using Lightning CSS:", "", ...["\`\`\`css", ...lines.slice(Math.max(err.loc.line - 3, 0), err.loc.line), " ".repeat(err.loc.column - 1) + "^-- " + err.toString(), ...lines.slice(err.loc.line, err.loc.line + 2), "\`\`\`"]].join("\\n"));
}
if (Error.captureStackTrace) {
Error.captureStackTrace(err, lightningCssPlugin);
}
throw err;
}
}, _sharedState.env.DEBUG && function (root) {
console.timeEnd("JIT TOTAL");
console.log("\\n");
return root;
}].filter(Boolean)
};
};
module.exports.postcss = true;
module.exports.contextRef = contextRef;",
"processTailwindFeatures": ""use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return processTailwindFeatures;
}
});
const _normalizeTailwindDirectives = /*#__PURE__*/_interop_require_default(require("./lib/normalizeTailwindDirectives"));
const _expandTailwindAtRules = /*#__PURE__*/_interop_require_default(require("./lib/expandTailwindAtRules"));
const _expandApplyAtRules = /*#__PURE__*/_interop_require_default(require("./lib/expandApplyAtRules"));
const _evaluateTailwindFunctions = /*#__PURE__*/_interop_require_default(require("./lib/evaluateTailwindFunctions"));
const _substituteScreenAtRules = /*#__PURE__*/_interop_require_default(require("./lib/substituteScreenAtRules"));
const _resolveDefaultsAtRules = /*#__PURE__*/_interop_require_default(require("./lib/resolveDefaultsAtRules"));
const _collapseAdjacentRules = /*#__PURE__*/_interop_require_default(require("./lib/collapseAdjacentRules"));
const _collapseDuplicateDeclarations = /*#__PURE__*/_interop_require_default(require("./lib/collapseDuplicateDeclarations"));
const _partitionApplyAtRules = /*#__PURE__*/_interop_require_default(require("./lib/partitionApplyAtRules"));
const _detectNesting = /*#__PURE__*/_interop_require_default(require("./lib/detectNesting"));
const _setupContextUtils = require("./lib/setupContextUtils");
const _featureFlags = require("./featureFlags");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function processTailwindFeatures(setupContext) {
return async function (root, result) {
let {
tailwindDirectives,
applyDirectives
} = (0, _normalizeTailwindDirectives.default)(root);
(0, _detectNesting.default)()(root, result);
// Partition apply rules that are found in the css
// itself.
(0, _partitionApplyAtRules.default)()(root, result);
let context = setupContext({
tailwindDirectives,
applyDirectives,
registerDependency(dependency) {
result.messages.push({
plugin: "tailwindcss",
parent: result.opts.from,
...dependency
});
},
createContext(tailwindConfig, changedContent) {
return (0, _setupContextUtils.createContext)(tailwindConfig, changedContent, root);
}
})(root, result);
if (context.tailwindConfig.separator === "-") {
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.");
}
(0, _featureFlags.issueFlagNotices)(context.tailwindConfig);
await (0, _expandTailwindAtRules.default)(context)(root, result);
// Partition apply rules that are generated by
// addComponents, addUtilities and so on.
(0, _partitionApplyAtRules.default)()(root, result);
(0, _expandApplyAtRules.default)(context)(root, result);
(0, _evaluateTailwindFunctions.default)(context)(root, result);
(0, _substituteScreenAtRules.default)(context)(root, result);
(0, _resolveDefaultsAtRules.default)(context)(root, result);
(0, _collapseAdjacentRules.default)(context)(root, result);
(0, _collapseDuplicateDeclarations.default)(context)(root, result);
return context;
};
}",
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`postcss > getCss 0.common 1`] = `
"/*
! tailwindcss v3.4.0 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";
module.exports = require("./plugin");
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _setupTrackingContext = /*#__PURE__*/ _interop_require_default(require("./lib/setupTrackingContext"));
const _processTailwindFeatures = /*#__PURE__*/ _interop_require_default(require("./processTailwindFeatures"));
const _sharedState = require("./lib/sharedState");
const _findAtConfigPath = require("./lib/findAtConfigPath");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
module.exports = function tailwindcss(configOrPath) {
return {
postcssPlugin: "tailwindcss",
plugins: [
_sharedState.env.DEBUG && function(root) {
console.log("\n");
console.time("JIT TOTAL");
return root;
},
async function(root, result) {
var _findAtConfigPath1;
// Use the path for the `@config` directive if it exists, otherwise use the
// path for the file being processed
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
let context = (0, _setupTrackingContext.default)(configOrPath);
if (root.type === "document") {
let roots = root.nodes.filter((node)=>node.type === "root");
for (const root of roots){
if (root.type === "root") {
await (0, _processTailwindFeatures.default)(context)(root, result);
}
}
return;
}
await (0, _processTailwindFeatures.default)(context)(root, result);
},
false && function lightningCssPlugin(_root, result) {
let postcss = require("postcss");
let lightningcss = require("lightningcss");
let browserslist = require("browserslist");
try {
let transformed = lightningcss.transform({
filename: result.opts.from,
code: Buffer.from(result.root.toString()),
minify: false,
sourceMap: !!result.map,
inputSourceMap: result.map ? result.map.toString() : undefined,
targets: typeof process !== "undefined" && process.env.JEST_WORKER_ID ? {
chrome: 106 << 16
} : lightningcss.browserslistToTargets(browserslist(require("../package.json").browserslist)),
drafts: {
nesting: true,
customMedia: true
}
});
var _result_map;
result.map = Object.assign((_result_map = result.map) !== null && _result_map !== void 0 ? _result_map : {}, {
toJSON () {
return transformed.map.toJSON();
},
toString () {
return transformed.map.toString();
}
});
result.root = postcss.parse(transformed.code.toString("utf8"));
} catch (err) {
if (typeof process !== "undefined" && process.env.JEST_WORKER_ID) {
let lines = err.source.split("\n");
err = new Error([
"Error formatting using Lightning CSS:",
"",
...[
"```css",
...lines.slice(Math.max(err.loc.line - 3, 0), err.loc.line),
" ".repeat(err.loc.column - 1) + "^-- " + err.toString(),
...lines.slice(err.loc.line, err.loc.line + 2),
"```"
]
].join("\n"));
}
if (Error.captureStackTrace) {
Error.captureStackTrace(err, lightningCssPlugin);
}
throw err;
}
},
_sharedState.env.DEBUG && function(root) {
console.timeEnd("JIT TOTAL");
console.log("\n");
return root;
}
].filter(Boolean)
};
};
module.exports.postcss = true;
Loading

0 comments on commit d6093b4

Please sign in to comment.