Repository navigation
docs(readme): list uniku/uuid/v7 in the no-barrel-exports block - #122
Merged
Merged
Conversation
The block that shows one import per generator listed ten of eleven entry
points: `uniku/uuid/v7` was missing. That contradicted the README's own opening
line ("Eleven ID strategies") and its first example, which imports `uuidv7`, and
it read as though UUID v7 was not importable.
`packages/uniku/README.md` is a second, hand-maintained copy of the same file and
npm publishes it, so both needed the line.
Guarded so it cannot drift again:
- `readme-entrypoints.test.ts` extracts the specifiers from that block and
compares them against `scripts/entrypoints.mjs`, the single source of truth the
build, bundle summary, and publish smoke already derive from. Editing the block
without touching the manifest, or the reverse, now fails a unit test.
- It also asserts the two README copies stay byte-identical, since nothing
generates one from the other.
Verified the guard catches the original bug: reverting the README line fails the
suite with `expected [Array(10)] to deeply equal [...]` and restoring it passes.
Contributor
|
Preview removed because the pull request was closed. |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Yes — it was missing
uniku/uuid/v7was absent from the "There are no barrel exports" block: ten imports for eleven generators. It contradicted the README's own opening line ("Eleven ID strategies behind one consistent, type-safe API") and its first example, which importsuuidv7from that exact path, so it read as though UUID v7 was the one generator you could not import directly.Two files, not one
packages/uniku/README.mdis a hand-maintained copy ofREADME.md, not a symlink, and it is the one npm publishes (it is listed infiles). Nothing derives one from the other, which is a plausible way for a line to go missing in one place and not the other. Both are updated here.Guard so it cannot drift again
packages/uniku/__tests__/unit/readme-entrypoints.test.ts:scripts/entrypoints.mjs— the manifest the build,bundle-summary, andpublish-smokealready derive from. A generator added to the manifest but not the README, a README line removed, a duplicate, or a specifier that does not exist now all fail.uniku/uuid/v7x).errorsandgeneratorsare excluded because they are metadata entry points documented in their own table, and./cuid2is excluded as the deprecated alias of./cuid/v2.Verified the guard catches the original bug rather than passing trivially — reverting the README line gives:
This follows the existing docs↔code parity tests for
ERROR_CODES, which already read repo files from the same unit project.Note for the reviewer
This is independent of the stack (#116–#120), so it applies cleanly either way — but see the other PR about
main:maincurrently contains only #116. The other four were merged into their own base branches (GitHub merges a stacked PR into its base), so the ULID 48-bit fix, theuuidv7.timestamp()guard, the contract corrections, and the benchmark work are not onmainyet.changeset-release/main(#121) has already consumed the only changeset onmainand would publish0.8.1with one of five fixes, so it should wait.