From 127808a324f7e2641a1c6372491f0c295534f085 Mon Sep 17 00:00:00 2001 From: "tailor-platform-pr-trigger[bot]" <247949890+tailor-platform-pr-trigger[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:17:16 +0000 Subject: [PATCH] Version Packages --- .changeset/auth-before-login-env.md | 7 ----- .changeset/kysely-layer-mock.md | 28 ------------------ .changeset/migration-env.md | 7 ----- .changeset/renovate-1285.md | 5 ---- .changeset/renovate-1288.md | 5 ---- .changeset/renovate-1291.md | 5 ---- packages/create-sdk/CHANGELOG.md | 2 ++ packages/create-sdk/package.json | 2 +- packages/sdk/CHANGELOG.md | 45 +++++++++++++++++++++++++++++ packages/sdk/package.json | 2 +- 10 files changed, 49 insertions(+), 59 deletions(-) delete mode 100644 .changeset/auth-before-login-env.md delete mode 100644 .changeset/kysely-layer-mock.md delete mode 100644 .changeset/migration-env.md delete mode 100644 .changeset/renovate-1285.md delete mode 100644 .changeset/renovate-1288.md delete mode 100644 .changeset/renovate-1291.md diff --git a/.changeset/auth-before-login-env.md b/.changeset/auth-before-login-env.md deleted file mode 100644 index 611afead2..000000000 --- a/.changeset/auth-before-login-env.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@tailor-platform/sdk": minor ---- - -feat(auth): expose `env` in the `beforeLogin` hook handler - -The `beforeLogin` auth hook handler now receives `env` alongside `claims` and `idpConfigName`, exposing the variables defined in `defineConfig({ env })` (the same values available via `context.env` in resolvers). This lets hooks branch on environment-specific configuration at runtime without relying on `process.env`, which is unavailable in the platform runtime. diff --git a/.changeset/kysely-layer-mock.md b/.changeset/kysely-layer-mock.md deleted file mode 100644 index 47c06734f..000000000 --- a/.changeset/kysely-layer-mock.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -"@tailor-platform/sdk": minor ---- - -Add `createKyselyMock` to `@tailor-platform/sdk/vitest` for unit-testing code that runs Kysely queries. It returns a real Kysely instance whose execution is mocked. You stage the rows each query returns, run your code, then assert what it did — the SQL and parameters of each query, how many `selects`/`inserts`/`updates`/`deletes` ran, and the value your code returned. - -```ts -import { createKyselyMock } from "@tailor-platform/sdk/vitest"; -import type { Namespace } from "./generated/db"; - -const mock = createKyselyMock(); -mock.enqueueResults([{ age: 30 }]); // the next query returns this row - -const { age } = await mock.db - .selectFrom("User") - .select("age") - .where("email", "=", "a@b.com") - .executeTakeFirstOrThrow(); -await mock.db - .updateTable("User") - .set({ age: age + 1 }) - .where("email", "=", "a@b.com") - .execute(); - -expect(mock.updates).toHaveLength(1); -expect(mock.updates[0].parameters).toEqual([31, "a@b.com"]); // the actual bound values -expect(mock.updates[0].sql).toContain('update "User"'); // the compiled SQL -``` diff --git a/.changeset/migration-env.md b/.changeset/migration-env.md deleted file mode 100644 index f7ad74337..000000000 --- a/.changeset/migration-env.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@tailor-platform/sdk": minor ---- - -feat(migration): expose `env` in migration scripts - -The migration `main` function now receives an optional second argument `{ env }: MigrationContext` exposing the variables defined in `defineConfig({ env })` — the same values available via `context.env` in resolvers and `{ env }` in workflow jobs. The values are injected at bundle time and the `MigrationContext` type is exported from the generated `./db`. Existing `main(trx)` scripts continue to work unchanged. diff --git a/.changeset/renovate-1285.md b/.changeset/renovate-1285.md deleted file mode 100644 index d5ded4e84..000000000 --- a/.changeset/renovate-1285.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tailor-platform/sdk": patch ---- - -fix(deps): update @inquirer diff --git a/.changeset/renovate-1288.md b/.changeset/renovate-1288.md deleted file mode 100644 index 91c8888f4..000000000 --- a/.changeset/renovate-1288.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tailor-platform/sdk": patch ---- - -fix(deps): update dependency @clack/prompts to v1.5.0 diff --git a/.changeset/renovate-1291.md b/.changeset/renovate-1291.md deleted file mode 100644 index ef3269d15..000000000 --- a/.changeset/renovate-1291.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tailor-platform/sdk": patch ---- - -fix(deps): update dependency date-fns to v4.4.0 diff --git a/packages/create-sdk/CHANGELOG.md b/packages/create-sdk/CHANGELOG.md index 1549a0d31..c0f5bf489 100644 --- a/packages/create-sdk/CHANGELOG.md +++ b/packages/create-sdk/CHANGELOG.md @@ -1,5 +1,7 @@ # @tailor-platform/create-sdk +## 1.54.0 + ## 1.53.0 ## 1.52.0 diff --git a/packages/create-sdk/package.json b/packages/create-sdk/package.json index 131cf6251..c9cbc4829 100644 --- a/packages/create-sdk/package.json +++ b/packages/create-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@tailor-platform/create-sdk", - "version": "1.53.0", + "version": "1.54.0", "description": "A CLI tool to quickly create a new Tailor Platform SDK project", "license": "MIT", "repository": { diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 66ddbb93a..0b8b67aed 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,50 @@ # @tailor-platform/sdk +## 1.54.0 + +### Minor Changes + +- [#1268](https://github.com/tailor-platform/sdk/pull/1268) [`e6b2a23`](https://github.com/tailor-platform/sdk/commit/e6b2a23b99e101cb878d9570e18d9d2fcbc07ac0) Thanks [@toiroakr](https://github.com/toiroakr)! - feat(auth): expose `env` in the `beforeLogin` hook handler + + The `beforeLogin` auth hook handler now receives `env` alongside `claims` and `idpConfigName`, exposing the variables defined in `defineConfig({ env })` (the same values available via `context.env` in resolvers). This lets hooks branch on environment-specific configuration at runtime without relying on `process.env`, which is unavailable in the platform runtime. + +- [#1277](https://github.com/tailor-platform/sdk/pull/1277) [`8d05f86`](https://github.com/tailor-platform/sdk/commit/8d05f864bc714f12783f66453791912dae8246a3) Thanks [@remiposo](https://github.com/remiposo)! - Add `createKyselyMock` to `@tailor-platform/sdk/vitest` for unit-testing code that runs Kysely queries. It returns a real Kysely instance whose execution is mocked. You stage the rows each query returns, run your code, then assert what it did — the SQL and parameters of each query, how many `selects`/`inserts`/`updates`/`deletes` ran, and the value your code returned. + + ```ts + import { createKyselyMock } from "@tailor-platform/sdk/vitest"; + import type { Namespace } from "./generated/db"; + + const mock = createKyselyMock(); + mock.enqueueResults([{ age: 30 }]); // the next query returns this row + + const { age } = await mock.db + .selectFrom("User") + .select("age") + .where("email", "=", "a@b.com") + .executeTakeFirstOrThrow(); + await mock.db + .updateTable("User") + .set({ age: age + 1 }) + .where("email", "=", "a@b.com") + .execute(); + + expect(mock.updates).toHaveLength(1); + expect(mock.updates[0].parameters).toEqual([31, "a@b.com"]); // the actual bound values + expect(mock.updates[0].sql).toContain('update "User"'); // the compiled SQL + ``` + +- [#1269](https://github.com/tailor-platform/sdk/pull/1269) [`a230ba6`](https://github.com/tailor-platform/sdk/commit/a230ba6a1b6861f60e6edac82ae59d333f1f3604) Thanks [@toiroakr](https://github.com/toiroakr)! - feat(migration): expose `env` in migration scripts + + The migration `main` function now receives an optional second argument `{ env }: MigrationContext` exposing the variables defined in `defineConfig({ env })` — the same values available via `context.env` in resolvers and `{ env }` in workflow jobs. The values are injected at bundle time and the `MigrationContext` type is exported from the generated `./db`. Existing `main(trx)` scripts continue to work unchanged. + +### Patch Changes + +- [#1285](https://github.com/tailor-platform/sdk/pull/1285) [`239b146`](https://github.com/tailor-platform/sdk/commit/239b1466ab4fb91d416d7cecb606703b5f9a9a33) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @inquirer + +- [#1288](https://github.com/tailor-platform/sdk/pull/1288) [`02027b1`](https://github.com/tailor-platform/sdk/commit/02027b1d71120ca50e06dea1060d03c39bec41f7) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @clack/prompts to v1.5.0 + +- [#1291](https://github.com/tailor-platform/sdk/pull/1291) [`6f52e3e`](https://github.com/tailor-platform/sdk/commit/6f52e3e8b385ab00e010fd5bbc4f8bd5f15167be) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency date-fns to v4.4.0 + ## 1.53.0 ### Minor Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 7f589db06..5f049b6bf 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@tailor-platform/sdk", - "version": "1.53.0", + "version": "1.54.0", "description": "Tailor Platform SDK - The SDK to work with Tailor Platform", "license": "MIT", "repository": {