@williamthorsen/toolbelt.packaging 0.7.0 โ†’ 0.7.2

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.
@@ -1,4 +1,106 @@
1
1
  [
2
+ {
3
+ "version": "0.7.2",
4
+ "date": "2026-11-12",
5
+ "sections": [
6
+ {
7
+ "title": "๐Ÿ› Bug fixes",
8
+ "audience": "all",
9
+ "items": [
10
+ {
11
+ "description": "Share one function-literal reader across the readiness kits (#470)",
12
+ "body": "Fixes the issue that the biased-shuffle check in the `@williamthorsen/toolbelt.arrays` ReadyUp kit missed an inline `function` comparator whose parameter list contains braces, such as `function (a: { n: number }, b: { n: number }) { return Math.random() - 0.5; }`. The change moves the function-literal parsing of the `arrays`, `async`, and `vitest` kits into one shared reader in `adoption`, which finds a `function` expression's body past the braces in its parameter list.",
13
+ "hash": "4a68ebf4d8baeac202267ac3c245a1b0d9e4dc51"
14
+ },
15
+ {
16
+ "description": "Claim a trailing-comma setTimeout as a hand-rolled sleep (#487)",
17
+ "body": "Fixes the issue that the `@williamthorsen/toolbelt.async` ReadyUp kit did not report a hand-rolled sleep whose `setTimeout` call ends in a trailing comma, such as `setTimeout(resolve, 50,)`, as a candidate for `delay`. Replaces the two private copies of the argument splitter, which disagreed on the trailing comma, with one splitter in `packages/adoption` that the async and numbers kits both import.",
18
+ "hash": "db112149e3d49fc681053081af06e391f87ef1f1"
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "title": "๐Ÿงช Tests",
24
+ "audience": "dev",
25
+ "items": [
26
+ {
27
+ "description": "Adds `createKitFixture`, which creates a tracked repo, points `process.cwd()` at it, and lists a kit's checks imported afresh, and `runEveryCheck`, which returns every check's report in order, to `@williamthorsen/toolbelt.adoption/test-utils`, and rewrites the kit tests in `src/readiness/__tests__/kit.tool.test.ts` to replace the repeated `createTrackedRepo`, `pointCwdAt`, and `listFreshKitChecks` calls with them. (#469)",
28
+ "hash": "5f71996e7e3137192e24c5936de1bfa1595af760",
29
+ "entry": 1
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "title": "๐Ÿ“ฆ Dependencies",
35
+ "audience": "dev",
36
+ "items": [
37
+ {
38
+ "description": "Upgrades the catalog's `readyup` from 0.45.1 to 0.46.0 and recompiles each package's `.readyup/kits/default.js` and `.readyup/manifest.json`, because the bundled check utilities changed: `readFile` no longer throws `EISDIR` for a directory path. (#537)",
39
+ "hash": "14d6595f23ea08f7218fc9a4f127039a1a4e6c16",
40
+ "entry": 1
41
+ }
42
+ ]
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "version": "0.7.1",
48
+ "date": "2026-11-09",
49
+ "sections": [
50
+ {
51
+ "title": "โ™ป๏ธ Refactoring",
52
+ "audience": "dev",
53
+ "items": [
54
+ {
55
+ "description": "Split the path-expression reader out of listDirectoryAscents (#437)",
56
+ "body": "Moves the path-expression reader out of `packages/adoption/src/portable/listDirectoryAscents.ts` into its own module, `readPathParts.ts`, adds unit tests for it, and changes it to take each template literal from `listTemplateLiterals` instead of walking templates itself. Recompiles the committed kit bundles to match.",
57
+ "hash": "2fb88c8a64cccd9ce0fb7f83389bf1c468af0ea7"
58
+ },
59
+ {
60
+ "description": "Bring adoption's kit and ascent modules to the declaration-order and naming rules (#438)",
61
+ "body": "Reorders the declarations in four `packages/adoption` files to follow the declaration-order rule, which puts the exported logic first and the helpers after it, and makes small naming and structure cleanups in the same files.",
62
+ "hash": "d31bd2f89a59ccc5aa77caf3549b0eb90e3a8b77"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "title": "๐Ÿงช Tests",
68
+ "audience": "dev",
69
+ "items": [
70
+ {
71
+ "description": "Replaces each kit test's local copy of the checklist helper with `listKitChecks` from `@williamthorsen/toolbelt.adoption/test-utils`, which throws when the kit's first checklist is missing or staged rather than return an empty list against which an assertion over every check passes. (#434)",
72
+ "hash": "7ce7037b981429e72f2d4fc63ca1570dd61348e6",
73
+ "entry": 1
74
+ },
75
+ {
76
+ "description": "Replaces the copied `listSweptFiles` helper and `JS_TS_EXTENSION` regex in every `self-sweep.unit.test.ts` with `listJsTsSources` from `@williamthorsen/toolbelt.adoption/test-utils`, which lists the files directly inside each given directory that adoption's `isJsTsSource` accepts. (#435)",
77
+ "hash": "6999eae76bf2125b9fa4dfde723b9660ef90a7fc",
78
+ "entry": 1
79
+ },
80
+ {
81
+ "description": "Adds `listFreshKitChecks` to `@williamthorsen/toolbelt.adoption/test-utils` and moves every kit test onto it from its own copy of `loadChecks`, which reset Vitest's module registry to obtain a kit that had not yet swept a fixture repo. (#452)",
82
+ "hash": "a1952087f6130ae4cb0c94f8e73da75e6bc8f270",
83
+ "entry": 1
84
+ },
85
+ {
86
+ "description": "Deletes the \"neither reports nor counts\" examples and their `UNCLAIMED` fixtures from the remaining adoption kits' `kit.tool.test.ts`, since the detectors' unit tests already observe each of those declines. (#455)",
87
+ "hash": "c91b78849c2013c821d78d9a51b74f9f5f444f7f",
88
+ "entry": 1
89
+ },
90
+ {
91
+ "description": "Adds `diffAdoptedExports` to `@williamthorsen/toolbelt.adoption/test-utils`, which returns a package's callable exports, the callable exports that `ADOPTED_EXPORTS` omits, and the listed names that the package's tiers don't export, and uses it in place of the hand-written comparison in each package's `adoptedExports.unit.test.ts`. (#458)",
92
+ "hash": "0d224e3a4430af688ee1b5bad83bf70bba09dba6",
93
+ "entry": 1
94
+ },
95
+ {
96
+ "description": "Reduces every adoption kit's `pragma-suppression.tool.test.ts` to its qualified-pragma example, which asserts that the named check drops the site while every other check keeps its count, and deletes the examples that tested readyup's pragma matching rather than the kit. (#459)",
97
+ "hash": "b80c141f955bcf188378058899ce3d68f8cabfd6",
98
+ "entry": 1
99
+ }
100
+ ]
101
+ }
102
+ ]
103
+ },
2
104
  {
3
105
  "version": "0.7.0",
4
106
  "date": "2026-10-25",
@@ -1,6 +1,6 @@
1
1
  /** @noformat -- @generated. Do not edit. Compiled by rdy. */
2
2
  /* eslint-disable */
3
- export const __readyupVersion = "0.43.0";
3
+ export const __readyupVersion = "0.46.1";
4
4
 
5
5
 
6
6
  // ../adoption/src/conventions/path-predicates.ts
@@ -39,13 +39,13 @@ import {
39
39
  var NOT_A_REPO = "the project is not a git working tree, and these checks read the files that git tracks";
40
40
  var NOTHING_TO_REPORT = { findings: [] };
41
41
  function defineAdoptionKit(spec) {
42
- assertCheckIdsAreUnique();
42
+ assertCheckIdsAreUnique(spec);
43
43
  const cache = {};
44
44
  const adoptedPackage = { exportNames: spec.exportNames, packageName: spec.packageName };
45
45
  const kitScope = { noSourcesReason: spec.noSourcesReason, pathFilter: spec.pathFilter };
46
- const pathFiltersByKind = mapPathFiltersByKind();
46
+ const pathFiltersByKind = mapPathFiltersByKind(spec, kitScope);
47
47
  const sweptPathFilters = [
48
- .../* @__PURE__ */ new Set([spec.pathFilter, ...spec.checks.map((check) => resolveScope(check).pathFilter)])
48
+ .../* @__PURE__ */ new Set([spec.pathFilter, ...spec.checks.map((check) => resolveScope(check, kitScope).pathFilter)])
49
49
  ];
50
50
  return defineRdyKit({
51
51
  description: spec.description,
@@ -57,24 +57,13 @@ function defineAdoptionKit(spec) {
57
57
  name: check.name,
58
58
  id: check.id,
59
59
  ...check.severity !== void 0 && { severity: check.severity },
60
- skip: () => skipUnlessProjectHoldsSources(resolveScope(check)),
60
+ skip: () => skipUnlessProjectHoldsSources(resolveScope(check, kitScope)),
61
61
  check: () => reportKinds(check.kinds),
62
62
  fix: check.fix
63
63
  }))
64
64
  }
65
65
  ]
66
66
  });
67
- function assertCheckIdsAreUnique() {
68
- const seen = /* @__PURE__ */ new Set();
69
- const duplicated = /* @__PURE__ */ new Set();
70
- for (const { id } of spec.checks) {
71
- if (seen.has(id)) duplicated.add(id);
72
- seen.add(id);
73
- }
74
- if (duplicated.size === 0) return;
75
- const ids = [...duplicated].toSorted().join(", ");
76
- throw new Error(`${spec.packageName}'s kit gives one id to more than one check: ${ids}`);
77
- }
78
67
  function isSweptPath(path) {
79
68
  return sweptPathFilters.some((pathFilter) => pathFilter(path));
80
69
  }
@@ -82,23 +71,6 @@ function defineAdoptionKit(spec) {
82
71
  cache.summary ??= readProject();
83
72
  return cache.summary;
84
73
  }
85
- function mapPathFiltersByKind() {
86
- const pathFilters = /* @__PURE__ */ new Map();
87
- const conflicted = /* @__PURE__ */ new Set();
88
- for (const check of spec.checks) {
89
- const { pathFilter } = resolveScope(check);
90
- for (const kind of check.kinds) {
91
- const assigned = pathFilters.get(kind);
92
- if (assigned !== void 0 && assigned !== pathFilter) conflicted.add(kind);
93
- pathFilters.set(kind, pathFilter);
94
- }
95
- }
96
- if (conflicted.size > 0) {
97
- const kinds = [...conflicted].toSorted().join(", ");
98
- throw new Error(`${spec.packageName}'s kit reads one kind through more than one path filter: ${kinds}`);
99
- }
100
- return pathFilters;
101
- }
102
74
  async function readProject() {
103
75
  const sources = await readTrackedSources(isSweptPath);
104
76
  if (sources === void 0) return void 0;
@@ -120,15 +92,43 @@ function defineAdoptionKit(spec) {
120
92
  shouldReport: (finding) => kinds.includes(finding.kind)
121
93
  });
122
94
  }
123
- function resolveScope(check) {
124
- return check.pathFilter === void 0 ? kitScope : { noSourcesReason: check.noSourcesReason, pathFilter: check.pathFilter };
125
- }
126
95
  async function skipUnlessProjectHoldsSources(scope) {
127
96
  const summary = await loadSummary();
128
97
  if (summary === void 0) return NOT_A_REPO;
129
98
  return summary.sources.some((source) => scope.pathFilter(source.path)) ? false : scope.noSourcesReason;
130
99
  }
131
100
  }
101
+ function assertCheckIdsAreUnique(spec) {
102
+ const seenIds = /* @__PURE__ */ new Set();
103
+ const duplicateIds = /* @__PURE__ */ new Set();
104
+ for (const { id } of spec.checks) {
105
+ if (seenIds.has(id)) duplicateIds.add(id);
106
+ seenIds.add(id);
107
+ }
108
+ if (duplicateIds.size === 0) return;
109
+ const ids = [...duplicateIds].toSorted().join(", ");
110
+ throw new Error(`${spec.packageName}'s kit gives one id to more than one check: ${ids}`);
111
+ }
112
+ function mapPathFiltersByKind(spec, kitScope) {
113
+ const pathFilters = /* @__PURE__ */ new Map();
114
+ const conflictingKinds = /* @__PURE__ */ new Set();
115
+ for (const check of spec.checks) {
116
+ const { pathFilter } = resolveScope(check, kitScope);
117
+ for (const kind of check.kinds) {
118
+ const assignedPathFilter = pathFilters.get(kind);
119
+ if (assignedPathFilter !== void 0 && assignedPathFilter !== pathFilter) conflictingKinds.add(kind);
120
+ pathFilters.set(kind, pathFilter);
121
+ }
122
+ }
123
+ if (conflictingKinds.size > 0) {
124
+ const kinds = [...conflictingKinds].toSorted().join(", ");
125
+ throw new Error(`${spec.packageName}'s kit reads one kind through more than one path filter: ${kinds}`);
126
+ }
127
+ return pathFilters;
128
+ }
129
+ function resolveScope(check, kitScope) {
130
+ return check.pathFilter === void 0 ? kitScope : { noSourcesReason: check.noSourcesReason, pathFilter: check.pathFilter };
131
+ }
132
132
 
133
133
  // ../adoption/src/portable/condenseWhitespace.ts
134
134
  function condenseWhitespace(text) {
@@ -170,18 +170,166 @@ function readLiteral(source, span) {
170
170
  return start === void 0 || end === void 0 ? void 0 : source.slice(start + 1, end - 1);
171
171
  }
172
172
 
173
+ // ../adoption/src/portable/listTemplateLiterals.ts
174
+ var EXPRESSION_KEYWORDS = /* @__PURE__ */ new Set([
175
+ "await",
176
+ "case",
177
+ "default",
178
+ "delete",
179
+ "do",
180
+ "else",
181
+ "in",
182
+ "instanceof",
183
+ "of",
184
+ "return",
185
+ "throw",
186
+ "typeof",
187
+ "void",
188
+ "yield"
189
+ ]);
190
+ var WORD_CHARACTER = /[\w$]/;
191
+ function listTemplateLiterals(code) {
192
+ const templates = [];
193
+ scanCode(0, false);
194
+ return templates.toSorted((a, b) => a.start - b.start);
195
+ function scanCode(from, isInterpolation) {
196
+ let braceDepth = 0;
197
+ let index = from;
198
+ while (index < code.length) {
199
+ const character = code[index];
200
+ if (character === "`") {
201
+ const end = scanTemplate(index);
202
+ if (end === void 0) return code.length;
203
+ index = end;
204
+ continue;
205
+ }
206
+ if (isInterpolation && character === "{") braceDepth += 1;
207
+ if (isInterpolation && character === "}") {
208
+ if (braceDepth === 0) return index;
209
+ braceDepth -= 1;
210
+ }
211
+ index += 1;
212
+ }
213
+ return code.length;
214
+ }
215
+ function scanTemplate(start) {
216
+ const interpolations = [];
217
+ let index = start + 1;
218
+ while (index < code.length) {
219
+ if (code[index] === "`") {
220
+ templates.push({ end: index + 1, interpolations, isTagged: isTagPosition(code, start), start });
221
+ return index + 1;
222
+ }
223
+ if (code[index] === "$" && code[index + 1] === "{") {
224
+ const close = scanCode(index + 2, true);
225
+ if (close === code.length) return void 0;
226
+ interpolations.push({ end: close + 1, start: index });
227
+ index = close + 1;
228
+ continue;
229
+ }
230
+ index += 1;
231
+ }
232
+ return void 0;
233
+ }
234
+ }
235
+ function findPrecedingCodeEnd(code, offset) {
236
+ let end = offset;
237
+ while (end > 0 && /\s/.test(code[end - 1] ?? "")) end -= 1;
238
+ return end;
239
+ }
240
+ function findTypeArgumentsStart(code, close) {
241
+ let depth = 0;
242
+ for (let index = close; index >= 0; index -= 1) {
243
+ if (code[index] === ">") depth += 1;
244
+ if (code[index] !== "<") {
245
+ continue;
246
+ }
247
+ depth -= 1;
248
+ if (depth === 0) return index;
249
+ }
250
+ return void 0;
251
+ }
252
+ function isTagPosition(code, offset) {
253
+ const end = findPrecedingCodeEnd(code, offset);
254
+ const character = code[end - 1];
255
+ if (character === void 0) return false;
256
+ if (character === ")" || character === "]") return true;
257
+ if (character === ">" && code[end - 2] !== "=") {
258
+ const typeArgumentsStart = findTypeArgumentsStart(code, end - 1);
259
+ return typeArgumentsStart !== void 0 && isTagPosition(code, typeArgumentsStart);
260
+ }
261
+ if (!WORD_CHARACTER.test(character)) return false;
262
+ let wordStart = end;
263
+ while (wordStart > 0 && WORD_CHARACTER.test(code[wordStart - 1] ?? "")) wordStart -= 1;
264
+ const isMemberName = code[findPrecedingCodeEnd(code, wordStart) - 1] === ".";
265
+ return isMemberName || !EXPRESSION_KEYWORDS.has(code.slice(wordStart, end));
266
+ }
267
+
268
+ // ../adoption/src/portable/readPathParts.ts
269
+ var BRACKET_CLOSERS = /* @__PURE__ */ new Set([")", "]", "}"]);
270
+ var BRACKET_OPENERS = /* @__PURE__ */ new Set(["(", "[", "{"]);
271
+ var PATH_TOKEN = /(?<quoted>(?<quote>['"])[^'"]*\k<quote>)|`|(?<![\w$.])(?<name>[A-Za-z_$][\w$]*)/g;
272
+ function findExpressionEnd(code, from, limit) {
273
+ let depth = 0;
274
+ for (let index = from; index < limit; index += 1) {
275
+ const character = code.charAt(index);
276
+ if (BRACKET_OPENERS.has(character)) depth += 1;
277
+ else if (BRACKET_CLOSERS.has(character)) {
278
+ if (depth === 0) return index;
279
+ depth -= 1;
280
+ } else if ((character === "," || character === ";") && depth === 0) return index;
281
+ }
282
+ return limit;
283
+ }
284
+ function readPathParts(code, source, start, end) {
285
+ return readParts(code, source, listTemplateLiterals(code), start, end);
286
+ }
287
+ function readParts(code, source, templates, start, end) {
288
+ const parts = [];
289
+ let resumeAt = start;
290
+ for (const match of code.slice(start, end).matchAll(PATH_TOKEN)) {
291
+ const offset = start + match.index;
292
+ if (offset < resumeAt) continue;
293
+ const name = match.groups?.["name"];
294
+ const quoted = match.groups?.["quoted"];
295
+ if (name !== void 0) {
296
+ parts.push({ kind: "read", name });
297
+ } else if (quoted !== void 0) {
298
+ parts.push({ kind: "text", text: source.slice(offset + 1, offset + quoted.length - 1) });
299
+ } else {
300
+ const template = templates.find((candidate) => candidate.start === offset);
301
+ if (template === void 0 || template.end > end) return void 0;
302
+ const templateParts = readTemplateParts(code, source, templates, template);
303
+ if (templateParts === void 0) return void 0;
304
+ parts.push(...templateParts);
305
+ resumeAt = template.end;
306
+ }
307
+ }
308
+ return parts;
309
+ }
310
+ function readTemplateParts(code, source, templates, template) {
311
+ const parts = [];
312
+ let textStart = template.start + 1;
313
+ for (const interpolation of template.interpolations) {
314
+ parts.push({ kind: "text", text: source.slice(textStart, interpolation.start) });
315
+ const interpolatedParts = readParts(code, source, templates, interpolation.start + 2, interpolation.end - 1);
316
+ if (interpolatedParts === void 0) return void 0;
317
+ parts.push(...interpolatedParts);
318
+ textStart = interpolation.end;
319
+ }
320
+ parts.push({ kind: "text", text: source.slice(textStart, template.end - 1) });
321
+ return parts;
322
+ }
323
+
173
324
  // ../adoption/src/portable/listDirectoryAscents.ts
174
325
  var ASSIGNED_TARGET = /(?<target>[A-Za-z_$][\w$]*) ?= ?$/;
175
326
  var ASSIGNMENT_WINDOW = { lookahead: 0, lookbehind: 80 };
176
- var BRACKET_CLOSERS = /* @__PURE__ */ new Set([")", "]", "}"]);
177
- var BRACKET_OPENERS = /* @__PURE__ */ new Set(["(", "[", "{"]);
178
327
  var DECLARATION = /\b(?:const|let|var)\s+(?<name>[A-Za-z_$][\w$]*)\s*(?::[^=;\n]*)?=(?![=>])/g;
179
328
  var DECLARED_NAME = /\b(?:const|let|var)\s+(?<name>[A-Za-z_$][\w$]*)/g;
180
329
  var DIRNAME_ASCENT = /(?:[A-Za-z_$][\w$]*\s*\.\s*)?\bdirname\s*\(\s*(?<subject>[A-Za-z_$][\w$]*)\s*\)/g;
181
330
  var LEADING_SEPARATOR = /^[/\\]+/;
182
331
  var LEVEL_PROBE = /\b(?:access|exists|lstat|readdir|readFile|stat)(?:Sync)?\s*\(/g;
183
332
  var LOOP_KEYWORD = /\b(?<keyword>do|for|while)\b/g;
184
- var PATH_TOKEN = /(?<quoted>(?<quote>['"])[^'"]*\k<quote>)|`|(?<![\w$.])(?<name>[A-Za-z_$][\w$]*)/g;
185
333
  var REASSIGNMENT = /(?<![\w$.])(?<!\b(?:const|let|var)\s+)(?<name>[A-Za-z_$][\w$]*)\s*(?:\*\*|<<|>>>?|&&|\|\||\?\?|[-+*/%&|^])?=(?![=>])/g;
186
334
  var SEPARATOR_RUN = /[/\\]+/g;
187
335
  var SIMPLE_ASSIGNMENT = /(?<![\w$])(?<target>[A-Za-z_$][\w$]*)\s*=(?!=)\s*(?<value>[A-Za-z_$][\w$]*)(?![\w$.([])/g;
@@ -238,18 +386,6 @@ function findBodyStart(code, afterKeyword, isDoLoop) {
238
386
  while (index < code.length && WHITESPACE.test(code.charAt(index))) index += 1;
239
387
  return code.charAt(index) === "{" ? index : void 0;
240
388
  }
241
- function findExpressionEnd(code, from, limit) {
242
- let depth = 0;
243
- for (let index = from; index < limit; index += 1) {
244
- const character = code.charAt(index);
245
- if (BRACKET_OPENERS.has(character)) depth += 1;
246
- else if (BRACKET_CLOSERS.has(character)) {
247
- if (depth === 0) return index;
248
- depth -= 1;
249
- } else if ((character === "," || character === ";") && depth === 0) return index;
250
- }
251
- return limit;
252
- }
253
389
  function isNested(inner, outer) {
254
390
  return outer.start <= inner.start && inner.end <= outer.end;
255
391
  }
@@ -285,11 +421,11 @@ function listProbedNames(code, source, loop, subject, scope) {
285
421
  if (argumentList === void 0) continue;
286
422
  const pathStart = argumentList.start + 1;
287
423
  const parts = readPathParts(code, source, pathStart, findExpressionEnd(code, pathStart, argumentList.end - 1));
288
- const expanded = parts === void 0 ? [] : expandPathParts(parts, scope, subject);
289
- const subjectIndex = expanded.findIndex((part) => part.kind === "read" && part.name === subject);
424
+ const expandedParts = parts === void 0 ? [] : expandPathParts(parts, scope, subject);
425
+ const subjectIndex = expandedParts.findIndex((part) => part.kind === "read" && part.name === subject);
290
426
  if (subjectIndex === -1) continue;
291
427
  isProbing = true;
292
- const name = readProbedName(expanded.slice(subjectIndex + 1));
428
+ const name = readProbedName(expandedParts.slice(subjectIndex + 1));
293
429
  if (name !== void 0) names.push(name);
294
430
  }
295
431
  return isProbing ? names : void 0;
@@ -318,27 +454,6 @@ function readAssignedTarget(region, offset) {
318
454
  const { before } = readAnchoredWindow(region, offset, ASSIGNMENT_WINDOW);
319
455
  return ASSIGNED_TARGET.exec(before)?.groups?.["target"];
320
456
  }
321
- function readPathParts(code, source, start, end) {
322
- const parts = [];
323
- let resumeAt = start;
324
- for (const match of code.slice(start, end).matchAll(PATH_TOKEN)) {
325
- const offset = start + match.index;
326
- if (offset < resumeAt) continue;
327
- const name = match.groups?.["name"];
328
- const quoted = match.groups?.["quoted"];
329
- if (name !== void 0) {
330
- parts.push({ kind: "read", name });
331
- } else if (quoted !== void 0) {
332
- parts.push({ kind: "text", text: source.slice(offset + 1, offset + quoted.length - 1) });
333
- } else {
334
- const template = readTemplateParts(code, source, offset, end);
335
- if (template === void 0) return void 0;
336
- parts.push(...template.parts);
337
- resumeAt = template.end;
338
- }
339
- }
340
- return parts;
341
- }
342
457
  function readProbedName(parts) {
343
458
  const segments = [];
344
459
  for (const part of parts) {
@@ -348,26 +463,6 @@ function readProbedName(parts) {
348
463
  const name = segments.join("/").replaceAll(SEPARATOR_RUN, "/").replace(LEADING_SEPARATOR, "");
349
464
  return name === "" ? void 0 : name;
350
465
  }
351
- function readTemplateParts(code, source, open, end) {
352
- const parts = [];
353
- let textStart = open + 1;
354
- for (; ; ) {
355
- const close = code.indexOf("`", textStart);
356
- if (close === -1 || close >= end) return void 0;
357
- const interpolation = code.indexOf("${", textStart);
358
- if (interpolation === -1 || interpolation > close) {
359
- parts.push({ kind: "text", text: source.slice(textStart, close) });
360
- return { end: close + 1, parts };
361
- }
362
- parts.push({ kind: "text", text: source.slice(textStart, interpolation) });
363
- const group = readBalancedGroup(code, interpolation + 1, BRACES);
364
- if (group === void 0 || group.end > end) return void 0;
365
- const interpolated = readPathParts(code, source, group.start + 1, group.end - 1);
366
- if (interpolated === void 0) return void 0;
367
- parts.push(...interpolated);
368
- textStart = group.end;
369
- }
370
- }
371
466
 
372
467
  // ../adoption/src/mod.ts
373
468
  import { blankNonCode, getLineAtOffset as getLineAtOffset2 } from "readyup/check-utils";
@@ -27,12 +27,12 @@
27
27
  "path": "../../adoption/src/conventions/site-handoffs.ts"
28
28
  },
29
29
  {
30
- "hash": "7b9002b8",
30
+ "hash": "f7ac439a",
31
31
  "kind": "module",
32
32
  "path": "../../adoption/src/kits/defineAdoptionKit.ts"
33
33
  },
34
34
  {
35
- "hash": "09840c67",
35
+ "hash": "5f17b6f3",
36
36
  "kind": "module",
37
37
  "path": "../../adoption/src/mod.ts"
38
38
  },
@@ -42,7 +42,7 @@
42
42
  "path": "../../adoption/src/portable/condenseWhitespace.ts"
43
43
  },
44
44
  {
45
- "hash": "3867c304",
45
+ "hash": "0e239ee7",
46
46
  "kind": "module",
47
47
  "path": "../../adoption/src/portable/listDirectoryAscents.ts"
48
48
  },
@@ -56,6 +56,11 @@
56
56
  "kind": "module",
57
57
  "path": "../../adoption/src/portable/listTemplateLiterals.ts"
58
58
  },
59
+ {
60
+ "hash": "46a142a5",
61
+ "kind": "module",
62
+ "path": "../../adoption/src/portable/listTopLevelArguments.ts"
63
+ },
59
64
  {
60
65
  "hash": "a5dc0993",
61
66
  "kind": "module",
@@ -66,11 +71,21 @@
66
71
  "kind": "module",
67
72
  "path": "../../adoption/src/portable/readBalancedGroup.ts"
68
73
  },
74
+ {
75
+ "hash": "d20d533a",
76
+ "kind": "module",
77
+ "path": "../../adoption/src/portable/readFunctionLiteral.ts"
78
+ },
69
79
  {
70
80
  "hash": "81846f1a",
71
81
  "kind": "module",
72
82
  "path": "../../adoption/src/portable/readLiteral.ts"
73
83
  },
84
+ {
85
+ "hash": "f35fdf0f",
86
+ "kind": "module",
87
+ "path": "../../adoption/src/portable/readPathParts.ts"
88
+ },
74
89
  {
75
90
  "hash": "9b6938d1",
76
91
  "kind": "module",
@@ -89,10 +104,10 @@
89
104
  ],
90
105
  "name": "default",
91
106
  "path": "kits/default.js",
92
- "readyupVersion": "0.43.0",
107
+ "readyupVersion": "0.46.1",
93
108
  "source": "kits/default.ts",
94
109
  "sourceHash": "9b6938d1",
95
- "targetHash": "ec65dcf4"
110
+ "targetHash": "9f5914cf"
96
111
  }
97
112
  ]
98
113
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,47 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.7.2 โ€” 2026-11-12
6
+
7
+ ### ๐Ÿ› Bug fixes
8
+
9
+ - Share one function-literal reader across the readiness kits (#470)
10
+
11
+ Fixes the issue that the biased-shuffle check in the `@williamthorsen/toolbelt.arrays` ReadyUp kit missed an inline `function` comparator whose parameter list contains braces, such as `function (a: { n: number }, b: { n: number }) { return Math.random() - 0.5; }`. The change moves the function-literal parsing of the `arrays`, `async`, and `vitest` kits into one shared reader in `adoption`, which finds a `function` expression's body past the braces in its parameter list.
12
+
13
+ - Claim a trailing-comma setTimeout as a hand-rolled sleep (#487)
14
+
15
+ Fixes the issue that the `@williamthorsen/toolbelt.async` ReadyUp kit did not report a hand-rolled sleep whose `setTimeout` call ends in a trailing comma, such as `setTimeout(resolve, 50,)`, as a candidate for `delay`. Replaces the two private copies of the argument splitter, which disagreed on the trailing comma, with one splitter in `packages/adoption` that the async and numbers kits both import.
16
+
17
+ ### ๐Ÿงช Tests
18
+
19
+ - Adds `createKitFixture`, which creates a tracked repo, points `process.cwd()` at it, and lists a kit's checks imported afresh, and `runEveryCheck`, which returns every check's report in order, to `@williamthorsen/toolbelt.adoption/test-utils`, and rewrites the kit tests in `src/readiness/__tests__/kit.tool.test.ts` to replace the repeated `createTrackedRepo`, `pointCwdAt`, and `listFreshKitChecks` calls with them. (#469)
20
+
21
+ ### ๐Ÿ“ฆ Dependencies
22
+
23
+ - Upgrades the catalog's `readyup` from 0.45.1 to 0.46.0 and recompiles each package's `.readyup/kits/default.js` and `.readyup/manifest.json`, because the bundled check utilities changed: `readFile` no longer throws `EISDIR` for a directory path. (#537)
24
+
25
+ ## 0.7.1 โ€” 2026-11-09
26
+
27
+ ### โ™ป๏ธ Refactoring
28
+
29
+ - Split the path-expression reader out of listDirectoryAscents (#437)
30
+
31
+ Moves the path-expression reader out of `packages/adoption/src/portable/listDirectoryAscents.ts` into its own module, `readPathParts.ts`, adds unit tests for it, and changes it to take each template literal from `listTemplateLiterals` instead of walking templates itself. Recompiles the committed kit bundles to match.
32
+
33
+ - Bring adoption's kit and ascent modules to the declaration-order and naming rules (#438)
34
+
35
+ Reorders the declarations in four `packages/adoption` files to follow the declaration-order rule, which puts the exported logic first and the helpers after it, and makes small naming and structure cleanups in the same files.
36
+
37
+ ### ๐Ÿงช Tests
38
+
39
+ - Replaces each kit test's local copy of the checklist helper with `listKitChecks` from `@williamthorsen/toolbelt.adoption/test-utils`, which throws when the kit's first checklist is missing or staged rather than return an empty list against which an assertion over every check passes. (#434)
40
+ - Replaces the copied `listSweptFiles` helper and `JS_TS_EXTENSION` regex in every `self-sweep.unit.test.ts` with `listJsTsSources` from `@williamthorsen/toolbelt.adoption/test-utils`, which lists the files directly inside each given directory that adoption's `isJsTsSource` accepts. (#435)
41
+ - Adds `listFreshKitChecks` to `@williamthorsen/toolbelt.adoption/test-utils` and moves every kit test onto it from its own copy of `loadChecks`, which reset Vitest's module registry to obtain a kit that had not yet swept a fixture repo. (#452)
42
+ - Deletes the "neither reports nor counts" examples and their `UNCLAIMED` fixtures from the remaining adoption kits' `kit.tool.test.ts`, since the detectors' unit tests already observe each of those declines. (#455)
43
+ - Adds `diffAdoptedExports` to `@williamthorsen/toolbelt.adoption/test-utils`, which returns a package's callable exports, the callable exports that `ADOPTED_EXPORTS` omits, and the listed names that the package's tiers don't export, and uses it in place of the hand-written comparison in each package's `adoptedExports.unit.test.ts`. (#458)
44
+ - Reduces every adoption kit's `pragma-suppression.tool.test.ts` to its qualified-pragma example, which asserts that the named check drops the site while every other check keeps its count, and deletes the examples that tested readyup's pragma matching rather than the kit. (#459)
45
+
5
46
  ## 0.7.0 โ€” 2026-10-25
6
47
 
7
48
  ### ๐ŸŽ‰ Features
package/README.md CHANGED
@@ -5,11 +5,17 @@
5
5
  Package and project layout utilities for TypeScript and JavaScript: where a package or project boundary begins, and what the manifest at that boundary declares.
6
6
 
7
7
  <!-- section:release-notes -->
8
- ## Release notes โ€” v0.7.0 (2026-10-25)
8
+ ## Release notes โ€” v0.7.2 (2026-11-12)
9
9
 
10
- ### ๐ŸŽ‰ Features
10
+ ### ๐Ÿ› Bug fixes
11
11
 
12
- - Adds the structured changelog `.meta/changelog.json` to each package's npm tarball, beside `CHANGELOG.md`. (#398)
12
+ - Share one function-literal reader across the readiness kits (#470)
13
+
14
+ Fixes the issue that the biased-shuffle check in the `@williamthorsen/toolbelt.arrays` ReadyUp kit missed an inline `function` comparator whose parameter list contains braces, such as `function (a: { n: number }, b: { n: number }) { return Math.random() - 0.5; }`. The change moves the function-literal parsing of the `arrays`, `async`, and `vitest` kits into one shared reader in `adoption`, which finds a `function` expression's body past the braces in its parameter list.
15
+
16
+ - Claim a trailing-comma setTimeout as a hand-rolled sleep (#487)
17
+
18
+ Fixes the issue that the `@williamthorsen/toolbelt.async` ReadyUp kit did not report a hand-rolled sleep whose `setTimeout` call ends in a trailing comma, such as `setTimeout(resolve, 50,)`, as a candidate for `delay`. Replaces the two private copies of the argument splitter, which disagreed on the trailing comma, with one splitter in `packages/adoption` that the async and numbers kits both import.
13
19
  <!-- /section:release-notes -->
14
20
 
15
21
  ## Installation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamthorsen/toolbelt.packaging",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Package and project layout utilities: where a package or project boundary begins, and what its manifest declares",
5
5
  "keywords": [
6
6
  "esm",
@@ -46,15 +46,15 @@
46
46
  ".meta/changelog.json"
47
47
  ],
48
48
  "dependencies": {
49
- "@williamthorsen/toolbelt.filesystem": "0.10.0",
50
- "@williamthorsen/toolbelt.objects": "4.4.0"
49
+ "@williamthorsen/toolbelt.filesystem": "0.10.2",
50
+ "@williamthorsen/toolbelt.objects": "4.4.2"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@williamthorsen/toolbelt.adoption": "0.1.0",
54
- "@williamthorsen/toolbelt.strings": "8.1.0",
55
- "@williamthorsen/toolbelt.testing": "0.8.0",
54
+ "@williamthorsen/toolbelt.strings": "8.2.3",
55
+ "@williamthorsen/toolbelt.testing": "0.8.2",
56
56
  "esbuild": "0.28.2",
57
- "readyup": "0.43.0"
57
+ "readyup": "0.46.1"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=24.0.0"