Skip to content

Version Packages#1295

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

Version Packages#1295
toiroakr merged 1 commit into
mainfrom
changeset-release/main

Conversation

@tailor-platform-pr-trigger
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

@tailor-platform/sdk@1.54.0

Minor Changes

  • #1268 e6b2a23 Thanks @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 8d05f86 Thanks @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.

    import { createKyselyMock } from "@tailor-platform/sdk/vitest";
    import type { Namespace } from "./generated/db";
    
    const mock = createKyselyMock<Namespace["main-db"]>();
    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 a230ba6 Thanks @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

@tailor-platform/create-sdk@1.54.0

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

⚡ pkg.pr.new

@tailor-platform/sdk

pnpm add https://pkg.pr.new/@tailor-platform/sdk@127808a
pnpm dlx https://pkg.pr.new/@tailor-platform/sdk@127808a --help

@tailor-platform/create-sdk

pnpm add https://pkg.pr.new/@tailor-platform/create-sdk@127808a
pnpm dlx https://pkg.pr.new/@tailor-platform/create-sdk@127808a my-app

commit: 127808a

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code Metrics Report (packages/sdk)

main (6ab0b6c) #1295 (bd77caa) +/-
Coverage 64.6% 64.6% 0.0%
Code to Test Ratio 1:0.4 1:0.4 0.0
Details
  |                    | main (6ab0b6c) | #1295 (bd77caa) | +/-  |
  |--------------------|----------------|-----------------|------|
  | Coverage           |          64.6% |           64.6% | 0.0% |
  |   Files            |            381 |             381 |    0 |
  |   Lines            |          13184 |           13184 |    0 |
  |   Covered          |           8520 |            8520 |    0 |
  | Code to Test Ratio |          1:0.4 |           1:0.4 |  0.0 |
  |   Code             |          87882 |           87882 |    0 |
  |   Test             |          37687 |           37687 |    0 |

SDK Configure Bundle Size

main (6ab0b6c) #1295 (bd77caa) +/-
configure-index-size 18KB 18KB 0KB
dependency-chunks-size 34.47KB 34.47KB 0KB
total-bundle-size 52.47KB 52.47KB 0KB

Runtime Performance

main (6ab0b6c) #1295 (bd77caa) +/-
Generate Median 2,764ms 2,720ms -44ms
Generate Max 2,795ms 2,805ms 10ms
Apply Build Median 2,814ms 2,794ms -20ms
Apply Build Max 2,840ms 2,824ms -16ms

Type Performance (instantiations)

main (6ab0b6c) #1295 (bd77caa) +/-
tailordb-basic 35,147 35,147 0
tailordb-optional 3,841 3,841 0
tailordb-relation 7,428 7,428 0
tailordb-validate 2,566 2,566 0
tailordb-hooks 5,767 5,767 0
tailordb-object 12,136 12,136 0
tailordb-enum 2,462 2,462 0
resolver-basic 9,424 9,424 0
resolver-nested 26,111 26,111 0
resolver-array 18,187 18,187 0
executor-schedule 4,234 4,234 0
executor-webhook 873 873 0
executor-record 8,166 8,166 0
executor-resolver 4,369 4,369 0
executor-operation-function 868 868 0
executor-operation-gql 869 869 0
executor-operation-webhook 888 888 0
executor-operation-workflow 1,714 1,714 0

Reported by octocov

@toiroakr toiroakr merged commit 34bb263 into main Jun 2, 2026
55 checks passed
@toiroakr toiroakr deleted the changeset-release/main branch June 2, 2026 08:24
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