Skip to content

Version Packages#1290

Closed
tailor-platform-pr-trigger[bot] wants to merge 0 commit into
mainfrom
changeset-release/main
Closed

Version Packages#1290
tailor-platform-pr-trigger[bot] wants to merge 0 commit into
mainfrom
changeset-release/main

Conversation

@tailor-platform-pr-trigger
Copy link
Copy Markdown
Contributor

@tailor-platform-pr-trigger tailor-platform-pr-trigger Bot commented Jun 2, 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

@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@171644c
pnpm dlx https://pkg.pr.new/@tailor-platform/sdk@171644c --help

@tailor-platform/create-sdk

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

commit: 171644c

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code Metrics Report (packages/sdk)

main (48848a7) #1290 (3b04fd1) +/-
Coverage 64.5% 64.5% 0.0%
Code to Test Ratio 1:0.4 1:0.4 0.0
Details
  |                    | main (48848a7) | #1290 (3b04fd1) | +/-  |
  |--------------------|----------------|-----------------|------|
  | Coverage           |          64.5% |           64.5% | 0.0% |
  |   Files            |            380 |             380 |    0 |
  |   Lines            |          13144 |           13144 |    0 |
  |   Covered          |           8484 |            8484 |    0 |
  | Code to Test Ratio |          1:0.4 |           1:0.4 |  0.0 |
  |   Code             |          87625 |           87625 |    0 |
  |   Test             |          37565 |           37565 |    0 |

SDK Configure Bundle Size

main (48848a7) #1290 (3b04fd1) +/-
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 (48848a7) #1290 (3b04fd1) +/-
Generate Median 2,809ms 2,834ms 25ms
Generate Max 2,847ms 2,949ms 102ms
Apply Build Median 2,857ms 2,884ms 27ms
Apply Build Max 2,903ms 2,923ms 20ms

Type Performance (instantiations)

main (48848a7) #1290 (3b04fd1) +/-
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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code Metrics Report (packages/sdk)

main (48848a7) #1290 (3b04fd1) +/-
Coverage 64.5% 64.5% 0.0%
Code to Test Ratio 1:0.4 1:0.4 0.0
Details
  |                    | main (48848a7) | #1290 (3b04fd1) | +/-  |
  |--------------------|----------------|-----------------|------|
  | Coverage           |          64.5% |           64.5% | 0.0% |
  |   Files            |            380 |             380 |    0 |
  |   Lines            |          13144 |           13144 |    0 |
  |   Covered          |           8484 |            8484 |    0 |
  | Code to Test Ratio |          1:0.4 |           1:0.4 |  0.0 |
  |   Code             |          87625 |           87625 |    0 |
  |   Test             |          37565 |           37565 |    0 |

SDK Configure Bundle Size

main (48848a7) #1290 (3b04fd1) +/-
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 (48848a7) #1290 (3b04fd1) +/-
Generate Median 2,809ms 2,534ms -275ms
Generate Max 2,847ms 2,605ms -242ms
Apply Build Median 2,857ms 2,570ms -287ms
Apply Build Max 2,903ms 2,588ms -315ms

Type Performance (instantiations)

main (48848a7) #1290 (3b04fd1) +/-
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

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.

0 participants