Skip to content

Version Packages - #858

Merged
borisno2 merged 1 commit into
mainfrom
changeset-release/main
Aug 2, 2026
Merged

Version Packages#858
borisno2 merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@opensaas/stack-cli@0.36.0

Minor Changes

  • #857 cdca174 Thanks @borisno2! - Add needs to the base field config: a computed field can declare the immediate relations its resolveOutput hook depends on, so the read fetches exactly those — without widening what the caller receives (ADR-0025).

    Since ADR-0024, a bare read (no caller include) returns a row's own columns only, so a virtual field reading item.someRelation silently computed over undefined unless a caller happened to include it. needs fixes that:

    Order: list({
      fields: {
        lineItems: relationship({ ref: 'LineItem.order', many: true }),
        total: virtual({
          type: 'number',
          needs: ['lineItems'],
          hooks: {
            resolveOutput: ({ item }) =>
              item.lineItems.reduce((sum, li) => sum + li.price * li.quantity, 0),
          },
        }),
      },
    })

    The declared relation is fetched wherever the field is computed — at the root of a read and at every nested level — and is scoped through the Access Filter exactly like a caller-named relation: a dependency the session can't query is not fetched, and the hook sees nothing in its place. A field always computes on whatever it can see, so a partially-denied dependency still produces a value rather than being withheld. The relation itself is stripped from the result unless the caller named it too, for both include reads and fragment query reads.

    needs is available on every field type, not only virtual(). opensaas generate now also validates every needs declaration: an entry naming a non-relationship or non-existent field, or a declaration closure that can't fit within the read-include depth cap from any starting point, fails generation with a message naming the offending field/chain rather than silently truncating at runtime.

    See docs/adr/0025-a-computed-field-declares-the-relations-it-needs.md.

Patch Changes

  • #859 ebb4cd3 Thanks @borisno2! - Fix isIndexed: true on text, decimal and calendarDay emitting an invalid inline @index attribute, producing a schema Prisma rejects with "Attribute not known: @index".
    Non-unique indexes are now emitted as block-level @@index([field]); isIndexed: 'unique' is unchanged.
  • Updated dependencies [cdca174, ebb4cd3]:
    • @opensaas/stack-core@0.36.0

@opensaas/stack-core@0.36.0

Minor Changes

  • #857 cdca174 Thanks @borisno2! - Add needs to the base field config: a computed field can declare the immediate relations its resolveOutput hook depends on, so the read fetches exactly those — without widening what the caller receives (ADR-0025).

    Since ADR-0024, a bare read (no caller include) returns a row's own columns only, so a virtual field reading item.someRelation silently computed over undefined unless a caller happened to include it. needs fixes that:

    Order: list({
      fields: {
        lineItems: relationship({ ref: 'LineItem.order', many: true }),
        total: virtual({
          type: 'number',
          needs: ['lineItems'],
          hooks: {
            resolveOutput: ({ item }) =>
              item.lineItems.reduce((sum, li) => sum + li.price * li.quantity, 0),
          },
        }),
      },
    })

    The declared relation is fetched wherever the field is computed — at the root of a read and at every nested level — and is scoped through the Access Filter exactly like a caller-named relation: a dependency the session can't query is not fetched, and the hook sees nothing in its place. A field always computes on whatever it can see, so a partially-denied dependency still produces a value rather than being withheld. The relation itself is stripped from the result unless the caller named it too, for both include reads and fragment query reads.

    needs is available on every field type, not only virtual(). opensaas generate now also validates every needs declaration: an entry naming a non-relationship or non-existent field, or a declaration closure that can't fit within the read-include depth cap from any starting point, fails generation with a message naming the offending field/chain rather than silently truncating at runtime.

    See docs/adr/0025-a-computed-field-declares-the-relations-it-needs.md.

Patch Changes

  • #859 ebb4cd3 Thanks @borisno2! - Fix isIndexed: true on text, decimal and calendarDay emitting an invalid inline @index attribute, producing a schema Prisma rejects with "Attribute not known: @index".
    Non-unique indexes are now emitted as block-level @@index([field]); isIndexed: 'unique' is unchanged.

@opensaas/stack-auth@0.36.0

@opensaas/stack-rag@0.36.0

@opensaas/stack-storage@0.36.0

@opensaas/stack-storage-s3@0.36.0

@opensaas/stack-storage-vercel@0.36.0

@opensaas/stack-tiptap@0.36.0

@opensaas/stack-ui@0.36.0

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-docs Ready Ready Preview Aug 2, 2026 3:25am

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 85a19a3 to 099889f Compare August 2, 2026 03:25
@borisno2
borisno2 enabled auto-merge (squash) August 2, 2026 03:30
@borisno2
borisno2 merged commit 8409b42 into main Aug 2, 2026
6 checks passed
@borisno2
borisno2 deleted the changeset-release/main branch August 2, 2026 03:37
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for Core Package Coverage (./packages/core)

Status Category Percentage Covered / Total
🟢 Lines 93.44% (🎯 65%) 1268 / 1357
🟢 Statements 91.91% (🎯 65%) 1365 / 1485
🟢 Functions 98.12% (🎯 62%) 209 / 213
🟢 Branches 83.37% (🎯 50%) 918 / 1101
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for UI Package Coverage (./packages/ui)

Status Category Percentage Covered / Total
🔵 Lines 76.72% 244 / 318
🔵 Statements 76.29% 251 / 329
🔵 Functions 69.15% 74 / 107
🔵 Branches 64.25% 160 / 249
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for CLI Package Coverage (./packages/cli)

Status Category Percentage Covered / Total
🔵 Lines 78.84% 1509 / 1914
🔵 Statements 78.53% 1570 / 1999
🔵 Functions 85.65% 209 / 244
🔵 Branches 67.03% 663 / 989
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for Auth Package Coverage (./packages/auth)

Status Category Percentage Covered / Total
🔵 Lines 97.45% 115 / 118
🔵 Statements 97.52% 118 / 121
🔵 Functions 100% 38 / 38
🔵 Branches 92.85% 78 / 84
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for Storage Package Coverage (./packages/storage)

Status Category Percentage Covered / Total
🔵 Lines 78.57% 220 / 280
🔵 Statements 80.06% 245 / 306
🔵 Functions 86.07% 68 / 79
🔵 Branches 75.88% 214 / 282
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for RAG Package Coverage (./packages/rag)

Status Category Percentage Covered / Total
🔵 Lines 47.97% 355 / 740
🔵 Statements 48.14% 377 / 783
🔵 Functions 54.26% 70 / 129
🔵 Branches 42.55% 180 / 423
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)

Status Category Percentage Covered / Total
🔵 Lines 100% 40 / 40
🔵 Statements 100% 40 / 40
🔵 Functions 100% 9 / 9
🔵 Branches 100% 19 / 19
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)

Status Category Percentage Covered / Total
🔵 Lines 100% 68 / 68
🔵 Statements 100% 71 / 71
🔵 Functions 100% 15 / 15
🔵 Branches 97.87% 46 / 47
File CoverageNo changed files found.
Generated in workflow #1572 for commit 099889f by the Vitest Coverage Report Action

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