@bamboocss/config 1.41.1 → 1.42.0
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/diff-config.cjs +1 -1
- package/dist/diff-config.mjs +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +11 -11
- package/package.json +6 -6
package/dist/diff-config.cjs
CHANGED
package/dist/diff-config.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -143,7 +143,7 @@ const format = [
|
|
|
143
143
|
"hash",
|
|
144
144
|
"prefix",
|
|
145
145
|
"separator",
|
|
146
|
-
"
|
|
146
|
+
"strictValues",
|
|
147
147
|
"strictPropertyValues",
|
|
148
148
|
"shorthands"
|
|
149
149
|
];
|
|
@@ -1106,7 +1106,7 @@ const validateTokens = (options) => {
|
|
|
1106
1106
|
//#region src/validate-config.ts
|
|
1107
1107
|
/**
|
|
1108
1108
|
* Validate the config
|
|
1109
|
-
* - Check that `
|
|
1109
|
+
* - Check that `strictValues` names a setting that exists
|
|
1110
1110
|
* - Check for duplicate between token & semanticTokens names
|
|
1111
1111
|
* - Check for duplicate between recipes/patterns/slots names
|
|
1112
1112
|
* - Check for token / semanticTokens paths (must end/contain 'value')
|
|
@@ -1137,7 +1137,7 @@ const validateConfig = (config) => {
|
|
|
1137
1137
|
return warnings;
|
|
1138
1138
|
};
|
|
1139
1139
|
if (config.validation === "off") return report();
|
|
1140
|
-
|
|
1140
|
+
validateStrictValues(config.strictValues, addError);
|
|
1141
1141
|
validateBreakpoints(config.theme?.breakpoints, addError);
|
|
1142
1142
|
validateConditions(config.conditions, addError);
|
|
1143
1143
|
const artifacts = {
|
|
@@ -1170,16 +1170,16 @@ const validateConfig = (config) => {
|
|
|
1170
1170
|
return report();
|
|
1171
1171
|
};
|
|
1172
1172
|
/**
|
|
1173
|
-
* `
|
|
1173
|
+
* `strictValues` is a boolean, and a string is not one.
|
|
1174
1174
|
*
|
|
1175
|
-
* It reaches the generated types as a
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
*
|
|
1175
|
+
* It reaches the generated types as a truthiness test, so a string that is not a setting is
|
|
1176
|
+
* simply *on* — and being on means every raw CSS value in the project is a type error, from a
|
|
1177
|
+
* config that looked like it was asking for something else. `'unknown-tokens'` in particular
|
|
1178
|
+
* used to be a setting and now is not, so it is the likely way to arrive here.
|
|
1179
1179
|
*/
|
|
1180
|
-
const
|
|
1181
|
-
if (value === void 0 ||
|
|
1182
|
-
addError("
|
|
1180
|
+
const validateStrictValues = (value, addError) => {
|
|
1181
|
+
if (value === void 0 || typeof value === "boolean") return;
|
|
1182
|
+
addError("strictValues", `\`${JSON.stringify(value)}\` is not a setting. Use \`true\` to require every value to be a token, or omit it. A misspelled token is reported by the build — see \`unresolvedToken\` — and needs no setting.`);
|
|
1183
1183
|
};
|
|
1184
1184
|
//#endregion
|
|
1185
1185
|
//#region src/resolve-config.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1753,6 +1753,7 @@ declare const defaultPresets: ({
|
|
|
1753
1753
|
value: string;
|
|
1754
1754
|
};
|
|
1755
1755
|
};
|
|
1756
|
+
zIndex: import("@bamboocss/types").Recursive<import("@bamboocss/types").Token<string | number>> | undefined;
|
|
1756
1757
|
};
|
|
1757
1758
|
mixins: import("@bamboocss/types").Mixins;
|
|
1758
1759
|
containerSizes: {
|
package/dist/index.d.mts
CHANGED
|
@@ -1753,6 +1753,7 @@ declare const defaultPresets: ({
|
|
|
1753
1753
|
value: string;
|
|
1754
1754
|
};
|
|
1755
1755
|
};
|
|
1756
|
+
zIndex: import("@bamboocss/types").Recursive<import("@bamboocss/types").Token<string | number>> | undefined;
|
|
1756
1757
|
};
|
|
1757
1758
|
mixins: import("@bamboocss/types").Mixins;
|
|
1758
1759
|
containerSizes: {
|
package/dist/index.mjs
CHANGED
|
@@ -115,7 +115,7 @@ const format = [
|
|
|
115
115
|
"hash",
|
|
116
116
|
"prefix",
|
|
117
117
|
"separator",
|
|
118
|
-
"
|
|
118
|
+
"strictValues",
|
|
119
119
|
"strictPropertyValues",
|
|
120
120
|
"shorthands"
|
|
121
121
|
];
|
|
@@ -1078,7 +1078,7 @@ const validateTokens = (options) => {
|
|
|
1078
1078
|
//#region src/validate-config.ts
|
|
1079
1079
|
/**
|
|
1080
1080
|
* Validate the config
|
|
1081
|
-
* - Check that `
|
|
1081
|
+
* - Check that `strictValues` names a setting that exists
|
|
1082
1082
|
* - Check for duplicate between token & semanticTokens names
|
|
1083
1083
|
* - Check for duplicate between recipes/patterns/slots names
|
|
1084
1084
|
* - Check for token / semanticTokens paths (must end/contain 'value')
|
|
@@ -1109,7 +1109,7 @@ const validateConfig = (config) => {
|
|
|
1109
1109
|
return warnings;
|
|
1110
1110
|
};
|
|
1111
1111
|
if (config.validation === "off") return report();
|
|
1112
|
-
|
|
1112
|
+
validateStrictValues(config.strictValues, addError);
|
|
1113
1113
|
validateBreakpoints(config.theme?.breakpoints, addError);
|
|
1114
1114
|
validateConditions(config.conditions, addError);
|
|
1115
1115
|
const artifacts = {
|
|
@@ -1142,16 +1142,16 @@ const validateConfig = (config) => {
|
|
|
1142
1142
|
return report();
|
|
1143
1143
|
};
|
|
1144
1144
|
/**
|
|
1145
|
-
* `
|
|
1145
|
+
* `strictValues` is a boolean, and a string is not one.
|
|
1146
1146
|
*
|
|
1147
|
-
* It reaches the generated types as a
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1150
|
-
*
|
|
1147
|
+
* It reaches the generated types as a truthiness test, so a string that is not a setting is
|
|
1148
|
+
* simply *on* — and being on means every raw CSS value in the project is a type error, from a
|
|
1149
|
+
* config that looked like it was asking for something else. `'unknown-tokens'` in particular
|
|
1150
|
+
* used to be a setting and now is not, so it is the likely way to arrive here.
|
|
1151
1151
|
*/
|
|
1152
|
-
const
|
|
1153
|
-
if (value === void 0 ||
|
|
1154
|
-
addError("
|
|
1152
|
+
const validateStrictValues = (value, addError) => {
|
|
1153
|
+
if (value === void 0 || typeof value === "boolean") return;
|
|
1154
|
+
addError("strictValues", `\`${JSON.stringify(value)}\` is not a setting. Use \`true\` to require every value to be a token, or omit it. A misspelled token is reported by the build — see \`unresolvedToken\` — and needs no setting.`);
|
|
1155
1155
|
};
|
|
1156
1156
|
//#endregion
|
|
1157
1157
|
//#region src/resolve-config.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"description": "Find and load bamboo config",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"escalade": "3.2.0",
|
|
65
65
|
"microdiff": "1.5.0",
|
|
66
66
|
"typescript": "6.0.2",
|
|
67
|
-
"@bamboocss/logger": "1.
|
|
68
|
-
"@bamboocss/preset-bamboo": "1.
|
|
69
|
-
"@bamboocss/preset-base": "1.
|
|
70
|
-
"@bamboocss/shared": "1.
|
|
71
|
-
"@bamboocss/types": "1.
|
|
67
|
+
"@bamboocss/logger": "1.42.0",
|
|
68
|
+
"@bamboocss/preset-bamboo": "1.42.0",
|
|
69
|
+
"@bamboocss/preset-base": "1.42.0",
|
|
70
|
+
"@bamboocss/shared": "1.42.0",
|
|
71
|
+
"@bamboocss/types": "1.42.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"pkg-types": "2.3.0"
|