Skip to content

Update sury to 11.0.0-alpha.5 and refactor API usage - #1

Closed
DZakh wants to merge 2 commits into
masterfrom
claude/update-sury-alpha5-IINPt
Closed

DZakh wants to merge 2 commits into
masterfrom
claude/update-sury-alpha5-IINPt

Conversation

@DZakh

@DZakh DZakh commented May 18, 2026

Copy link
Copy Markdown
Member

Description

Updates the sury library from 10.0.4 to 11.0.0-alpha.5 and refactors the benchmark cases to use the new API.

Changes Made

  • API Migration: Replaced S.compile() calls with the new S.parser() API

    • S.compile(schema, 'Any', 'Output', 'Sync') → S.parser(schema)
    • S.compile(schema, 'Any', 'Assert', 'Sync') → S.parser(schema, S.schema(true).with(S.noValidation, true))
  • Return Value Simplification: Updated assertion cases to return the parser result directly instead of returning true after calling the parser with a non-null assertion operator

  • Dependency Update: Bumped sury from 10.0.4 to 11.0.0-alpha.5 in package.json

Testing

The benchmark cases in cases/sury.ts are part of the schema validation benchmark suite. The changes maintain the same functional behavior:

  • parseSafe and parseStrict continue to parse and return validated data
  • assertLoose and assertStrict continue to validate data with assertion semantics

Existing benchmark infrastructure will validate that these cases execute correctly.

Checklist

  • Conducted a self-review of the code changes.
  • Updated benchmark cases to match new library API.
  • No additional documentation updates needed (benchmark code is self-documenting).

https://claude.ai/code/session_01D7Shn3weND2udXD9GHd6xe

claude added 2 commits May 18, 2026 07:58
Migrates the benchmark to the new API: `S.compile` was removed in favor
of `S.parser` for parse cases and `S.assert` for assert cases.
@DZakh DZakh closed this Jun 20, 2026
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.

2 participants