Skip to content

fix(deps): update dependency @politty/zod to v0.6.3 - #2822

Merged
toiroakr merged 2 commits into
mainfrom
renovate/politty-zod-0.x
Oct 27, 2026
Merged

toiroakr merged 2 commits into
mainfrom
renovate/politty-zod-0.x

Conversation

@renovate

@renovate renovate Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@politty/zod (source) 0.6.1 → 0.6.3 age confidence

Release Notes

toiroakr/politty (@​politty/zod)

v0.6.3

Compare Source

Patch Changes
  • 75c31ef: Pass the validated global option values to the global cleanup hook as globalArgs when a run fails before the global effects have run (an unknown flag, an invalid value, a failed local validation). A cleanup that renders the error can now honor a global option such as --json without re-reading process.argv. Unknown flags are left out, a value that fails its own validation is dropped so the schema's default applies, a value filled in by the prompt resolver is kept, and $source reports where each value came from; globalArgs is undefined when a required global value is missing or when setup fails.

Configuration

📅 Schedule: (in timezone Asia/Tokyo)

  • Branch creation
    • Between 09:00 AM and 06:59 PM, Monday through Friday (* 9-18 * * 1-5)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner October 27, 2026 02:05
@changeset-bot

changeset-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b433a27

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

This PR includes changesets to release 6 packages
Name Type
@tailor-platform/sdk Patch
@tailor-platform/sdk-codemod Patch
@tailor-platform/sdk-plugin-seed Patch
@tailor-platform/sdk-plugin-setup Patch
@tailor-platform/sdk-plugin-tailordb-erd Patch
@tailor-platform/create-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tailor-platform-pr-trigger
tailor-platform-pr-trigger Bot requested a review from a team as a code owner October 27, 2026 02:05
@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@tailor-platform/create-sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/create-sdk@b433a27

@tailor-platform/eslint-plugin-sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/eslint-plugin-sdk@b433a27

@tailor-platform/sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk@b433a27

@tailor-platform/sdk-plugin-frontend

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-frontend@b433a27

@tailor-platform/sdk-plugin-seed

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-seed@b433a27

@tailor-platform/sdk-plugin-setup

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-setup@b433a27

@tailor-platform/sdk-plugin-tailordb-erd

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-tailordb-erd@b433a27

commit: b433a27

@github-actions

Copy link
Copy Markdown

🗺️ ERD preview

Self-contained ERD viewer HTML built for this run. Each viewer can switch between the current schema and a diff against base branch main.

@github-actions

Copy link
Copy Markdown

🤖 Claude Dependency Review

✅ Recommended Actions

None — safe to merge as-is. This is a patch update with bug fixes and enhancements to the CLI framework, with no breaking changes.

📦 Update Summary

  • Library: @​politty/zod
  • Version: 0.6.1 → 0.6.3
  • Change Type: Patch
📝 Release Notes

https://github.com/toiroakr/politty/blob/main/packages/zod/CHANGELOG.md

Version 0.6.3 (Patch)

  • Pass validated global option values to the global cleanup hook as globalArgs when a run fails before global effects run (unknown flag, invalid value, failed local validation)
  • A cleanup that renders the error can now honor a global option such as --json without re-reading process.argv
  • Unknown flags are left out, a value that fails its own validation is dropped so the schema's default applies
  • A value filled in by the prompt resolver is kept, and $source reports where each value came from
  • globalArgs is undefined when a required global value is missing or when setup fails

Version 0.6.2 (Patch)

  • Added unflatten, which groups related options into a nested object
  • Options are declared with dotted keys (e.g., config.serverPort) or with prefixed kebab-case or camelCase keys, and the object schema is wrapped with unflatten
  • Each key keeps its own arg() metadata, and only the validated value passed to run is nested
  • effect and requiredPackages now read a field at its nested path
  • Groups in globalArgs and in command args merge key by key
  • @​politty/loculus re-exports unflatten and now requires loculus ^0.4.0

Version 0.6.1 (Already installed)

  • Short options that take a value now read it when attached (-c5) or combined with other short options (-ac5, -ac 5)
  • Combined short options made only of global options (-vq, -n5) are now read as global options before and after a subcommand
  • A negative number following a global option (-n -5, --name -5, -vn -5) is now read as that option's value
🔐 Security Assessment
  • Risk: 🟢 Low
  • Known vulnerabilities: None found for @​politty/zod in the GitHub Advisory Database, OSV.dev, or npm advisories
  • Supply-chain notes: No maintainer changes, suspicious scripts, or unexpected dependencies detected. The package is published by the same maintainer (toiroakr) from the established repository. No red flags in lifecycle scripts or dependency additions.
🚨 Breaking Changes

None. All three versions (0.6.1, 0.6.2, and 0.6.3) are patch releases with backward-compatible changes.

✨ Main Changes

Bug Fixes:

  • Improved error handling (0.6.3): The global cleanup hook now receives validated global option values as globalArgs even when a run fails early. This allows cleanup handlers to honor options like --json without re-parsing process.argv.
  • Better short option parsing (0.6.1): Fixed handling of attached values (-c5), combined options (-ac5), and negative numbers as option values.

New Features:

  • Option grouping (0.6.2): New unflatten utility for grouping related options into nested objects using dotted keys (e.g., config.serverPort).

Enhancements:

  • Better argument source tracking with $source metadata
  • Improved handling of global options in subcommands
  • Enhanced field reading at nested paths in effect and requiredPackages
🔍 Impact Analysis

📁 Usage Locations

@​politty/zod is the core CLI framework used extensively throughout this monorepo. It is used in 193 files across 6 packages:

Primary Usage Patterns:

  1. Core CLI Infrastructure (packages/sdk/src/cli/)

    • packages/sdk/src/cli/main.ts

      import { defineCommand, runMain, type AnyCommand } from "@​politty/zod";
      import { withCompletionCommand } from "@​politty/zod/completion";
      import { withSkillCommand } from "@​politty/zod/skill";
      • Features used: defineCommand, runMain, withCompletionCommand, withSkillCommand
      • Impact: Main CLI entry point - the update improves error handling and option parsing for all CLI commands
    • packages/sdk/src/cli/lib.ts

      export { arg, defineCommand, runCommand, runMain } from "@​politty/zod";
      • Features used: Re-exports core politty APIs for programmatic usage
      • Impact: All SDK users importing the CLI API benefit from the improvements
    • packages/sdk/src/cli/shared/command.ts

      import { createDefineCommand } from "@​politty/zod";
      • Features used: createDefineCommand for type-safe command definitions
      • Impact: The global args cleanup improvements (0.6.3) enhance error handling across all commands
    • packages/sdk/src/cli/shared/args.ts

      import { arg, parseArgv, type ArgSource } from "@​politty/zod";
      • Features used: arg for argument definitions, parseArgv for parsing, ArgSource type
      • Impact: Better short option parsing (0.6.1) and the new $source tracking (0.6.3)
  2. All CLI Commands (packages/sdk/src/cli/commands/**/*.ts)

    • Every command file uses one or more of:
      • arg() - for defining command-line arguments (used in 100+ files)
      • defineCommand() - for defining CLI commands (used in 50+ files)
      • runCommand() - for executing commands in tests (used in 40+ test files)
    • Impact: All commands benefit from improved argument parsing and error handling
  3. SDK Codemod CLI (packages/sdk-codemod/src/index.ts)

    import { arg, defineCommand, runMain } from "@​politty/zod";
    • Features used: Full CLI framework for the codemod tool
    • Impact: Enhanced error handling when codemods fail with invalid options
  4. Create SDK CLI (packages/create-sdk/src/index.ts)

    import { arg, defineCommand, runMain } from "@​politty/zod";
    • Features used: Project creation CLI
    • Impact: Better option parsing for project initialization
  5. CLI Plugins (all plugin packages)

    import { enableCompileCache } from "@​politty/zod/compile-cache";
    • Features used: Compile cache optimization for faster CLI startup
    • Impact: No direct impact from these changes (compile-cache is orthogonal)

Type Imports:
Multiple files import types from @​politty/zod:

  • AnyCommand, ExtractedFields, SubCommandValue (in packages/sdk/src/cli/options.test.ts)
  • ArgSource (in packages/sdk/src/cli/shared/args.ts)
  • RunResult (in test files)

Impact Summary:
The update is entirely beneficial:

  • 0.6.3: Fixes cleanup hook behavior when errors occur early, enabling better --json mode error handling
  • 0.6.2: Adds new unflatten utility (not yet used in this codebase, but available for future use)
  • 0.6.1: Already in use - improvements to short option parsing

No code changes required in this repository. All changes are backward-compatible enhancements to the CLI framework.


@github-actions

Copy link
Copy Markdown

Code Metrics Report (packages/sdk)

main (93b7d82) #2822 (0731b99) +/-
Coverage 88.6% 88.6% -0.1%
Code to Test Ratio 1:0.5 1:0.5 0.0
Details
  |                    | main (93b7d82) | #2822 (0731b99) |  +/-  |
  |--------------------|----------------|-----------------|-------|
- | Coverage           |          88.6% |           88.6% | -0.1% |
  |   Files            |            575 |             575 |     0 |
  |   Lines            |          25479 |           25479 |     0 |
- |   Covered          |          22585 |           22583 |    -2 |
  | Code to Test Ratio |          1:0.5 |           1:0.5 |   0.0 |
  |   Code             |         207076 |          207076 |     0 |
  |   Test             |         116632 |          116632 |     0 |

Code coverage of files in pull request scope (75.0% → 72.8%)

Files Coverage +/- Status
packages/sdk/src/cli/commands/workflow/waiter.ts 72.8% -2.2% affected

SDK Configure Bundle Size

main (93b7d82) #2822 (0731b99) +/-
configure-index-size 13.82KB 13.82KB 0KB
dependency-chunks-size 25.76KB 25.76KB 0KB
total-bundle-size 39.58KB 39.58KB 0KB

Runtime Performance

main (93b7d82) #2822 (0731b99) +/-
Generate Median 1,517ms 1,925ms +408ms
Generate Max 1,563ms 2,712ms +1,149ms
Apply Build Median 1,647ms 2,097ms +450ms
Apply Build Max 2,293ms 2,182ms -111ms

Type Performance (instantiations)

main (93b7d82) #2822 (0731b99) +/-
tailordb-baseline 947 947 0
resolver-baseline 4,641 4,641 0
executor-baseline 848 848 0
tailordb-basic 2,343 2,343 0
tailordb-optional 1,149 1,149 0
tailordb-relation 3,794 3,794 0
tailordb-validate 186 186 0
tailordb-hooks 981 981 0
tailordb-object 1,890 1,890 0
tailordb-enum 568 568 0
resolver-basic 1,022 1,022 0
resolver-nested 3,405 3,405 0
resolver-array 1,954 1,954 0
executor-schedule 1,388 1,388 0
executor-webhook 47 47 0
executor-record-created 3,219 3,219 0
executor-record-updated 3,219 3,219 0
executor-record-deleted 3,219 3,219 0
executor-resolver 463 463 0
executor-operation-function 30 30 0
executor-operation-gql 43 43 0
executor-operation-webhook 50 50 0
executor-operation-workflow 211 211 0

Reported by octocov

@toiroakr
toiroakr merged commit 9616a95 into main Oct 27, 2026
62 checks passed
@toiroakr
toiroakr deleted the renovate/politty-zod-0.x branch October 27, 2026 09:03
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.

1 participant