Skip to content

docs: add @zenstackhq/schema to manual install command in README#2586

Merged
ymc9 merged 1 commit intodevfrom
docs/readme-add-schema-dep
Apr 17, 2026
Merged

docs: add @zenstackhq/schema to manual install command in README#2586
ymc9 merged 1 commit intodevfrom
docs/readme-add-schema-dep

Conversation

@ymc9
Copy link
Copy Markdown
Member

@ymc9 ymc9 commented Apr 17, 2026

Summary

  • The manual setup instructions were missing @zenstackhq/schema from the npm install command, which is a required peer dependency of @zenstackhq/orm.

Test plan

  • Visual check of the updated install command in the README

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated manual installation instructions to specify that an additional schema package must be installed alongside the ORM package for proper setup.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1172a2fa-742a-4e72-8703-131928b6d47f

📥 Commits

Reviewing files that changed from the base of the PR and between c858bbd and a07150c.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

Updated the manual installation instructions in README.md to include @zenstackhq/schema in the npm install command alongside the existing @zenstackhq/orm package, modifying the single command to install both dependencies.

Changes

Cohort / File(s) Summary
Documentation Update
README.md
Updated npm installation command to install @zenstackhq/schema alongside @zenstackhq/orm.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A schema hops into the install command line,
Where ORM and schema now beautifully align,
The docs dance with clarity, fresh and bright,
One little change makes everything right! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-add-schema-dep

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.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 17, 2026

Claude finished @ymc9's task —— View job


Pull Request Review

Reviewing the documentation update and regression test additions.

Review Checklist

  • Analyze README documentation changes
  • Review dependency requirements
  • Examine regression test implementation
  • Check for code quality and best practices
  • Provide security and performance feedback

Overall Assessment ✅

This PR correctly addresses a documentation gap by adding the missing @zenstackhq/schema dependency to the manual installation instructions. The change is accurate and necessary.

Code Quality Review

📋 Documentation Changes (README.md:77)

✅ Accurate Dependency Addition

  • The change from npm install @zenstackhq/orm to npm install @zenstackhq/schema @zenstackhq/orm is correct
  • @zenstackhq/schema is indeed a required dependency of @zenstackhq/orm (confirmed in packages/orm/package.json:106)
  • Manual installation instructions now match the dependencies that would be installed via automated tools

🧪 Regression Test Implementation (tests/regression/test/issue-2550/)

✅ Well-Structured Test Suite

  • Comprehensive type safety tests for JSON field compatibility between ORM and Zod
  • Tests cover multiple schema generation scenarios (optionality: 'defaults', optionality: 'all')
  • Proper use of expectTypeOf for compile-time type checking
  • Clear test naming and documentation of the issue being addressed

✅ Generated Schema Quality

  • Auto-generated schema.ts follows established patterns
  • Proper typing with readonly AttributeApplication[] and FieldDefault types
  • Correct JSON field configuration with default value

🔍 Code Pattern Analysis

✅ Follows Repository Conventions

  • Regression test naming follows pattern: issue-{number}.test.ts
  • Test structure matches existing patterns in the codebase
  • Proper imports from ZenStack packages

Security & Performance

🔒 Security Assessment

  • No security concerns identified
  • The changes are purely documentation and type-safety related
  • No exposure of sensitive data or security vulnerabilities introduced

⚡ Performance Considerations

  • No performance impact - documentation and type-only changes
  • Generated schema code is optimized and follows established patterns

Minor Observations

📝 Documentation Consistency

  • Installation section now correctly mirrors the dependency requirements
  • Manual installation path provides same packages as automated tools

🔧 Type Safety Enhancement

The regression tests validate an important fix where JsonArray was changed from ReadonlyArray<JsonValue | null> to Array<JsonValue | null> to ensure compatibility with Zod schemas. This change is properly tested and maintains type safety.

Recommendations

✅ Ready to Merge

No issues found. The changes are:

  • Accurate: Dependency addition is correct and necessary
  • Well-tested: Comprehensive regression tests cover the functionality
  • Safe: No security or performance concerns
  • Consistent: Follows repository patterns and conventions

The PR successfully addresses the documentation gap and includes appropriate test coverage for the related JSON type compatibility fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ymc9 ymc9 force-pushed the docs/readme-add-schema-dep branch from f1fc368 to a07150c Compare April 17, 2026 03:44
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 17, 2026

Claude finished @ymc9's task —— View job


Pull Request Review ✅

Reviewing the documentation update for adding @zenstackhq/schema dependency to manual installation instructions.

Review Checklist

  • Analyze the README documentation changes
  • Verify dependency requirements and accuracy
  • Check for code quality and best practices
  • Assess security and performance implications
  • Evaluate test coverage considerations

Overall Assessment ✅

This PR correctly addresses a documentation gap by adding the missing @zenstackhq/schema dependency to the manual installation instructions. The change is accurate and necessary.

Code Quality Review

📋 Documentation Changes (README.md:77)

✅ Accurate Dependency Addition

  • The change from npm install @zenstackhq/orm to npm install @zenstackhq/schema @zenstackhq/orm is correct
  • @zenstackhq/schema is indeed a required dependency of @zenstackhq/orm (confirmed in packages/orm/package.json:106)
  • Manual installation instructions now match the dependencies that would be installed via automated tools

🔍 Code Pattern Analysis

✅ Follows Repository Conventions

  • Installation section now correctly mirrors the dependency requirements
  • Manual installation path provides same packages as automated tools would install
  • Consistent with other package-specific README installation commands found in the monorepo

Security & Performance

🔒 Security Assessment

  • No security concerns identified
  • The change is purely documentation-related
  • No exposure of sensitive data or security vulnerabilities introduced

⚡ Performance Considerations

  • No performance impact - documentation-only change
  • Adding the explicit dependency ensures users don't encounter missing module errors at runtime

Test Coverage

🧪 Test Coverage Analysis

  • Documentation changes don't require additional test coverage
  • The dependency relationship is already validated by the package structure itself
  • Manual installation testing would be done during user onboarding, not automated tests

Minor Observations

📝 Documentation Consistency

  • Installation section now correctly mirrors the actual dependency requirements
  • Users following manual setup will no longer encounter missing @zenstackhq/schema errors
  • Change ensures consistency between manual and automated installation paths

Recommendations

✅ Ready to Merge

No issues found. The changes are:

  • Accurate: Dependency addition is correct and necessary
  • Safe: No security or performance concerns
  • Consistent: Follows repository patterns and conventions
  • Complete: Addresses the documentation gap fully

The PR successfully resolves a potential user experience issue where manual installation would result in missing dependencies.


@ymc9 ymc9 merged commit 2b88b52 into dev Apr 17, 2026
6 checks passed
@ymc9 ymc9 deleted the docs/readme-add-schema-dep branch April 17, 2026 03:44
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