sku 15.15.4 → 15.15.5
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/CHANGELOG.md +6 -0
- package/dist/config/storybook.cjs +7 -51
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.5.0 → get-east-asian-width@1.6.0}/node_modules/get-east-asian-width/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.5.0 → get-east-asian-width@1.6.0}/node_modules/get-east-asian-width/lookup-data.mjs +7 -34
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.5.0 → get-east-asian-width@1.6.0}/node_modules/get-east-asian-width/lookup.mjs +6 -16
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.5.0 → get-east-asian-width@1.6.0}/node_modules/get-east-asian-width/utilities.mjs +1 -1
- package/dist/node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.mjs +1 -1
- package/dist/packages/sku/package.mjs +1 -1
- package/dist/services/vite/helpers/config/createConfig.mjs +5 -1
- package/dist/services/vite/plugins/stripServerConfig.mjs +30 -0
- package/dist/services/vite/skuPlugin.mjs +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -744,8 +744,6 @@ function stripAnsi(string) {
|
|
|
744
744
|
if (!string.includes("\x1B") && !string.includes("")) return string;
|
|
745
745
|
return string.replace(regex, "");
|
|
746
746
|
}
|
|
747
|
-
//#endregion
|
|
748
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
749
747
|
const ambiguousRanges = [
|
|
750
748
|
161,
|
|
751
749
|
161,
|
|
@@ -1114,38 +1112,6 @@ const fullwidthRanges = [
|
|
|
1114
1112
|
65504,
|
|
1115
1113
|
65510
|
|
1116
1114
|
];
|
|
1117
|
-
const halfwidthRanges = [
|
|
1118
|
-
8361,
|
|
1119
|
-
8361,
|
|
1120
|
-
65377,
|
|
1121
|
-
65470,
|
|
1122
|
-
65474,
|
|
1123
|
-
65479,
|
|
1124
|
-
65482,
|
|
1125
|
-
65487,
|
|
1126
|
-
65490,
|
|
1127
|
-
65495,
|
|
1128
|
-
65498,
|
|
1129
|
-
65500,
|
|
1130
|
-
65512,
|
|
1131
|
-
65518
|
|
1132
|
-
];
|
|
1133
|
-
const narrowRanges = [
|
|
1134
|
-
32,
|
|
1135
|
-
126,
|
|
1136
|
-
162,
|
|
1137
|
-
163,
|
|
1138
|
-
165,
|
|
1139
|
-
166,
|
|
1140
|
-
172,
|
|
1141
|
-
172,
|
|
1142
|
-
175,
|
|
1143
|
-
175,
|
|
1144
|
-
10214,
|
|
1145
|
-
10221,
|
|
1146
|
-
10629,
|
|
1147
|
-
10630
|
|
1148
|
-
];
|
|
1149
1115
|
const wideRanges = [
|
|
1150
1116
|
4352,
|
|
1151
1117
|
4447,
|
|
@@ -1393,7 +1359,7 @@ const wideRanges = [
|
|
|
1393
1359
|
262141
|
|
1394
1360
|
];
|
|
1395
1361
|
//#endregion
|
|
1396
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
1362
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/utilities.js
|
|
1397
1363
|
/**
|
|
1398
1364
|
Binary search on a sorted flat array of [start, end] pairs.
|
|
1399
1365
|
|
|
@@ -1414,19 +1380,9 @@ const isInRange = (ranges, codePoint) => {
|
|
|
1414
1380
|
return false;
|
|
1415
1381
|
};
|
|
1416
1382
|
//#endregion
|
|
1417
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
1418
|
-
const minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
1419
|
-
const maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
1420
|
-
const minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
1421
|
-
const maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
1422
|
-
halfwidthRanges[0];
|
|
1423
|
-
halfwidthRanges.at(-1);
|
|
1424
|
-
narrowRanges[0];
|
|
1425
|
-
narrowRanges.at(-1);
|
|
1426
|
-
const minimumWideCodePoint = wideRanges[0];
|
|
1427
|
-
const maximumWideCodePoint = wideRanges.at(-1);
|
|
1383
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup.js
|
|
1428
1384
|
const commonCjkCodePoint = 19968;
|
|
1429
|
-
const [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
1385
|
+
const [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
|
|
1430
1386
|
function findWideFastPathRange(ranges) {
|
|
1431
1387
|
let fastPathStart = ranges[0];
|
|
1432
1388
|
let fastPathEnd = ranges[1];
|
|
@@ -1442,20 +1398,20 @@ function findWideFastPathRange(ranges) {
|
|
|
1442
1398
|
return [fastPathStart, fastPathEnd];
|
|
1443
1399
|
}
|
|
1444
1400
|
const isAmbiguous = (codePoint) => {
|
|
1445
|
-
if (codePoint <
|
|
1401
|
+
if (codePoint < 161 || codePoint > 1114109) return false;
|
|
1446
1402
|
return isInRange(ambiguousRanges, codePoint);
|
|
1447
1403
|
};
|
|
1448
1404
|
const isFullWidth = (codePoint) => {
|
|
1449
|
-
if (codePoint <
|
|
1405
|
+
if (codePoint < 12288 || codePoint > 65510) return false;
|
|
1450
1406
|
return isInRange(fullwidthRanges, codePoint);
|
|
1451
1407
|
};
|
|
1452
1408
|
const isWide = (codePoint) => {
|
|
1453
1409
|
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) return true;
|
|
1454
|
-
if (codePoint <
|
|
1410
|
+
if (codePoint < 4352 || codePoint > 262141) return false;
|
|
1455
1411
|
return isInRange(wideRanges, codePoint);
|
|
1456
1412
|
};
|
|
1457
1413
|
//#endregion
|
|
1458
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
1414
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.js
|
|
1459
1415
|
function validate$1(codePoint) {
|
|
1460
1416
|
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
1461
1417
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isAmbiguous, isFullWidth, isWide } from "./lookup.mjs";
|
|
2
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
2
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.js
|
|
3
3
|
function validate(codePoint) {
|
|
4
4
|
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
5
5
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
1
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup-data.js
|
|
2
|
+
const ambiguousMaximumCodePoint = 1114109;
|
|
2
3
|
const ambiguousRanges = [
|
|
3
4
|
161,
|
|
4
5
|
161,
|
|
@@ -359,6 +360,8 @@ const ambiguousRanges = [
|
|
|
359
360
|
1048576,
|
|
360
361
|
1114109
|
|
361
362
|
];
|
|
363
|
+
const fullwidthMinimalCodePoint = 12288;
|
|
364
|
+
const fullwidthMaximumCodePoint = 65510;
|
|
362
365
|
const fullwidthRanges = [
|
|
363
366
|
12288,
|
|
364
367
|
12288,
|
|
@@ -367,38 +370,8 @@ const fullwidthRanges = [
|
|
|
367
370
|
65504,
|
|
368
371
|
65510
|
|
369
372
|
];
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
8361,
|
|
373
|
-
65377,
|
|
374
|
-
65470,
|
|
375
|
-
65474,
|
|
376
|
-
65479,
|
|
377
|
-
65482,
|
|
378
|
-
65487,
|
|
379
|
-
65490,
|
|
380
|
-
65495,
|
|
381
|
-
65498,
|
|
382
|
-
65500,
|
|
383
|
-
65512,
|
|
384
|
-
65518
|
|
385
|
-
];
|
|
386
|
-
const narrowRanges = [
|
|
387
|
-
32,
|
|
388
|
-
126,
|
|
389
|
-
162,
|
|
390
|
-
163,
|
|
391
|
-
165,
|
|
392
|
-
166,
|
|
393
|
-
172,
|
|
394
|
-
172,
|
|
395
|
-
175,
|
|
396
|
-
175,
|
|
397
|
-
10214,
|
|
398
|
-
10221,
|
|
399
|
-
10629,
|
|
400
|
-
10630
|
|
401
|
-
];
|
|
373
|
+
const wideMinimalCodePoint = 4352;
|
|
374
|
+
const wideMaximumCodePoint = 262141;
|
|
402
375
|
const wideRanges = [
|
|
403
376
|
4352,
|
|
404
377
|
4447,
|
|
@@ -646,4 +619,4 @@ const wideRanges = [
|
|
|
646
619
|
262141
|
|
647
620
|
];
|
|
648
621
|
//#endregion
|
|
649
|
-
export { ambiguousRanges, fullwidthRanges,
|
|
622
|
+
export { ambiguousMaximumCodePoint, ambiguousRanges, fullwidthMaximumCodePoint, fullwidthMinimalCodePoint, fullwidthRanges, wideMaximumCodePoint, wideMinimalCodePoint, wideRanges };
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import { ambiguousRanges, fullwidthRanges,
|
|
1
|
+
import { ambiguousRanges, fullwidthRanges, wideRanges } from "./lookup-data.mjs";
|
|
2
2
|
import { isInRange } from "./utilities.mjs";
|
|
3
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
4
|
-
const minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
5
|
-
const maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
6
|
-
const minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
7
|
-
const maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
8
|
-
halfwidthRanges[0];
|
|
9
|
-
halfwidthRanges.at(-1);
|
|
10
|
-
narrowRanges[0];
|
|
11
|
-
narrowRanges.at(-1);
|
|
12
|
-
const minimumWideCodePoint = wideRanges[0];
|
|
13
|
-
const maximumWideCodePoint = wideRanges.at(-1);
|
|
3
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup.js
|
|
14
4
|
const commonCjkCodePoint = 19968;
|
|
15
|
-
const [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
5
|
+
const [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
|
|
16
6
|
function findWideFastPathRange(ranges) {
|
|
17
7
|
let fastPathStart = ranges[0];
|
|
18
8
|
let fastPathEnd = ranges[1];
|
|
@@ -28,16 +18,16 @@ function findWideFastPathRange(ranges) {
|
|
|
28
18
|
return [fastPathStart, fastPathEnd];
|
|
29
19
|
}
|
|
30
20
|
const isAmbiguous = (codePoint) => {
|
|
31
|
-
if (codePoint <
|
|
21
|
+
if (codePoint < 161 || codePoint > 1114109) return false;
|
|
32
22
|
return isInRange(ambiguousRanges, codePoint);
|
|
33
23
|
};
|
|
34
24
|
const isFullWidth = (codePoint) => {
|
|
35
|
-
if (codePoint <
|
|
25
|
+
if (codePoint < 12288 || codePoint > 65510) return false;
|
|
36
26
|
return isInRange(fullwidthRanges, codePoint);
|
|
37
27
|
};
|
|
38
28
|
const isWide = (codePoint) => {
|
|
39
29
|
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) return true;
|
|
40
|
-
if (codePoint <
|
|
30
|
+
if (codePoint < 4352 || codePoint > 262141) return false;
|
|
41
31
|
return isInRange(wideRanges, codePoint);
|
|
42
32
|
};
|
|
43
33
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
1
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/utilities.js
|
|
2
2
|
/**
|
|
3
3
|
Binary search on a sorted flat array of [start, end] pairs.
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __toESM } from "../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import stripAnsi from "../../../strip-ansi@7.2.0/node_modules/strip-ansi/index.mjs";
|
|
3
|
-
import { eastAsianWidth } from "../../../get-east-asian-width@1.
|
|
3
|
+
import { eastAsianWidth } from "../../../get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.mjs";
|
|
4
4
|
import { require_emoji_regex } from "../../../emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
6
6
|
var import_emoji_regex = /* @__PURE__ */ __toESM(require_emoji_regex(), 1);
|
|
@@ -10,7 +10,11 @@ import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
|
|
10
10
|
//#region src/services/vite/helpers/config/createConfig.ts
|
|
11
11
|
const require = createRequire(import.meta.url);
|
|
12
12
|
const TSCONFIG_PLUGIN_NAME = "sku-tsconfig-paths";
|
|
13
|
-
const vanillaExtractCompilerPluginAllowlist = [
|
|
13
|
+
const vanillaExtractCompilerPluginAllowlist = [
|
|
14
|
+
"sku:dangerously-set-vite-config",
|
|
15
|
+
"sku:strip-server-config",
|
|
16
|
+
TSCONFIG_PLUGIN_NAME
|
|
17
|
+
];
|
|
14
18
|
const createConfig = (skuContext, environment) => {
|
|
15
19
|
const vocabConfig = getVocabConfig(skuContext);
|
|
16
20
|
const isProductionBuild = process.env.NODE_ENV === "production";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { makePluginName } from "../helpers/makePluginName.mjs";
|
|
2
|
+
//#region src/services/vite/plugins/stripServerConfig.ts
|
|
3
|
+
/**
|
|
4
|
+
* Conditionally strips `server.watch` config during builds. This prevents the Vanilla Extract
|
|
5
|
+
* compiler's internal Vite dev server from instantiating a persistent chokidar watcher that
|
|
6
|
+
* keeps the Node event loop alive after the build completes.
|
|
7
|
+
*
|
|
8
|
+
* We must explicitly return `{ server: { watch: null } }` rather than just setting an empty
|
|
9
|
+
* `config.server`. Setting an empty `server` config alone is not enough because:
|
|
10
|
+
* 1. Plugin `config` hooks run in order and their return value is merged in with
|
|
11
|
+
* "overrides win" semantics. Even if we override `config.server`, the merge of our
|
|
12
|
+
* return value (`{}`) over the previous state cannot unset fields.
|
|
13
|
+
* 2. If `config.server` ends up undefined, Vite falls back to defaults and still creates
|
|
14
|
+
* a chokidar watcher.
|
|
15
|
+
* Returning `watch: null` is the explicit signal that disables the watcher.
|
|
16
|
+
*/
|
|
17
|
+
function stripServerConfigPlugin({ apply }) {
|
|
18
|
+
return {
|
|
19
|
+
name: makePluginName("strip-server-config"),
|
|
20
|
+
enforce: "post",
|
|
21
|
+
apply: () => apply,
|
|
22
|
+
config: (cfg) => {
|
|
23
|
+
cfg.server ??= {};
|
|
24
|
+
cfg.server.watch = null;
|
|
25
|
+
return cfg;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { stripServerConfigPlugin };
|
|
@@ -10,6 +10,7 @@ import { configPlugin } from "./plugins/config.mjs";
|
|
|
10
10
|
import { buildPlugin } from "./plugins/build.mjs";
|
|
11
11
|
import { devServerPlugin } from "./plugins/devServer.mjs";
|
|
12
12
|
import { bundleAnalyzerPlugin } from "./plugins/bundleAnalyzer.mjs";
|
|
13
|
+
import { stripServerConfigPlugin } from "./plugins/stripServerConfig.mjs";
|
|
13
14
|
//#region src/services/vite/skuPlugin.ts
|
|
14
15
|
/**
|
|
15
16
|
* All sku related functionality and customization as a vite plugin.
|
|
@@ -17,6 +18,7 @@ import { bundleAnalyzerPlugin } from "./plugins/bundleAnalyzer.mjs";
|
|
|
17
18
|
const skuPlugin = ({ skuContext, environment }) => [
|
|
18
19
|
configPlugin({ skuContext }),
|
|
19
20
|
dangerouslySetViteConfigPlugin(skuContext),
|
|
21
|
+
stripServerConfigPlugin({ apply: Boolean(skuContext.commandName?.startsWith("build")) }),
|
|
20
22
|
setNoExternalPlugin(skuContext),
|
|
21
23
|
buildPlugin({ skuContext }),
|
|
22
24
|
devServerPlugin({ skuContext }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sku",
|
|
3
|
-
"version": "15.15.
|
|
3
|
+
"version": "15.15.5",
|
|
4
4
|
"description": "Front-end development toolkit, powered by Webpack, Babel, Vanilla Extract and Jest",
|
|
5
5
|
"types": "./dist/index.d.mts",
|
|
6
6
|
"bin": {
|
|
@@ -168,8 +168,8 @@
|
|
|
168
168
|
"webpack-dev-server": "<=5.2.0",
|
|
169
169
|
"webpack-merge": "^6.0.1",
|
|
170
170
|
"webpack-node-externals": "^3.0.0",
|
|
171
|
-
"@sku-lib/
|
|
172
|
-
"@sku-lib/
|
|
171
|
+
"@sku-lib/babel-plugin-display-name": "^0.0.2",
|
|
172
|
+
"@sku-lib/vite": "^2.0.1"
|
|
173
173
|
},
|
|
174
174
|
"devDependencies": {
|
|
175
175
|
"@types/babel__core": "^7.20.5",
|
|
@@ -195,8 +195,8 @@
|
|
|
195
195
|
"react-dom": "^19.1.0",
|
|
196
196
|
"type-fest": "^5.0.0",
|
|
197
197
|
"vitest": "^4.1.0",
|
|
198
|
-
"@sku-private/
|
|
199
|
-
"@sku-private/
|
|
198
|
+
"@sku-private/utils": "0.0.0",
|
|
199
|
+
"@sku-private/tsdown": "0.0.0"
|
|
200
200
|
},
|
|
201
201
|
"scripts": {
|
|
202
202
|
"postinstall": "node ./scripts/postinstall.js",
|