Skip to content

Move __VERSION__ define into root base configs#62

Open
Pearce-Ropion wants to merge 1 commit into
mainfrom
claude/bold-thompson-FvgXu
Open

Move __VERSION__ define into root base configs#62
Pearce-Ropion wants to merge 1 commit into
mainfrom
claude/bold-thompson-FvgXu

Conversation

@Pearce-Ropion
Copy link
Copy Markdown
Collaborator

@Pearce-Ropion Pearce-Ropion commented May 22, 2026

Summary

  • The root package.json and all workspace packages currently share the same version, so the per-package __VERSION__ define was duplicating the root value.
  • Moved __VERSION__ into tsdown.base.ts (already there) and added it to vitest.base.ts, then simplified packages/plugin-sdk/{tsdown,vitest}.config.ts to just re-export the base config.

Test plan

  • yarn turbo build succeeds and the built bundle still embeds the correct version string at __VERSION__ (verified via packages/plugin-sdk/src/client/initialize.ts).
  • yarn turbo test passes — the vitest browser env now picks up __VERSION__ from the root base config.

Generated by Claude Code

The root package.json and all workspace packages share the same version,
so defining __VERSION__ once in tsdown.base.ts and vitest.base.ts removes
the per-package override boilerplate.
@Pearce-Ropion Pearce-Ropion requested a review from a team May 22, 2026 00:46
@Pearce-Ropion Pearce-Ropion marked this pull request as ready for review May 22, 2026 00:46
Copy link
Copy Markdown
Contributor

@rilescode rilescode left a comment

Choose a reason for hiding this comment

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

Would this be an issue if someone manually updates the version in plugin-sdk/package.json without using yarn bump? They could get out of sync

@peternandersson
Copy link
Copy Markdown
Contributor

I'd rather have this just in the plugin-sdk package since it's the only one that needs the value injected

@Pearce-Ropion
Copy link
Copy Markdown
Collaborator Author

I'd rather have this just in the plugin-sdk package since it's the only one that needs the value injected

This is prep work for splitting the package into multiple sub-packages. Should each one inject its own version thus requiring duplicated code for each package's tsdown config?

Would this be an issue if someone manually updates the version in plugin-sdk/package.json without using yarn bump? They could get out of sync

This would generally be a problem and that code should not be landed. The whole package should remain in sync.

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.

4 participants