@theholocron/cli 5.0.0-alpha.547 → 5.0.0-alpha.549

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.mjs CHANGED
@@ -244,12 +244,14 @@ function tagEmojiProblem(tagName, emoji, pictured) {
244
244
  */
245
245
  function orderKeys(keys, order) {
246
246
  const numbered = keys.map((key, index) => {
247
- const match = /(\d+)\s*$/.exec(key);
248
- if (!match) throw new Error(`Cannot order "${key}" by creation: it has no issue number.`);
247
+ const trimmed = key.trimEnd();
248
+ let start = trimmed.length;
249
+ while (start > 0 && trimmed[start - 1] >= "0" && trimmed[start - 1] <= "9") start -= 1;
250
+ if (start === trimmed.length) throw new Error(`Cannot order "${key}" by creation: it has no issue number.`);
249
251
  return {
250
252
  key,
251
253
  index,
252
- n: Number(match[1])
254
+ n: Number(trimmed.slice(start))
253
255
  };
254
256
  });
255
257
  const sign = order === "newest" ? -1 : 1;
@@ -1039,6 +1041,12 @@ function areaLabelDefs(areas) {
1039
1041
  });
1040
1042
  }
1041
1043
  // src/area-labels/path-matches/path-matches.ts
1044
+ /** `value` without the slashes at its end. A scan from the end, not a pattern, so a long run of slashes costs one pass. */
1045
+ function withoutTrailingSlashes(value) {
1046
+ let end = value.length;
1047
+ while (end > 0 && value[end - 1] === "/") end -= 1;
1048
+ return value.slice(0, end);
1049
+ }
1042
1050
  /** Turns one glob into the expression a whole path must match: `**` crosses folders, `*` and `?` stay in one. */
1043
1051
  function globToRegExp(glob) {
1044
1052
  let out = "";
@@ -1063,7 +1071,7 @@ function globToRegExp(glob) {
1063
1071
  function pathMatches(path, pattern) {
1064
1072
  const clean = path.replace(/^\.?\//, "");
1065
1073
  if (/[*?]/.test(pattern)) return globToRegExp(pattern.replace(/^\.?\//, "")).test(clean);
1066
- const plain = pattern.replace(/^\.?\//, "").replace(/\/+$/, "");
1074
+ const plain = withoutTrailingSlashes(pattern.replace(/^\.?\//, ""));
1067
1075
  return clean === plain || clean.startsWith(`${plain}/`);
1068
1076
  }
1069
1077
  // src/area-labels/area-labels-for-files/area-labels-for-files.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.547",
3
+ "version": "5.0.0-alpha.549",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -59,18 +59,18 @@
59
59
  "posthog-node": "^6.0.5",
60
60
  "tsx": "4.23.15",
61
61
  "yargs": "^18.1.0",
62
- "@theholocron/astromech": "5.0.0-alpha.547",
63
- "@theholocron/dagobah": "5.0.0-alpha.547",
64
- "@theholocron/datapad": "5.0.0-alpha.547",
62
+ "@theholocron/astromech": "5.0.0-alpha.549",
63
+ "@theholocron/dagobah": "5.0.0-alpha.549",
64
+ "@theholocron/datapad": "5.0.0-alpha.549",
65
65
  "@theholocron/env-utils": "^1.17.0-alpha.6",
66
66
  "@theholocron/fs-utils": "^1.17.0-alpha.6",
67
67
  "@theholocron/git-utils": "^1.17.0-alpha.6",
68
68
  "@theholocron/github-client": "^1.58.0-alpha.59",
69
69
  "@theholocron/http-client": "^1.58.0-alpha.59",
70
70
  "@theholocron/json-utils": "^1.17.0-alpha.6",
71
- "@theholocron/kyber": "5.0.0-alpha.547",
71
+ "@theholocron/kyber": "5.0.0-alpha.549",
72
72
  "@theholocron/misc-utils": "^1.17.0-alpha.6",
73
- "@theholocron/observability": "^0.7.0-alpha.7",
73
+ "@theholocron/observability": "^0.7.0-alpha.8",
74
74
  "@theholocron/pkg-utils": "^1.17.0-alpha.6"
75
75
  },
76
76
  "devDependencies": {
@@ -84,10 +84,10 @@
84
84
  "tsdown": "^0.23.7",
85
85
  "typescript": "^6.0.3",
86
86
  "vitest": "^5.1.1",
87
- "@theholocron/eslint-config": "^8.9.0-alpha.23",
88
- "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.23",
89
- "@theholocron/tsconfig": "^8.9.0-alpha.23",
90
- "@theholocron/vitest-config": "^8.9.0-alpha.23"
87
+ "@theholocron/eslint-config": "^8.9.0-alpha.24",
88
+ "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.24",
89
+ "@theholocron/tsconfig": "^8.9.0-alpha.24",
90
+ "@theholocron/vitest-config": "^8.9.0-alpha.24"
91
91
  },
92
92
  "engines": {
93
93
  "node": ">=22.0.0"