tailwind-a11y 0.5.0 → 0.5.1
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.
|
@@ -73,7 +73,14 @@ function bustRequireCache(require, mod, seen) {
|
|
|
73
73
|
// spacing returns {}, which callers must not treat as an error.
|
|
74
74
|
export function loadCustomTheme(configPath) {
|
|
75
75
|
try {
|
|
76
|
-
|
|
76
|
+
// createRequire is anchored to the config file itself, NOT import.meta.url:
|
|
77
|
+
// esbuild's CJS output (the VS Code and GitHub Action bundles) rewrites
|
|
78
|
+
// import.meta to an empty object, so createRequire(import.meta.url) throws
|
|
79
|
+
// inside a bundle -- and this function's own try/catch would swallow that
|
|
80
|
+
// into a silent "no config found" fallback. configPath is documented as
|
|
81
|
+
// absolute, which is exactly what createRequire needs as an anchor, and it
|
|
82
|
+
// also makes relative require()s inside the config resolve correctly.
|
|
83
|
+
const require = createRequire(configPath);
|
|
77
84
|
const resolved = require.resolve(configPath);
|
|
78
85
|
const cached = require.cache[resolved];
|
|
79
86
|
if (cached)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwind-a11y",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Static analysis CLI that catches WCAG accessibility violations — color contrast, touch target size, and focus indicator removal — in Tailwind CSS class combinations before they ship.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/babel__traverse": "^7.20.6",
|
|
60
60
|
"@types/node": "^22.0.0",
|
|
61
|
+
"esbuild": "^0.28.0",
|
|
61
62
|
"tsx": "^4.19.0",
|
|
62
63
|
"typescript": "^5.5.0",
|
|
63
64
|
"vitest": "^2.1.0"
|