Add regression tests for zod 3/4 logger schema + GitHub Actions CI#19
Merged
Conversation
Six new tests covering the logger validation path that was broken by the z.function(...).args() call removed in zod 4: - valid logger with warn + error functions accepted - valid logger with optional debug function accepted - logger === false accepted (disables logging) - logger with non-function warn rejected - logger with missing error rejected - nested logger under defaultSettings in provider schema validated All 275 tests pass under both zod ^3.24 and zod ^4.1.
No CI exists on the repo today. Add a minimal GitHub Actions workflow that runs on push/PR to main and ai-sdk-v5, and exercises the full declared peer range (zod ^3.24, zod ^4.1) so regressions like ben-vargas#17 surface automatically rather than at consumer install time. Per-job steps: install, swap zod version, typecheck, lint (non-blocking), build, vitest, and a smoke test that imports the built CJS bundle.
2 tasks
bjcoombs
added a commit
to bjcoombs/ai-sdk-provider-opencode-sdk
that referenced
this pull request
Apr 14, 2026
@types/node@25.6.0 and undici-types@7.19.2 were already referenced via the dep graph but missing from package-lock.json, causing strict npm ci to fail on every run once CI landed (ben-vargas#19). 21-line targeted lockfile addition via `npm install --package-lock-only` to bring the lockfile into sync without churning unrelated entries. Keeps CI strict.
ben-vargas
pushed a commit
that referenced
this pull request
Apr 14, 2026
@types/node@25.6.0 and undici-types@7.19.2 were already referenced via the dep graph but missing from package-lock.json, causing strict npm ci to fail on every run once CI landed (#19). 21-line targeted lockfile addition via `npm install --package-lock-only` to bring the lockfile into sync without churning unrelated entries. Keeps CI strict.
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.
Summary
Follow-up to #18 (merged as v0.0.3). Two additions that didn't land in time:
Changes
`src/validation.test.ts` - 6 new tests
Exercise the `settings.logger` validation path (previously uncovered) to lock in zod 3/4 compatibility:
`.github/workflows/ci.yml`
Minimal CI workflow running on push/PR to `main` and `ai-sdk-v5`:
Testing
Risk
Test plan