Skip to content

[Blueprints] Type Blueprint v2 WXR author maps - #3863

Merged
adamziel merged 1 commit into
trunkfrom
fix/blueprint-v2-author-map-types
Jul 2, 2026
Merged

[Blueprints] Type Blueprint v2 WXR author maps#3863
adamziel merged 1 commit into
trunkfrom
fix/blueprint-v2-author-map-types

Conversation

@adamziel

@adamziel adamziel commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What?

Fixes the Blueprint v2 WXR author-map declaration types.

RemoteUsername and LocalUsername were typed as the literal value 'string', which made authorsMap only accept that exact value. This changes both aliases to string so real usernames can be mapped.

Why?

Blueprint v2 WXR imports can map remote authors to local users. TypeScript consumers should be able to write real mappings such as:

authorsMap: {
  alice: 'admin',
  'bob@example.com': 'editor',
}

This is type-only. It does not change runtime behavior.

Testing

  • npm exec nx run playground-blueprints:typecheck
  • npm exec nx run playground-blueprints:lint
  • npm exec nx run playground-blueprints:test:vite -- --testFiles=packages/playground/blueprints/src/tests/v2/blueprint-v2-declaration.spec.ts
  • git diff --check

Part of #2592.

@adamziel
adamziel marked this pull request as ready for review July 2, 2026 10:25
@adamziel
adamziel requested review from a team, brandonpayton and Copilot July 2, 2026 10:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates Blueprint v2 WXR author-map TypeScript declarations to allow real (non-literal) username mappings, and adds a type-level test to prevent regressions.

Changes:

  • Fix RemoteUsername / LocalUsername type aliases from the literal 'string' to string.
  • Add a declaration/typecheck test covering arbitrary authorsMap keys/values for WXR imports.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/playground/blueprints/src/lib/v2/wep-1-blueprint-v2-schema/appendix-A-blueprint-v2-schema.ts Corrects WXR author-map username aliases to be real strings.
packages/playground/blueprints/src/tests/v2/blueprint-v2-declaration.spec.ts Adds a type regression test ensuring authorsMap accepts arbitrary usernames.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adamziel
adamziel merged commit 1062716 into trunk Jul 2, 2026
152 of 155 checks passed
@adamziel
adamziel deleted the fix/blueprint-v2-author-map-types branch July 2, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment