Skip to content

Commit 6943445

Browse files
committed
docs(spec): the major-18 conversions docblock places the import, not the definition
Since the per-entry split, a conversion is defined in its own module under `./entries/18/<id>.ts` and `registry.ts` only imports it. The docblock's placement bullet still told an author to define the conversion above the next entry's definition, directly above `OrderedConversion`. It now says what `scripts/conversions-major18-merge.test.ts` enforces: the module named for the `id`, and the import directly above the import of the entry that follows in the list, or after every other `./entries/18/` import when it sorts last. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVugtCCwBs98FeR27P
1 parent 778aedf commit 6943445

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎packages/spec/src/conversions/registry.ts‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,15 @@ function inApplicationOrder(entries: readonly OrderedConversion[]): readonly Met
178178
* take the same number; they then apply in `id` order. One that must apply
179179
* BEFORE an existing entry takes a number between its neighbours' (`23.5`)
180180
* instead of renumbering them.
181-
* - DEFINE it directly above the definition of the entry that follows it in
182-
* this list, so the conversion defined next after it is that entry. One that
183-
* sorts last is defined after every other conversion, directly above
184-
* `OrderedConversion`. The end of the definitions is one gap too: defining
185-
* every new conversion there conflicts exactly as appending here did.
181+
* - DEFINE it in a module of its own, `./entries/18/<id>.ts`, the file named for
182+
* the conversion's `id` and exporting it by name (`export { <identifier> };`).
183+
* A new file never conflicts.
184+
* - IMPORT it directly above the import of the entry that follows it in this
185+
* list, so the conversion imported next after it is that entry. One that
186+
* sorts last is imported after every other `./entries/18/` import. The
187+
* imports stand where the definitions stood before the split, and their end
188+
* is one gap too: importing every new conversion there conflicts exactly as
189+
* appending here did.
186190
*
187191
* `scripts/conversions-major18-merge.test.ts` holds both rules for every entry
188192
* added after this shape, and proves the merge.

0 commit comments

Comments
 (0)