Skip to content

docs(readme): list uniku/uuid/v7 in the no-barrel-exports block - #122

Merged
jkomyno merged 2 commits into
mainfrom
fix/readme-entry-points
Nov 16, 2026
Merged

jkomyno merged 2 commits into
mainfrom
fix/readme-entry-points

Conversation

@jkomyno

@jkomyno jkomyno commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Yes — it was missing

uniku/uuid/v7 was 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 imports uuidv7 from 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.md is a hand-maintained copy of README.md, not a symlink, and it is the one npm publishes (it is listed in files). 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:

  1. extracts every specifier from that block and compares it against scripts/entrypoints.mjs — the manifest the build, bundle-summary, and publish-smoke already 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.
  2. asserts the two README copies stay byte-identical.
  3. asserts every listed specifier resolves to a registered entry point (catches typos like uniku/uuid/v7x).

errors and generators are excluded because they are metadata entry points documented in their own table, and ./cuid2 is excluded as the deprecated alias of ./cuid/v2.

Verified the guard catches the original bug rather than passing trivially — reverting the README line gives:

AssertionError: expected [ Array(10) ] to deeply equal [ 'uniku/cuid/v2', …(10) ]

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: main currently 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, the uuidv7.timestamp() guard, the contract corrections, and the benchmark work are not on main yet. changeset-release/main (#121) has already consumed the only changeset on main and would publish 0.8.1 with one of five fixes, so it should wait.

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.
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview removed because the pull request was closed.

@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@uniku/cli@122
pnpm add https://pkg.pr.new/uniku@122

commit: cc05860

@jkomyno
jkomyno merged commit 936a479 into main Nov 16, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant