Skip to content

feat: Implement StandardSchemaV1 spec - #777

Merged
noam-honig merged 16 commits into
mainfrom
standard-schema
Jul 30, 2025
Merged

noam-honig merged 16 commits into
mainfrom
standard-schema

Conversation

@jycouet

@jycouet jycouet commented Jul 29, 2025 •

Copy link
Copy Markdown
Collaborator

Proposal

// Usual entity stuff
@Entity('User')
class User {
  @Fields.id()
  id!: string
  @Fields.string({ required: true })
  name!: string
  @Fields.number()
  age?: number
}

// Schema Part 🎉 new stuff 🎉
import { std } from 'remult'

const schema1 = standardSchema(repo(User))
//     ^ this is a standard-schema for all User

const schema2 = standardSchema(repo(User), 'name', 'age')
//     ^ this is a standard-schema looking for name and age (name & age are typed!)

Open questions

  • std(User, 'name', 'age') vs std(User, ['name', 'age']) update in the code example
  • std vs Schema.standardSchemaV1 vs INSERT_A_COOL_NAME_HERE update in the code example

Checklist

  • export in public api
  • CHANGELOG.md updated

@codecov

codecov Bot commented Jul 29, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.78%. Comparing base (fa4a6de) to head (1f4a672).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #777      +/-   ##
==========================================
+ Coverage   86.73%   86.78%   +0.05%     
==========================================
  Files         103      105       +2     
  Lines       16459    16502      +43     
  Branches     3853     3868      +15     
==========================================
+ Hits        14275    14322      +47     
+ Misses       2184     2180       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@noam-honig
noam-honig merged commit 2436a30 into main Jul 30, 2025
@jycouet
jycouet deleted the standard-schema branch September 7, 2026 11:42
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