fix(plugins): Align discovery with withJunior package config#78
Merged
fix(plugins): Align discovery with withJunior package config#78
Conversation
Align plugin package tracing and runtime discovery around the same resolution\nstrategy so CWD shifts no longer cause plugin skills to disappear.\n\nAdd a withJunior pluginPackages option for explicit package-name resolution\nand remove env-based package propagation from runtime behavior.\n\nHarden app root discovery to avoid unrelated workspace app selection and\ncover shifted-CWD regressions with focused tests. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Make withJunior use a Junior-first contract by taking options as the first argument and Next config second. This removes ambiguous object-based inference and keeps plugin package selection explicit at the wrapper boundary. Also remove the wrapper-level sentry toggle and always wrap via @sentry/nextjs so enablement is controlled by standard Sentry env configuration. BREAKING CHANGE: withJunior now expects options first and Next config second. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Migrate the example app to the options-first withJunior call order so Next config is not accidentally treated as Junior options. Share filesystem stat helpers across discovery modules and rename local dedupe helpers to avoid semantic ambiguity between path-normalized and string-only variants. Gate @sentry/nextjs wrapping on DSN presence so consumers without Sentry config do not hard-fail while keeping Sentry enablement environment-driven. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Align user-facing docs with the breaking options-first withJunior signature and explicit plugin package registration. Remove stale sentry option references and document pluginPackages in quickstart, plugin overview, README, and API reference pages. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Update the example app to pass pluginPackages explicitly so npm plugin discovery matches the documented options-first contract. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Differentiate unresolved plugin packages from installed packages that do not contain Junior plugin content, and surface an explicit validation error for the latter case. Add coverage for installed-but-invalid plugin packages in next-config tests. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make
withJuniorexplicit and deterministic for plugin discovery in Next.js deployments.This changes the wrapper contract to an options-first API and makes plugin package resolution explicit:
withJunior(options, nextConfig)is now the canonical and required order (breaking change)pluginPackagesis authoritative for plugin package discovery and tracingpluginPackagesnow fail fast during config evaluationI removed implicit/ambient discovery paths that depended on runtime process context, since those made plugin loading differ between build and runtime in production environments.
I also removed the wrapper-level
sentryboolean. Sentry integration now follows normal@sentry/nextjsenv/DSN configuration instead of a separate wrapper flag.