@williamthorsen/toolbelt.packaging 0.6.4 → 0.7.1
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/.meta/changelog.json +429 -0
- package/.readyup/kits/default.js +190 -95
- package/.readyup/manifest.json +9 -4
- package/CHANGELOG.md +35 -0
- package/dist/esm/internal/resolveOwningManifest.js +2 -1
- package/package.json +8 -5
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.7.1",
|
|
4
|
+
"date": "2026-11-09",
|
|
5
|
+
"sections": [
|
|
6
|
+
{
|
|
7
|
+
"title": "♻️ Refactoring",
|
|
8
|
+
"audience": "dev",
|
|
9
|
+
"items": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Split the path-expression reader out of listDirectoryAscents (#437)",
|
|
12
|
+
"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.",
|
|
13
|
+
"hash": "2fb88c8a64cccd9ce0fb7f83389bf1c468af0ea7"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"description": "Bring adoption's kit and ascent modules to the declaration-order and naming rules (#438)",
|
|
17
|
+
"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.",
|
|
18
|
+
"hash": "d31bd2f89a59ccc5aa77caf3549b0eb90e3a8b77"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"title": "🧪 Tests",
|
|
24
|
+
"audience": "dev",
|
|
25
|
+
"items": [
|
|
26
|
+
{
|
|
27
|
+
"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)",
|
|
28
|
+
"hash": "7ce7037b981429e72f2d4fc63ca1570dd61348e6",
|
|
29
|
+
"entry": 1
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"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)",
|
|
33
|
+
"hash": "6999eae76bf2125b9fa4dfde723b9660ef90a7fc",
|
|
34
|
+
"entry": 1
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"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)",
|
|
38
|
+
"hash": "a1952087f6130ae4cb0c94f8e73da75e6bc8f270",
|
|
39
|
+
"entry": 1
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"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)",
|
|
43
|
+
"hash": "c91b78849c2013c821d78d9a51b74f9f5f444f7f",
|
|
44
|
+
"entry": 1
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"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)",
|
|
48
|
+
"hash": "0d224e3a4430af688ee1b5bad83bf70bba09dba6",
|
|
49
|
+
"entry": 1
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"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)",
|
|
53
|
+
"hash": "b80c141f955bcf188378058899ce3d68f8cabfd6",
|
|
54
|
+
"entry": 1
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"version": "0.7.0",
|
|
62
|
+
"date": "2026-10-25",
|
|
63
|
+
"sections": [
|
|
64
|
+
{
|
|
65
|
+
"title": "🎉 Features",
|
|
66
|
+
"audience": "all",
|
|
67
|
+
"items": [
|
|
68
|
+
{
|
|
69
|
+
"description": "Adds the structured changelog `.meta/changelog.json` to each package's npm tarball, beside `CHANGELOG.md`. (#398)",
|
|
70
|
+
"hash": "2ce82cd51b7b78270274ae9318c2bc726eb09cf0",
|
|
71
|
+
"entry": 1
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"title": "♻️ Refactoring",
|
|
77
|
+
"audience": "dev",
|
|
78
|
+
"items": [
|
|
79
|
+
{
|
|
80
|
+
"description": "Replaces hand-rolled error descriptions, `instanceof Error` checks on caught values, record guards, directory ascents, and first-letter capitalization in package source with `describeError`, `isError`, `isRecord`, `isRecordOrArray`, `listDirectoryChain`, and `capitalize`, and declares each helper's package from another workspace as a `workspace:*` runtime dependency of the package that adopts it. (#400)",
|
|
81
|
+
"hash": "dc681ce947df9aebf203f9457b10bc8afd2adec1",
|
|
82
|
+
"entry": 1
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"title": "🧪 Tests",
|
|
88
|
+
"audience": "dev",
|
|
89
|
+
"items": [
|
|
90
|
+
{
|
|
91
|
+
"description": "Rewrites the array-join fixtures and the untagged multi-line template fixtures in the readiness and parser tests as `dedent` templates that render the same text, and declares `@williamthorsen/toolbelt.strings` as a devDependency of each package that now imports `dedent` in its tests. (#401)",
|
|
92
|
+
"hash": "3453f00005619f771b84ba0263bf5c40df8b2795",
|
|
93
|
+
"entry": 1
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"version": "0.6.4",
|
|
101
|
+
"date": "2026-10-24",
|
|
102
|
+
"sections": [
|
|
103
|
+
{
|
|
104
|
+
"title": "📦 Dependencies",
|
|
105
|
+
"audience": "dev",
|
|
106
|
+
"items": [
|
|
107
|
+
{
|
|
108
|
+
"description": "Upgrade dependencies to latest compatible versions (#391)",
|
|
109
|
+
"body": "Upgrades Node.js, pnpm, and the repository's dependencies to their latest compatible releases, which clears the three dev advisories that failed `nmr audit`. The upgrade to `@williamthorsen/eslint-config-typescript` 20.1.3 adds unicorn lint rules, and the code is adapted to them in the same change.",
|
|
110
|
+
"hash": "7ecdab12fec8c866d54cef4c072b90376664ece0"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"version": "0.6.3",
|
|
118
|
+
"date": "2026-10-09",
|
|
119
|
+
"sections": [
|
|
120
|
+
{
|
|
121
|
+
"title": "🎉 Features",
|
|
122
|
+
"audience": "all",
|
|
123
|
+
"items": [
|
|
124
|
+
{
|
|
125
|
+
"description": "Add a ReadyUp kit recommending toolbelt.cli over hand-rolled argument parsing (#367)",
|
|
126
|
+
"body": "Adds a ReadyUp adoption kit to `@williamthorsen/toolbelt.cli` that reports, through `rdy run --packages`, each call to `node:util`'s `parseArgs` and each function that compares arguments against flag names by hand. Includes `bin/` and `src/bin/` in the kit's sweep, which the other toolbelt kits exempt, because a command-line runner usually lives there.",
|
|
127
|
+
"hash": "9ba17df22caf393c492f3452ee5cabaa6850391d"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"title": "📚 Documentation",
|
|
133
|
+
"audience": "dev",
|
|
134
|
+
"items": [
|
|
135
|
+
{
|
|
136
|
+
"description": "Updates each kit README to show `rdy run --sources` and a `sources: ['npm:…']` config example, and states that this spelling needs readyup 0.40.0 or later. (#371)",
|
|
137
|
+
"hash": "e4f5c2e65a0d62bbf3ea215566c8cc7aff3b5ec6",
|
|
138
|
+
"entry": 2
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"version": "0.6.2",
|
|
146
|
+
"date": "2026-10-02",
|
|
147
|
+
"sections": [
|
|
148
|
+
{
|
|
149
|
+
"title": "📚 Documentation",
|
|
150
|
+
"audience": "dev",
|
|
151
|
+
"items": [
|
|
152
|
+
{
|
|
153
|
+
"description": "Sweep the repository's comments against the comment discipline (#353)",
|
|
154
|
+
"body": "Sweeps the comments in every authored source file against the comment discipline. The sweep cuts comments that restate the code or narrate history, corrects descriptions that contradicted the code, and adds descriptions to declarations that lacked one. It also tags the exported tier functions and classes that lacked `@category` and `@stage`, and corrects test titles that misstated their tests.",
|
|
155
|
+
"hash": "a63031711563d43c6909609fad4feccfe497e5d1"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"description": "Revises READMEs, doc comments, and test names across the repository to follow the current `plain-speech` and writing-preference rules. (#354)",
|
|
159
|
+
"hash": "b4e08eede95e052f4c27db2640ed6515df14baf4",
|
|
160
|
+
"entry": 1
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"description": "Rewords the help text and messages printed by `tb-jira`, `tb-node`, and `tb-secret`, and the advice and skip reasons reported by the adoption kits, to follow the same writing conventions. (#354)",
|
|
164
|
+
"hash": "b4e08eede95e052f4c27db2640ed6515df14baf4",
|
|
165
|
+
"entry": 2
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"version": "0.6.0",
|
|
173
|
+
"date": "2026-09-15",
|
|
174
|
+
"sections": [
|
|
175
|
+
{
|
|
176
|
+
"title": "🎉 Features",
|
|
177
|
+
"audience": "all",
|
|
178
|
+
"items": [
|
|
179
|
+
{
|
|
180
|
+
"description": "Move createTempTree from toolbelt.filesystem to toolbelt.testing (#313)",
|
|
181
|
+
"body": "- Moves `CreateTempTreeOptions` and the `TempTree` handle to `@williamthorsen/toolbelt.testing/candidate` along with `createTempTree`.\n\nMigration: Import `createTempTree`, `CreateTempTreeOptions`, and `TempTree` from `@williamthorsen/toolbelt.testing/candidate`, and declare `@williamthorsen/toolbelt.testing` in the manifest that declared `@williamthorsen/toolbelt.filesystem` for them.",
|
|
182
|
+
"breaking": true,
|
|
183
|
+
"migration": "Import `createTempTree`, `CreateTempTreeOptions`, and `TempTree` from `@williamthorsen/toolbelt.testing/candidate`, and declare `@williamthorsen/toolbelt.testing` in the manifest that declared `@williamthorsen/toolbelt.filesystem` for them.",
|
|
184
|
+
"hash": "857dc50b69084af6de51cb557c0e54e0083e375d"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"description": "Add a ReadyUp adoption kit reporting hand-rolled package.json searches (#322)",
|
|
188
|
+
"body": "- Adds a ReadyUp adoption kit to `@williamthorsen/toolbelt.packaging` that recommends `findPackageRoot`, `resolveSelfVersion`, or `findProjectRoot` in place of a hand-rolled loop checking each ancestor directory for `package.json`.",
|
|
189
|
+
"hash": "4b31630255bfcf33106eb43c52b3ee1b5a753de8"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"description": "Read a directory walk's probed name through a binding or constant (#324)",
|
|
193
|
+
"body": "- Extends the ReadyUp adoption kit in `@williamthorsen/toolbelt.packaging` to recommend `findPackageRoot` or `resolveSelfVersion` for a hand-rolled `package.json` search that checks for the file through a variable declared once inside its loop and never reassigned there, or through a string constant declared once in the same file.\n- Stops the kit in `@williamthorsen/toolbelt.filesystem` from reporting such a search, which it previously treated as a generic directory walk.",
|
|
194
|
+
"hash": "59abc905f869bf251d2fb422ffb09b85f1e0e263"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"description": "Report hand-rolled dedents in the strings adoption kit (#330)",
|
|
198
|
+
"body": "- Adds `no-joined-line-array`, which reports an array of string or template literals that spans several lines and is joined with a newline.\n- Adds `no-layout-breaking-template`, which reports an untagged template literal whose later lines drop below the indentation of the line on which it opens.",
|
|
199
|
+
"hash": "5aa43ad1bb403642a6236e557bbe73af24891a66"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"title": "🧪 Tests",
|
|
205
|
+
"audience": "dev",
|
|
206
|
+
"items": [
|
|
207
|
+
{
|
|
208
|
+
"description": "Move the rdy run report reader into the adoption test utilities (#323)",
|
|
209
|
+
"body": "- Replaces the `rdy run --json` report reader copied into each of the twelve `pragma-suppression.tool.test.ts` suites with `listKitCheckReports`, a helper added to `@williamthorsen/toolbelt.adoption/test-utils` that runs a package's compiled kit over a fixture repo and returns its check reports, so a change to the shape of readyup's report needs one edit rather than twelve.\n- Fixes the error thrown for a kit that does not load: Each copy discarded the load error recorded by `rdy` on the kit's entry and threw \"the run reported no adoption checks\", and the helper throws with `rdy`'s own message instead.",
|
|
210
|
+
"hash": "16a542b74f2bf5a06ef7f6390144e55cdc1930f2"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"title": "⚙️ Tooling",
|
|
216
|
+
"audience": "dev",
|
|
217
|
+
"items": [
|
|
218
|
+
{
|
|
219
|
+
"description": "Remove the stale repo-local cliff.toml and normalize changelog titles (#327)",
|
|
220
|
+
"body": "- Stops `release-kit prepare` from printing a \"skipped due to grouping error(s)\" warning for each releasable workspace by letting it resolve the git-cliff template bundled with release-kit, previously overridden by the root `cliff.toml`.\n- Excludes commits without a ticket prefix from future changelog entries.\n- Renames the section titles in every `packages/*/.meta/changelog.json`, except `Dependency updates`, to the headings of release-kit's work-type taxonomy, such as \"🎉 Features\" and \"🏗️ Internal features\", and regenerates each `CHANGELOG.md` so that release-kit orders existing and new sections by the same rule.\n- Causes the next `release-kit prepare` to plan patch releases of `dstructs`, `hof`, and `sets`, which had no other commits since their last release, because the changelog commit touches every workspace.",
|
|
221
|
+
"hash": "2b3c4fe7a08f210adb66f4a4f5bfedc011908d36"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"title": "📚 Documentation",
|
|
227
|
+
"audience": "dev",
|
|
228
|
+
"items": [
|
|
229
|
+
{
|
|
230
|
+
"description": "Align prose with plain-speech doctrine and writing conventions (#306)",
|
|
231
|
+
"body": "- Copy-edits prose across the repo: comments, test names, package READMEs, and `AGENTS.md`.\n- Rewrites a few user-facing strings as well, among them `configure-project`'s help text and the errors from `parseProjectSpec`, `securityCommands`, and `hashString`.",
|
|
232
|
+
"hash": "ab9c5a84a25e5084986733ecc79b88be9b9c7ef1"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"version": "0.5.5",
|
|
240
|
+
"date": "2026-09-06",
|
|
241
|
+
"sections": [
|
|
242
|
+
{
|
|
243
|
+
"title": "📚 Documentation",
|
|
244
|
+
"audience": "dev",
|
|
245
|
+
"items": [
|
|
246
|
+
{
|
|
247
|
+
"description": "Repair reduced object relatives in passages recurring across files (#262)",
|
|
248
|
+
"body": "Repairs the reduced object relative in the prose passages that recur across more than one file, in package READMEs, source comments, test titles, and the ReadyUp kits' check messages.",
|
|
249
|
+
"hash": "10e13b1b2e0d9b98b4924db5ecb86fcae08eb56b"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"description": "Repair reduced object relatives in the READMEs and AGENTS.md (#263)",
|
|
253
|
+
"body": "Repairs the reduced object relative in `AGENTS.md`, the root `README.md`, and the package READMEs.",
|
|
254
|
+
"hash": "0154bf51519c318d77e92fb5e8d8fbf9db9470ce"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"description": "Repair the repository's prose and record every rejection's ground (#290)",
|
|
258
|
+
"body": "Applies one repo-wide `revise-prose` sweep across the repository's READMEs, `AGENTS.md`, source comments, doc descriptions, and test names.",
|
|
259
|
+
"hash": "e04e58fb6172a585a9207d363f96c9e481031baf"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"version": "0.5.4",
|
|
267
|
+
"date": "2026-08-30",
|
|
268
|
+
"sections": [
|
|
269
|
+
{
|
|
270
|
+
"title": "Dependency updates",
|
|
271
|
+
"audience": "dev",
|
|
272
|
+
"items": [{ "description": "Bumped `@williamthorsen/toolbelt.filesystem` to 0.8.2" }]
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"version": "0.5.3",
|
|
278
|
+
"date": "2026-08-28",
|
|
279
|
+
"sections": [
|
|
280
|
+
{
|
|
281
|
+
"title": "Dependency updates",
|
|
282
|
+
"audience": "dev",
|
|
283
|
+
"items": [{ "description": "Bumped `@williamthorsen/toolbelt.filesystem` to 0.8.1" }]
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"version": "0.5.2",
|
|
289
|
+
"date": "2026-08-24",
|
|
290
|
+
"sections": [
|
|
291
|
+
{
|
|
292
|
+
"title": "Dependency updates",
|
|
293
|
+
"audience": "dev",
|
|
294
|
+
"items": [{ "description": "Bumped `@williamthorsen/toolbelt.filesystem` to 0.8.0" }]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"version": "0.5.1",
|
|
300
|
+
"date": "2026-08-21",
|
|
301
|
+
"sections": [
|
|
302
|
+
{
|
|
303
|
+
"title": "Dependency updates",
|
|
304
|
+
"audience": "dev",
|
|
305
|
+
"items": [{ "description": "Bumped `@williamthorsen/toolbelt.filesystem` to 0.7.0" }]
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"version": "0.5.0",
|
|
311
|
+
"date": "2026-08-16",
|
|
312
|
+
"sections": [
|
|
313
|
+
{
|
|
314
|
+
"title": "🎉 Features",
|
|
315
|
+
"audience": "all",
|
|
316
|
+
"items": [
|
|
317
|
+
{
|
|
318
|
+
"description": "Add `pointCwdAt`, a scope-bound cwd pointer (#178)",
|
|
319
|
+
"body": "Adds `pointCwdAt` to `@williamthorsen/toolbelt.testing/candidate`, a `Disposable` that points `process.cwd()` at a directory for the enclosing scope and restores the prior state when the scope exits.\n\nRestoration is by saved value rather than by spy, so scopes nest in any combination and neither `restoreMocks: true` nor a stray `vi.restoreAllMocks()` can point a suite back at the real working directory.",
|
|
320
|
+
"hash": "9f35d5286061345b16888fc0ef101b344b13085d"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"version": "0.4.0",
|
|
328
|
+
"date": "2026-08-15",
|
|
329
|
+
"sections": [
|
|
330
|
+
{
|
|
331
|
+
"title": "🎉 Features",
|
|
332
|
+
"audience": "all",
|
|
333
|
+
"items": [
|
|
334
|
+
{
|
|
335
|
+
"description": "Promote createTempTree to the candidate tier with a caller-chosen prefix and binary entries (#148)",
|
|
336
|
+
"body": "Promotes `createTempTree` and `TempTree` to `@williamthorsen/toolbelt.filesystem/candidate`, adding two capabilities as they move: a caller-chosen prefix for the temporary directory's name, and file contents given as bytes. A prefix that would place the tree anywhere but directly inside the system temporary directory is rejected before anything is created.\n\nMigration: `createTempTree` and `TempTree` are imported from `@williamthorsen/toolbelt.filesystem/candidate` rather than `/proposed`.",
|
|
337
|
+
"breaking": true,
|
|
338
|
+
"migration": "`createTempTree` and `TempTree` are imported from `@williamthorsen/toolbelt.filesystem/candidate` rather than `/proposed`.",
|
|
339
|
+
"hash": "f0885cc49b3bcc8ab1585bb690e4ec779593235e"
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"version": "0.3.1",
|
|
347
|
+
"date": "2026-08-13",
|
|
348
|
+
"sections": [
|
|
349
|
+
{
|
|
350
|
+
"title": "⚙️ Tooling",
|
|
351
|
+
"audience": "dev",
|
|
352
|
+
"items": [
|
|
353
|
+
{
|
|
354
|
+
"description": "Remove redundant .gitignore files",
|
|
355
|
+
"hash": "d9bf7346a95b497e439398163202ca75deb48d1c"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"description": "Populate manifest metadata and adopt a pnpm catalog (#140)",
|
|
359
|
+
"body": "Adopts a pnpm catalog to avoid specifying the version of a common dependency in multiple places. Separately, fixes violations of newly activated `package-json` lint rules. Missing values have been added to `package.json` fields across the repo, and package descriptions are improved.",
|
|
360
|
+
"hash": "e01eff7c4af4a492b04b86762043565b408d6bea"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"version": "0.3.0",
|
|
368
|
+
"date": "2026-08-12",
|
|
369
|
+
"sections": [
|
|
370
|
+
{
|
|
371
|
+
"title": "🎉 Features",
|
|
372
|
+
"audience": "all",
|
|
373
|
+
"items": [
|
|
374
|
+
{
|
|
375
|
+
"description": "Rename get* functions by return kind and verb specificity (#119)",
|
|
376
|
+
"body": "Renames thirteen functions across various packages to align with a consistent naming pattern.",
|
|
377
|
+
"breaking": true,
|
|
378
|
+
"hash": "eda0269aff5da9f97ba69ad17b9f381a0e248d5e"
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"title": "♻️ Refactoring",
|
|
384
|
+
"audience": "dev",
|
|
385
|
+
"items": [
|
|
386
|
+
{
|
|
387
|
+
"description": "Align stray modules with layout and TypeScript conventions (#118)",
|
|
388
|
+
"body": "Aligns all packages with code-layout and annotation conventions, ending a handful of long-standing exceptions. Documentation has been updated to make the conventions clear.",
|
|
389
|
+
"hash": "03fe37b2f5159348053db9cc21c5915b6847c26f"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"version": "0.2.0",
|
|
397
|
+
"date": "2026-08-08",
|
|
398
|
+
"sections": [
|
|
399
|
+
{
|
|
400
|
+
"title": "🎉 Features",
|
|
401
|
+
"audience": "all",
|
|
402
|
+
"items": [
|
|
403
|
+
{
|
|
404
|
+
"description": "Scaffold toolbelt.packaging for project-layout utilities (#99)",
|
|
405
|
+
"body": "Adds `@williamthorsen/toolbelt.packaging`, a package scoped to package and project layout: where a package or project boundary begins, and what the manifest at that boundary declares. It exports nothing yet.",
|
|
406
|
+
"hash": "0cafd158a59535135033aabe051101e0ecb3af1b"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"description": "Add findPackageRoot, getSelfVersion, and findProjectRoot to toolbelt.packaging (#107)",
|
|
410
|
+
"body": "Adds a way for any module, whether it runs from a source tree or a compiled build, to identify the package that owns it and the version that package declares.\n\n`findProjectRoot` moves from `@williamthorsen/toolbelt.filesystem` to `@williamthorsen/toolbelt.packaging`. Callers of `loadConfigCascade` must now state where its upward search stops, rather than relying on a project root the function found for them.",
|
|
411
|
+
"breaking": true,
|
|
412
|
+
"hash": "dde45692f300586bc4154931edc483d49fc0defb"
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"title": "⚙️ Tooling",
|
|
418
|
+
"audience": "dev",
|
|
419
|
+
"items": [
|
|
420
|
+
{
|
|
421
|
+
"description": "Use identical compiler settings for all packages (#105)",
|
|
422
|
+
"body": "All packages now have identical compiler settings, using the settings from the `@williamthorsen/tsconfig` base config without modification.",
|
|
423
|
+
"hash": "253af1cc885cb5d11e60b03221e2b38237874cf4"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
]
|
package/.readyup/kits/default.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noformat -- @generated. Do not edit. Compiled by rdy. */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export const __readyupVersion = "0.
|
|
3
|
+
export const __readyupVersion = "0.45.0";
|
|
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
|
|
289
|
-
const subjectIndex =
|
|
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(
|
|
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";
|
package/.readyup/manifest.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"path": "../../adoption/src/conventions/site-handoffs.ts"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"hash": "
|
|
30
|
+
"hash": "f7ac439a",
|
|
31
31
|
"kind": "module",
|
|
32
32
|
"path": "../../adoption/src/kits/defineAdoptionKit.ts"
|
|
33
33
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"path": "../../adoption/src/portable/condenseWhitespace.ts"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
"hash": "
|
|
45
|
+
"hash": "0e239ee7",
|
|
46
46
|
"kind": "module",
|
|
47
47
|
"path": "../../adoption/src/portable/listDirectoryAscents.ts"
|
|
48
48
|
},
|
|
@@ -71,6 +71,11 @@
|
|
|
71
71
|
"kind": "module",
|
|
72
72
|
"path": "../../adoption/src/portable/readLiteral.ts"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"hash": "f35fdf0f",
|
|
76
|
+
"kind": "module",
|
|
77
|
+
"path": "../../adoption/src/portable/readPathParts.ts"
|
|
78
|
+
},
|
|
74
79
|
{
|
|
75
80
|
"hash": "9b6938d1",
|
|
76
81
|
"kind": "module",
|
|
@@ -89,10 +94,10 @@
|
|
|
89
94
|
],
|
|
90
95
|
"name": "default",
|
|
91
96
|
"path": "kits/default.js",
|
|
92
|
-
"readyupVersion": "0.
|
|
97
|
+
"readyupVersion": "0.45.0",
|
|
93
98
|
"source": "kits/default.ts",
|
|
94
99
|
"sourceHash": "9b6938d1",
|
|
95
|
-
"targetHash": "
|
|
100
|
+
"targetHash": "851b488a"
|
|
96
101
|
}
|
|
97
102
|
]
|
|
98
103
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.7.1 — 2026-11-09
|
|
6
|
+
|
|
7
|
+
### ♻️ Refactoring
|
|
8
|
+
|
|
9
|
+
- Split the path-expression reader out of listDirectoryAscents (#437)
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
- Bring adoption's kit and ascent modules to the declaration-order and naming rules (#438)
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
### 🧪 Tests
|
|
18
|
+
|
|
19
|
+
- 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)
|
|
20
|
+
- 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)
|
|
21
|
+
- 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)
|
|
22
|
+
- 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)
|
|
23
|
+
- 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)
|
|
24
|
+
- 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)
|
|
25
|
+
|
|
26
|
+
## 0.7.0 — 2026-10-25
|
|
27
|
+
|
|
28
|
+
### 🎉 Features
|
|
29
|
+
|
|
30
|
+
- Adds the structured changelog `.meta/changelog.json` to each package's npm tarball, beside `CHANGELOG.md`. (#398)
|
|
31
|
+
|
|
32
|
+
### ♻️ Refactoring
|
|
33
|
+
|
|
34
|
+
- Replaces hand-rolled error descriptions, `instanceof Error` checks on caught values, record guards, directory ascents, and first-letter capitalization in package source with `describeError`, `isError`, `isRecord`, `isRecordOrArray`, `listDirectoryChain`, and `capitalize`, and declares each helper's package from another workspace as a `workspace:*` runtime dependency of the package that adopts it. (#400)
|
|
35
|
+
|
|
36
|
+
### 🧪 Tests
|
|
37
|
+
|
|
38
|
+
- Rewrites the array-join fixtures and the untagged multi-line template fixtures in the readiness and parser tests as `dedent` templates that render the same text, and declares `@williamthorsen/toolbelt.strings` as a devDependency of each package that now imports `dedent` in its tests. (#401)
|
|
39
|
+
|
|
5
40
|
## 0.6.4 — 2026-10-24
|
|
6
41
|
|
|
7
42
|
### 📦 Dependencies
|
|
@@ -2,6 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { listDirectoryChain } from '@williamthorsen/toolbelt.filesystem';
|
|
5
|
+
import { isRecord } from '@williamthorsen/toolbelt.objects';
|
|
5
6
|
export function resolveOwningManifest(fromUrl) {
|
|
6
7
|
const startDir = path.dirname(fileURLToPath(fromUrl));
|
|
7
8
|
for (const dir of listDirectoryChain(startDir)) {
|
|
@@ -16,7 +17,7 @@ export function resolveOwningManifest(fromUrl) {
|
|
|
16
17
|
throw new Error(`No package.json declaring a name was found at or above: ${fromUrl}`);
|
|
17
18
|
}
|
|
18
19
|
function isPackageManifest(value) {
|
|
19
|
-
return
|
|
20
|
+
return isRecord(value);
|
|
20
21
|
}
|
|
21
22
|
function readManifest(manifestPath) {
|
|
22
23
|
let parsed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/toolbelt.packaging",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
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",
|
|
@@ -42,16 +42,19 @@
|
|
|
42
42
|
".readyup/kits/*.js",
|
|
43
43
|
".readyup/manifest.json",
|
|
44
44
|
"dist/*",
|
|
45
|
-
"CHANGELOG.md"
|
|
45
|
+
"CHANGELOG.md",
|
|
46
|
+
".meta/changelog.json"
|
|
46
47
|
],
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@williamthorsen/toolbelt.filesystem": "0.
|
|
49
|
+
"@williamthorsen/toolbelt.filesystem": "0.10.1",
|
|
50
|
+
"@williamthorsen/toolbelt.objects": "4.4.1"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"@williamthorsen/toolbelt.adoption": "0.1.0",
|
|
52
|
-
"@williamthorsen/toolbelt.
|
|
54
|
+
"@williamthorsen/toolbelt.strings": "8.2.2",
|
|
55
|
+
"@williamthorsen/toolbelt.testing": "0.8.1",
|
|
53
56
|
"esbuild": "0.28.2",
|
|
54
|
-
"readyup": "0.
|
|
57
|
+
"readyup": "0.45.0"
|
|
55
58
|
},
|
|
56
59
|
"engines": {
|
|
57
60
|
"node": ">=24.0.0"
|