Skip to content

Version Packages#495

Merged
coderdan merged 1 commit into
mainfrom
changeset-release/main
Jun 2, 2026
Merged

Version Packages#495
coderdan merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 26, 2026

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

@cipherstash/stack@0.18.0

Minor Changes

  • 6e7ae4e: Export the operation classes returned by the encryption and DynamoDB clients as public API.

    The classes returned from public methods are now exported and documented in the API reference, so their types can be named and their TSDoc links resolve.

    • From @cipherstash/stack/encryption: EncryptOperation, EncryptQueryOperation, BatchEncryptQueryOperation, DecryptOperation, EncryptModelOperation, DecryptModelOperation, BulkEncryptOperation, BulkDecryptOperation, BulkEncryptModelsOperation, BulkDecryptModelsOperation. EncryptQueryOperation and BatchEncryptQueryOperation were previously marked @internal; since they are returned from EncryptionClient.encryptQuery, they are now public for consistency with the other operations.
    • From @cipherstash/stack/dynamodb: EncryptModelOperation, DecryptModelOperation, BulkEncryptModelsOperation, BulkDecryptModelsOperation.
    • From @cipherstash/stack/types: EncryptedQuery and EncryptedFromSchema.

    The *WithLockContext variants returned by .withLockContext() remain internal — they share the same awaitable shape and are not intended to be named directly.

    No runtime behaviour changes; this only widens the exported surface and corrects TSDoc cross-references that previously failed to resolve.

  • 712d7fa: Fix: restore runtime null short-circuits in the encryption operation classes.

    A prior refactor (feat(stack): remove null from Encrypted type) tightened the type signatures to disallow null and, alongside that, deleted the if (value === null) return null guards from every operation in packages/stack/src/encryption/operations/. The type guard does not survive runtime: callers reaching the operation through a cast (e.g. null as any), dynamic model walking, or JS interop would then have their null silently encrypted by protect-ffi into a real SteVec ciphertext ({ k: 'sv', v: 2, ... }) — which is observable, surprising, and breaks symmetry with the model-helpers layer that does still treat null as "absent" at the field level.

    Restored, mirroring the pattern in @cipherstash/protect:

    • encrypt / encryptWithLockContext: if (plaintext === null) return null.
    • bulkEncrypt / bulkEncryptWithLockContext: per-element null filter; nulls are preserved in position in the output.
    • decrypt / decryptWithLockContext: if (encryptedData === null) return null.
    • bulkDecrypt / bulkDecryptWithLockContext: per-element null filter, position-preserving merge.
    • encryptQuery / encryptQueryWithLockContext: if (plaintext === null || plaintext === undefined) return { data: null }.
    • batchEncryptQuery / batchEncryptQueryWithLockContext: per-element null/undefined filter; null slots in the input array stay null in the result array.

    Type adjustments to support the runtime behavior honestly:

    • BulkEncryptPayload['plaintext'], BulkEncryptedData['data'], BulkDecryptPayload['data'], and the T of BulkDecryptedData all widen to ... | null. Bulk APIs now accept and return mixed nullable arrays without filtering ahead of time.
    • EncryptedQueryResult widens to include null so the batch query path can return position-stable arrays with null slots.
    • Encryption.encrypt() and Encryption.decrypt() public signatures are unchanged — still narrow (JsPlaintext / Encrypted input, Encrypted / JsPlaintext non-nullable output). The runtime null short-circuit in EncryptOperation / DecryptOperation is defense in depth for callers reaching the operation classes through casts, dynamic field walking, or JS interop. The narrow-return contract holds for any caller that respects the input contract.

@cipherstash/prisma-next@0.3.1

Patch Changes

  • Updated dependencies [6e7ae4e]
  • Updated dependencies [712d7fa]
    • @cipherstash/stack@0.18.0

@cipherstash/basic-example@1.2.12

Patch Changes

  • Updated dependencies [6e7ae4e]
  • Updated dependencies [712d7fa]
    • @cipherstash/stack@0.18.0

@cipherstash/prisma-next-example@0.0.4

Patch Changes

  • Updated dependencies [6e7ae4e]
  • Updated dependencies [712d7fa]
    • @cipherstash/stack@0.18.0
    • @cipherstash/prisma-next@0.3.1

@cipherstash/bench@0.0.3

Patch Changes

  • Updated dependencies [6e7ae4e]
  • Updated dependencies [712d7fa]
    • @cipherstash/stack@0.18.0

@github-actions github-actions Bot requested a review from a team as a code owner May 26, 2026 05:20
@github-actions github-actions Bot closed this May 26, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 609d53e to b9c4fe5 Compare May 26, 2026 05:25
@github-actions github-actions Bot reopened this May 26, 2026
@github-actions github-actions Bot closed this Jun 2, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from f1efeb6 to 1743141 Compare June 2, 2026 01:42
@github-actions github-actions Bot reopened this Jun 2, 2026
@coderdan coderdan merged commit fcb7e33 into main Jun 2, 2026
@coderdan coderdan deleted the changeset-release/main branch June 2, 2026 02:43
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