Skip to content

documents.js examples.test.ts: checked-in example goldens still pin document-schema.js@5.0.0 after the 6.0.0 breaking bump #1031

Description

@Mearman

On current main, `pnpm --dir packages/documents.js exec vitest run src/examples.test.ts` fails 10 of 11 tests with:

```
SchemaVersionMismatchError: documentFromJson: this dump's $schema pins document-schema.js@5.0.0, but the installed release is @6.0.0, and a dump only parses under the major that wrote it.
```

`packages/document-schema.js/package.json` is at 6.0.0 (the discriminated pattern-fill cell-background shape landed as a `feat(document-schema.js)!` breaking change), but the checked-in fixtures under `packages/documents.js/examples/*.package.json` still declare `"$schema": ".../document-schema.js@5.0.0/..."`, so `documentFromJson`'s own major-version guard rejects every one of them outright.

Reproduced on a clean, fresh worktree of origin/main (`21c9312d`) with zero other changes -- this is not specific to any in-flight branch or PR.

Per the workspace README, the examples suite only regenerates its fixtures when `GENERATE_EXAMPLES` is set, so nothing re-stamped them when the schema major bumped. The precedent commit `717efb2e fix(documents.js): restamp example goldens for document-schema.js@5.0.0` did exactly this restamp for the previous major bump and is the template for the fix here: regenerate `packages/documents.js/examples/*.package.json` (via `GENERATE_EXAMPLES=1`) against the installed 6.0.0 schema and commit the result.

Since `packages/documents.js` turbo-depends on `document-schema.js`, this failure surfaces on `_test` for `documents.js` on any branch built against current main, regardless of what that branch itself changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions