Skip to content

fix: include plugin loading errors in DataSource.errors getter - #713

Merged
theoephraim merged 8 commits into
mainfrom
fix/plugin-loading-error-in-errors-getter
May 22, 2026
Merged

theoephraim merged 8 commits into
mainfrom
fix/plugin-loading-error-in-errors-getter

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Summary

  • The unified error handling refactor (refactor: unified error handling with severity levels #708) moved error storage to _errors arrays but the DataSource.errors getter didn't include plugin loading errors (stored on Plugin objects, not in _errors)
  • This caused checkForSchemaErrors to miss plugin load failures, so legacy plugins showed a generic "Configuration is currently invalid" validation error instead of the helpful migration message
  • Fix: include loadingError (which already checks plugins) in the errors getter when not already present

Fixes the smoke test failure in #712.

Test plan

  • Smoke test binary-plugin.test.ts > legacy plugin using implicit global shows migration error passes locally
  • CI smoke tests pass with smoke-tests label

The unified error handling refactor (#708) moved error storage to
_errors arrays but the DataSource.errors getter didn't include plugin
loading errors (stored on Plugin objects, not in _errors). This caused
checkForSchemaErrors to miss plugin load failures, so legacy plugins
showed a generic validation error instead of the migration message.
@github-actions

github-actions Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/nextjs-integration 1.1.0 → 1.1.1
  • varlock 1.2.0 → 1.2.1

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

Test fixtures inherit the repo root's bunfig.toml which sets
minimumReleaseAge=86400. This blocks installs of recently published
packages (e.g. vite@8.0.14), causing bun to hang and the CI job to
fail on timeout. Write a local bunfig.toml in each fixture to zero
out the age gate while keeping the security scanner active.
@pkg-pr-new

pkg-pr-new Bot commented May 22, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@env-spec/parser@713
npm i https://pkg.pr.new/varlock@713
npm i https://pkg.pr.new/@varlock/nextjs-integration@713

commit: 837b57a

…ping

On Windows with shell=true, the double quotes inside the node -e argument
get consumed by cmd.exe, causing a syntax error. Single quotes work in
both JS and cmd.exe.
When loadEnvConfig fails in dev mode (e.g., invalid schema), return
combinedEnv with initialEnv instead of empty object. Next.js v15's
turbopack exits cleanly when combinedEnv is empty (missing NODE_ENV
etc.), preventing the dev server from staying alive for hot-reload.
…ss both change

Previously, harness file changes triggered an early exit that ran all
integrations in quick mode, even when an integration's own package also
changed. This caused the nextjs v15 dev server test to be skipped in
PR #708 where both the harness and @varlock/nextjs-integration changed.
Vitest sets NODE_ENV=test which gets inherited by spawned dev servers.
Next.js v15's turbopack exits cleanly (code 0) when NODE_ENV=test
combined with invalid config. Override to development since dev server
tests should run in development mode regardless of the test runner.
@theoephraim
theoephraim merged commit 29f24cc into main May 22, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant