Skip to content

feat(bundler-plugins): Add braintrust{Bundler}Plugin aliases for bundler plugins and deprecate rest#2032

Merged
Luca Forstner (lforst) merged 9 commits into
mainfrom
lforst/bundler-plugin-aliases
May 20, 2026
Merged

feat(bundler-plugins): Add braintrust{Bundler}Plugin aliases for bundler plugins and deprecate rest#2032
Luca Forstner (lforst) merged 9 commits into
mainfrom
lforst/bundler-plugin-aliases

Conversation

@lforst
Copy link
Copy Markdown
Member

@lforst Luca Forstner (lforst) commented May 20, 2026

Reason: In the context of a vite config, it makes no sense to have a vite plugin named vitePlugin. There is an argument to be made around calling it braintrustPlugin, however I imagine agents have a better time understanding and importing stuff when the different plugins are actually named differently.

Also the default value of the browser option is insane since we don't even have a working browser sdk.

@@ -1,6 +1,5 @@
{
"name": "@braintrust/vitest-wrapper-tests",
"version": "0.0.1",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Snuck these changes in because these packages were polluting pnpm run changeset output and the only way to prevent that is by not giving the packages version numbers.

Also it's one extra safeguard to not accidentally publish these packages I guess.

/** ISO-8601 timestamp when the cassette was first created. */
createdAt: string;
/** The seinfeld version that produced the cassette. */
seinfeldVersion: string;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we also gotta update dev-packages/seinfeld/src/format/v1.ts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, the rabbit hole went even deeper cad5d4a

Comment thread .changeset/tangy-waves-find.md Outdated
"braintrust": minor
---

feat(bundler-plugins): Add `braintrust{Bundler}Plugin` aliases for bundler plugins and deprecate rest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd be more explicit here and list all the exports that were renamed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment on lines +22 to +24
* defaults to browser-compatible diagnostics channel shimming when `browser`
* is omitted; `braintrustEsbuildPlugin` defaults to Node.js diagnostics_channel
* unless `useDiagnosticChannelCompatShim` is set to `true`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

feel like this stuff doesn't really matter to the user. I'd just remove the diagnostics channel note all together. Or word it to be more clear about user impact

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, agree. Will remove.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

*
* @default false
*/
useDiagnosticChannelCompatShim?: boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should this be a top level option? Or can we prefix with internal or similar to make it more clear that most users shouldn't really mess with this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is not an internal option, also I don't fully like steering users away from an option. Technically very valid to use if they are on cloudflare or whatever.

@lforst Luca Forstner (lforst) merged commit 8fc118c into main May 20, 2026
46 checks passed
@lforst Luca Forstner (lforst) deleted the lforst/bundler-plugin-aliases branch May 20, 2026 16:40
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.

2 participants