@bamboocss/vite 1.37.2 → 1.37.3
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 +13 -4
- package/dist/index.mjs +13 -4
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -111,10 +111,19 @@ const pruneStaticCss = (css, session, { prune = true } = {}) => {
|
|
|
111
111
|
if (present.has(className)) continue;
|
|
112
112
|
orphaned.push(className);
|
|
113
113
|
}
|
|
114
|
-
if (orphaned.length)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
if (orphaned.length) {
|
|
115
|
+
const describe = (className) => {
|
|
116
|
+
if (/\s/.test(className)) return ` ${className}\n (malformed key: a class name cannot contain whitespace)`;
|
|
117
|
+
const extracted = session.prunableClasses.has(className) ? "in the extracted atoms" : "NOT extracted";
|
|
118
|
+
const bare = className.replaceAll("\\", "");
|
|
119
|
+
const near = [...present].filter((candidate) => candidate !== className && candidate.replaceAll("\\", "") === bare);
|
|
120
|
+
return ` ${className}\n (${extracted}; no rule in the sheet` + (near.length ? `; a rule exists under ${near.map((n) => JSON.stringify(n)).join(", ")}` : "") + `)`;
|
|
121
|
+
};
|
|
122
|
+
throw new Error(`bamboocss: ${orphaned.length} compiled class(es) have no rule in the emitted stylesheet. Elements carrying them would render unstyled.\n\n${(0, _bamboocss_shared.truncateList)(orphaned.map(describe), {
|
|
123
|
+
unit: "class",
|
|
124
|
+
separator: "\n"
|
|
125
|
+
})}\n\nThis is a compiler bug rather than anything to fix in your source. Please report it with the block above — the parenthesised part is what distinguishes an atom that was never emitted from one whose rule is present under a different spelling.`);
|
|
126
|
+
}
|
|
118
127
|
}
|
|
119
128
|
return root.toString();
|
|
120
129
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -81,10 +81,19 @@ const pruneStaticCss = (css, session, { prune = true } = {}) => {
|
|
|
81
81
|
if (present.has(className)) continue;
|
|
82
82
|
orphaned.push(className);
|
|
83
83
|
}
|
|
84
|
-
if (orphaned.length)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
if (orphaned.length) {
|
|
85
|
+
const describe = (className) => {
|
|
86
|
+
if (/\s/.test(className)) return ` ${className}\n (malformed key: a class name cannot contain whitespace)`;
|
|
87
|
+
const extracted = session.prunableClasses.has(className) ? "in the extracted atoms" : "NOT extracted";
|
|
88
|
+
const bare = className.replaceAll("\\", "");
|
|
89
|
+
const near = [...present].filter((candidate) => candidate !== className && candidate.replaceAll("\\", "") === bare);
|
|
90
|
+
return ` ${className}\n (${extracted}; no rule in the sheet` + (near.length ? `; a rule exists under ${near.map((n) => JSON.stringify(n)).join(", ")}` : "") + `)`;
|
|
91
|
+
};
|
|
92
|
+
throw new Error(`bamboocss: ${orphaned.length} compiled class(es) have no rule in the emitted stylesheet. Elements carrying them would render unstyled.\n\n${truncateList(orphaned.map(describe), {
|
|
93
|
+
unit: "class",
|
|
94
|
+
separator: "\n"
|
|
95
|
+
})}\n\nThis is a compiler bug rather than anything to fix in your source. Please report it with the block above — the parenthesised part is what distinguishes an atom that was never emitted from one whose rule is present under a different spelling.`);
|
|
96
|
+
}
|
|
88
97
|
}
|
|
89
98
|
return root.toString();
|
|
90
99
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/vite",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.3",
|
|
4
4
|
"description": "Vite integration for Bamboo CSS",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"postcss": "8.5.26",
|
|
41
41
|
"postcss-selector-parser": "7.1.5",
|
|
42
42
|
"ts-morph": "28.0.0",
|
|
43
|
-
"@bamboocss/config": "1.37.
|
|
44
|
-
"@bamboocss/core": "1.37.
|
|
45
|
-
"@bamboocss/extractor": "1.37.
|
|
46
|
-
"@bamboocss/
|
|
47
|
-
"@bamboocss/
|
|
48
|
-
"@bamboocss/
|
|
49
|
-
"@bamboocss/
|
|
43
|
+
"@bamboocss/config": "1.37.3",
|
|
44
|
+
"@bamboocss/core": "1.37.3",
|
|
45
|
+
"@bamboocss/extractor": "1.37.3",
|
|
46
|
+
"@bamboocss/node": "1.37.3",
|
|
47
|
+
"@bamboocss/shared": "1.37.3",
|
|
48
|
+
"@bamboocss/types": "1.37.3",
|
|
49
|
+
"@bamboocss/logger": "1.37.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
53
53
|
"vite": "7.2.6",
|
|
54
|
-
"@bamboocss/fixture": "1.37.
|
|
54
|
+
"@bamboocss/fixture": "1.37.3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"vite": ">=5"
|