feat(stack-drizzle)!: remove EQL v2 root and collapse ./v3 to root#770
feat(stack-drizzle)!: remove EQL v2 root and collapse ./v3 to root#770tobyhede wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🦋 Changeset detectedLatest commit: 8b1a459 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
81ed000 to
a1bfe1a
Compare
Delete the EQL v2 authoring surface (`src/index.ts` `encryptedType` + config extraction, `src/operators.ts`, `src/schema-extraction.ts`) and promote the EQL v3 implementation from `./v3` to the package root as a hard break with no alias. - Drop the `./v3` subpath from the `exports` map and remove `typesVersions`; the v3 impl now lives at `src/*` and is the sole `.` export. - De-suffix the public API: `createEncryptionOperatorsV3` -> `createEncryptionOperators`, `extractEncryptionSchemaV3` -> `extractEncryptionSchema`. No `*V3` aliases (they would type-check v2 call sites against v3 semantics). - Delete the two v2 operator test files; move the v3 test suite to `__tests__/*` and repoint imports. ESM+CJS both preserved. - Fix the `@cipherstash/bench` importer: rewrite the Drizzle table to v3 `types.*` domains + `EncryptionV3`, switch operator usages off the removed v2-only ops (`like`/`ilike`, jsonb-path) to `matches`/`contains`/`selector`, and update the bench fixture schema.sql to the eql_v3 domains/index terms. - Update the README and the bundled `stash-drizzle` skill to the collapsed root imports; remove v2 authoring guidance. Existing v2 ciphertext still decrypts via `@cipherstash/stack`; only the Drizzle-side v2 authoring/query-building is removed (Decision 6). BREAKING CHANGE: `@cipherstash/stack-drizzle` no longer exports an EQL v2 surface and the `./v3` subpath is removed. Import the v3 API from the package root with the de-suffixed names.
a1bfe1a to
36b099b
Compare
…ollapse PR 3 made EncryptionV3 an overloaded alias; ReturnType<typeof EncryptionV3> now resolves to the nominal overload (EncryptionClient) not the typed client. Infer through a single-signature helper so the bench handle keeps the typed client type.
2a1dca6 to
30e7b55
Compare
…the image The bench fixture schema moved to concrete EQL v3 domains (`public.eql_v3_text_search`, `eql_v3.eq_term(...)`), but tests-bench.yml started `postgres-eql:17-2.3.1` — which ships EQL v2 — and ran the suite immediately. `applySchema` failed with `type "public.eql_v3_text_search" does not exist`. Nothing tied the image tag to the EQL version the fixtures need, so the coupling broke silently. Install v3 the way every integration suite already does: a vitest `globalSetup` calling test-kit's `installEqlV3`, which shells out to the real `stash eql install --eql-version 3`. That needs only a database URL — no CipherStash credentials — so `db-only.test.ts` stays the credential-free smoke test it is meant to be, and CI and `pnpm test:local` become the same path rather than CI depending on a step the local flow never ran. The globalSetup imports `@cipherstash/test-kit/install` (a new narrow subpath export) rather than the barrel: the barrel reaches `needle-for.ts`, which consumes stack source through the `@/` alias, and bench has no `stackSourceAlias` in its vitest config. `install.ts` depends on node builtins only. Workflow changes: - Use the `integration-setup` composite, which already builds the `stash` CLI the install needs (pinned to this job's existing Node 22). - Start only the `postgres` service; docker-compose.yml also defines a PostgREST that bench never talks to. - Widen the trigger paths to follow the package graph. bench depends on `@cipherstash/stack` and `@cipherstash/stack-drizzle`, and now on the CLI's EQL installer, but the filter covered only `packages/bench/**` and `local/**` — a break upstream could never trigger this job. No changeset: `@cipherstash/bench` and `@cipherstash/test-kit` are both private, and workflow files are repo tooling.
Part of the EQL v2 removal effort (#707). PR 5 of the linear stack — stacked on #769 (PR 4, stack-supabase).
What this does
Removes the EQL v2 root from
@cipherstash/stack-drizzleand collapses./v3→., per the design §"PR 5".src/index.ts,src/operators.ts,src/schema-extraction.ts) — confirmed v2-only (eql_v2_encryptedtype,@cipherstash/stack/schemaimports) — plus two v2-only query-builder test files../v3→.hard break, no alias (Decision 5): movedsrc/v3/*→src/*, de-suffixedcreateEncryptionOperatorsV3/extractEncryptionSchemaV3to unsuffixed. Removed the./v3export block andtypesVersionsfrom package.json; root keepsimport+require.packages/benchimporter fixed and given a realbuild(tsc --noEmit) script it previously lacked, so the importer is guarded in CI.stash-drizzle), README, changeset (stack-drizzle: major,stash: patch) updated.Green gate
build ✓ · test:types 7 pass · test 364 pass (all mock-driven, 0 skipped) · bench
tsc --noEmitexit 0 ·code:check0 errors.Decision 6
The deleted v2 root was authoring/query-building only — no decrypt path lived there (decrypt is via
@cipherstash/stack). The v3 codec + its 26-test round-trip suite are retained; read coverage is not dropped.Notes for reviewer
sql/schema.sqlv3 index SQL is best-effort, not live-validated — theeql_v3.eq_term/match_term/ste_vecindex-term function names weren't run against a live EQL v3 DB (no creds). Verify against the installed bundle before relying on bench numbers. Outside the build/typecheck gate.examples/basic(also a drizzle importer) intentionally left for PR 7.🤖 Generated with Claude Code