Skip to content

chore: use named imports#141

Merged
vitonsky merged 2 commits into
masterfrom
140-use-named-imports-for-zod
May 29, 2026
Merged

chore: use named imports#141
vitonsky merged 2 commits into
masterfrom
140-use-named-imports-for-zod

Conversation

@vitonsky

@vitonsky vitonsky commented May 29, 2026

Copy link
Copy Markdown
Member

Fix #140

Summary by CodeRabbit

  • Refactor
    • Standardized internal validation imports across multiple translator modules to improve consistency. No changes to user-facing behavior or translation results.
  • Chores
    • Project version updated to 3.4.1.

Review Change Stack

@vitonsky vitonsky linked an issue May 29, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b99e26b-35fa-44c2-bb37-e87034bd1637

📥 Commits

Reviewing files that changed from the base of the PR and between 6beacf1 and e8f1e2b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • package.json

📝 Walkthrough

Walkthrough

This PR standardizes Zod imports across six translator modules by replacing default imports with import { z } from 'zod', and increments the package version in package.json from 3.4.0 to 3.4.1. No runtime logic or exported APIs were changed.

Changes

Zod Import Standardization

Layer / File(s) Summary
Update Zod imports across translator modules
src/translators/DeepLTranslator/index.ts, src/translators/TartuNLPTranslator/index.ts, src/translators/unstable/LibreTranslateTranslator/index.ts, src/translators/unstable/LingvaTranslate/index.ts, src/translators/unstable/ReversoTranslator.ts, src/translators/unstable/YandexTranslator/index.ts
Replaced default zod imports with named import { z } from 'zod' in each translator. All existing schema parsing and translator behavior preserved.
Bump package version
package.json
Updated package version from 3.4.0 to 3.4.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • translate-tools/core#139: Modifies YandexTranslator and related exports/tests; relates to import and wiring changes in translator modules.

Poem

🐰 I hopped through files with nimble paws,
Swapped imports with barely a cause,
Six translators now sing as one,
Version bumped, the job is done.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The version bump in package.json from 3.4.0 to 3.4.1 is a minor out-of-scope change not mentioned in issue #140, which only specified import syntax updates. Consider reverting the version bump or clarifying if it was intentional as part of this maintenance release; version updates typically warrant separate commits or explicit issue coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: use named imports' accurately and concisely describes the main change: converting default Zod imports to named imports across multiple translator files.
Linked Issues check ✅ Passed The pull request successfully addresses issue #140 by converting all default Zod imports to named imports across six translator files and updating the package version.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 140-use-named-imports-for-zod

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@vitonsky vitonsky merged commit 3fcfd2a into master May 29, 2026
6 checks passed
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.

Use named imports for zod

1 participant