Skip to content

Conversation

@cherkanovart
Copy link
Contributor

@cherkanovart cherkanovart commented Feb 2, 2026

Summary

Fixes runtime errors from multiple Zod instances by marking zod as external in the CLI, spec, and compiler builds so a single Zod instance is used.

Changes

  • packages/cli/tsup.config.ts — add "zod" to external so the CLI does not bundle Zod.
  • packages/spec/tsup.config.ts — keep external: ["zod"] so the spec does not bundle Zod.
  • packages/compiler/tsup.config.ts — keep external: ["zod"] so the compiler does not bundle Zod.
  • Patch/minor bumps for lingo.dev, @lingo.dev/_spec, @lingo.dev/_compiler, and @lingo.dev/_sdk via changesets.

Testing

Business logic tests added:

  • No new tests (build/config only). Existing tests should still pass.
  • Manual check: install from packed tgz with overrides and run lingo.dev run --bucket json; no reading 'run' or _parseSync is not a function.
  • All tests pass locally

Visuals

Required for UI/UX changes:

  • N/A — build/config only, no UI changes.

Checklist

  • Changeset added (if version bump needed)
  • Tests cover business logic (not just happy path) — N/A for this build fix
  • No breaking changes (or documented below)

Closes #--

Summary by CodeRabbit

  • Chores
    • Updated build configuration and dependency ordering across packages for consistency.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

Adds a changeset file announcing a patch release for lingo.dev and related packages and reorders existing zod entries inside several tsup.config.ts files; no functional code changes or exported API changes.

Changes

Cohort / File(s) Summary
Changeset Announcement
\.changeset/empty-release.md
New changeset added documenting a patch release across lingo.dev and @lingo.dev/* packages and noting zod as an external dependency.
Tsup config edits
packages/cli/tsup.config.ts, packages/compiler/tsup.config.ts, packages/sdk/tsup.config.ts, packages/spec/tsup.config.ts
Reordered/moved the existing external: ["zod"] entries within the object literals; no additions/removals or behavior changes, only positional adjustments in the config files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • fix: zod external #1949: Adds zod to external arrays in multiple tsup.config.ts files (closely related to these reordering edits).

Suggested reviewers

  • vrcprl
  • AndreyHirsa

Poem

🐇 A tiny changeset takes a hop,
Zod shuffled in—no code to stop.
Configs tidy, patch in view,
A quiet bump, a careful cue.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions adding zod as external but contains a typo ('depth' instead of 'dependency') and is unclear whether it refers to the actual implementation achieved. Clarify the title to accurately describe the change; consider 'fix: mark zod as external to prevent multiple instances' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description comprehensively covers the summary, changes across all affected files, testing approach, and includes a completed checklist with changesets and no breaking changes noted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/zod-external

Comment @coderabbitai help to get the list of available commands and usage tips.

@cherkanovart cherkanovart changed the title Fix/zod external fix: zod external Feb 2, 2026
@cherkanovart cherkanovart changed the title fix: zod external fix: zod error Feb 2, 2026
@cherkanovart cherkanovart changed the title fix: zod error fix: add zod as an external depth Feb 2, 2026
@cherkanovart cherkanovart merged commit 330ee4e into main Feb 3, 2026
11 of 17 checks passed
@cherkanovart cherkanovart deleted the fix/zod-external branch February 3, 2026 09:49
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