Skip to content

Version Packages - #2003

Merged
toiroakr merged 1 commit into
mainfrom
changeset-release/main
Aug 8, 2026
Merged

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

Conversation

@tailor-platform-pr-trigger

@tailor-platform-pr-trigger tailor-platform-pr-trigger Bot commented Aug 6, 2026

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/create-sdk@2.2.0

Minor Changes

  • #1975 b5ca25b Thanks @toiroakr! - Add tailor seed fill to fill in the values a record gets on create for the JSONL seed data rows that are missing them. It fills id by default, so rows can reference each other by id, and --fields names any other create-time field:

    # ./seed/data/Customer.jsonl: {"name":"Acme Corporation"}
    tailor seed fill
    # ./seed/data/Customer.jsonl: {"id":"0b6b6f5e-...","name":"Acme Corporation"}
    
    # also stamp a creation time on rows that have none
    tailor seed fill --fields id,createdAt

    The values come from the type itself — its id, its field defaults, its create hooks — applied to each row on its own. Nothing is validated, so a row can be filled while a required field is still missing or while another file references an id that does not exist yet; that is the point, since the ids are what you need in order to write the rows that reference them. Run tailor seed validate when the data is ready.

    Only the named fields are written, and only into a row that has no value for them, so a value already in the file is never replaced. A line that gains nothing is left byte for byte as it was; a line that takes a value is written with its keys in the order the type declares its fields, so a filled-in id lands at the front. A field the type gives no value to is skipped, so --fields id covers a whole data directory and leaves the IdP _User data alone, and naming a field the platform assigns — a serial field, for instance — fills nothing and says so.

    tailor seed apply --upsert now points at the command when a row has no id, since that is the run it blocks, and newly scaffolded projects get a seed:fill script next to seed:validate.

    The generated seed schema files now export the type's create hook, which is where the values come from. Run tailor generate after upgrading; until then tailor seed fill reports which file needs regenerating.

    createTailorDBHook from @tailor-platform/sdk/test no longer runs the type's own validate. Computing the values a record gets on create and deciding whether a record is acceptable are separate jobs, and the second one now sits where the field-level validation already was: createStandardSchema takes the type as a third argument and reports type-level issues through its result.

    tailor seed validate also stops printing two markers on the header of a failed run (\u2716 \u2717 Found 2 error(s) in ...), now that it hands the CLI a report that is already formatted.

    That also fixes how tailor seed validate reports them. A type-level validate failure used to end the run at the first offending row with a bare message; it now lands in the same report as every other issue, naming the file and every row that fails.

    A test calling createTailorDBHook directly to assert a type-level validate throws needs to go through createStandardSchema instead.

    The same operation is available as fillSeedData from @tailor-platform/sdk/seed.

Patch Changes

  • #2008 f2135ab Thanks @toiroakr! - Consistently call a TailorDB schema definition a "table" instead of a "type" across the docs, matching the db.type()db.table() rename. Also fix three leftover db.type(...) code samples in docs/services/tailordb.md that should have read db.table(...).

    Update the v2/idp-publish-events-rename codemod registry description to say "tables" instead of "types", matching the same wording fix.

@tailor-platform/sdk@2.2.0

Minor Changes

  • #1992 6e67451 Thanks @dqn! - TailorDB migration scripts can now be unit-tested before deploying:

    • The generated db.ts exports the Database interface, so createKyselyMock<Database>() from @tailor-platform/sdk/vitest types queries against the migration's schema state.
    • tailor tailordb migration script <number> --with-test scaffolds a ready-to-fill migrate.test.ts next to the migration script. When migrate.ts already exists (e.g. auto-generated for a breaking change), the flag adds only the test file.
    • createKyselyPGlite<Database>(new PGlite()) from @tailor-platform/sdk/vitest runs a migration script against an in-memory Postgres (@electric-sql/pglite, installed separately) to verify what it does to real rows.
    • The migration guide's Testing section now documents the workflow.
  • #1975 b5ca25b Thanks @toiroakr! - Add tailor seed fill to fill in the values a record gets on create for the JSONL seed data rows that are missing them. It fills id by default, so rows can reference each other by id, and --fields names any other create-time field:

    # ./seed/data/Customer.jsonl: {"name":"Acme Corporation"}
    tailor seed fill
    # ./seed/data/Customer.jsonl: {"id":"0b6b6f5e-...","name":"Acme Corporation"}
    
    # also stamp a creation time on rows that have none
    tailor seed fill --fields id,createdAt

    The values come from the type itself — its id, its field defaults, its create hooks — applied to each row on its own. Nothing is validated, so a row can be filled while a required field is still missing or while another file references an id that does not exist yet; that is the point, since the ids are what you need in order to write the rows that reference them. Run tailor seed validate when the data is ready.

    Only the named fields are written, and only into a row that has no value for them, so a value already in the file is never replaced. A line that gains nothing is left byte for byte as it was; a line that takes a value is written with its keys in the order the type declares its fields, so a filled-in id lands at the front. A field the type gives no value to is skipped, so --fields id covers a whole data directory and leaves the IdP _User data alone, and naming a field the platform assigns — a serial field, for instance — fills nothing and says so.

    tailor seed apply --upsert now points at the command when a row has no id, since that is the run it blocks, and newly scaffolded projects get a seed:fill script next to seed:validate.

    The generated seed schema files now export the type's create hook, which is where the values come from. Run tailor generate after upgrading; until then tailor seed fill reports which file needs regenerating.

    createTailorDBHook from @tailor-platform/sdk/test no longer runs the type's own validate. Computing the values a record gets on create and deciding whether a record is acceptable are separate jobs, and the second one now sits where the field-level validation already was: createStandardSchema takes the type as a third argument and reports type-level issues through its result.

    tailor seed validate also stops printing two markers on the header of a failed run (\u2716 \u2717 Found 2 error(s) in ...), now that it hands the CLI a report that is already formatted.

    That also fixes how tailor seed validate reports them. A type-level validate failure used to end the run at the first offending row with a bare message; it now lands in the same report as every other issue, naming the file and every row that fails.

    A test calling createTailorDBHook directly to assert a type-level validate throws needs to go through createStandardSchema instead.

    The same operation is available as fillSeedData from @tailor-platform/sdk/seed.

  • #1979 07c50a6 Thanks @toiroakr! - Add TailorDBColumns / TailorDBInsertable / TailorDBSelectable / TailorDBUpdateable to @tailor-platform/sdk/kysely. They accept either a table (typeof myTable) or a bare field collection, so code that is generic over the fields can derive create/read/update inputs the same way the generated table types do: .serial() fields are never caller-supplied, .default() and .hooks({ create }) fields may be omitted on create, optional fields stay optional, and id is generated. IsReadOnlyDBField and IsAutoFilledDBField are also exported from @tailor-platform/sdk for asking whether callers can never write a single field, or may omit it on create.

    Supplying a value for a .serial() column now fails with the reason instead of '<column>' does not exist in type ..., which read as a typo:

    Type 'string' is not assignable to type 'TypeLevelError<"assigned by .serial(); remove it from the input">'.
    

    This applies to the tables kyselyTypePlugin generates as well, because it comes from Serial. A serial column is now an omittable key on Insertable/Updateable rather than an absent one, so keyof Insertable<Table<"MyType">> includes it, and copying a whole record into a create input ({ ...row }) now reports the serial column instead of silently dropping it. Assigning the same values as before still compiles, and passing undefined is equivalent to omitting the column.

    Insertable, Selectable and Updateable from the generated Namespace also print as a flat object rather than an intersection, so assignability errors name the shape directly.

    TailorDBField gains an optional third type parameter carrying a nested object's own fields, so db.object({ at: db.datetime() }) keeps that shape through the builder chain. Without it a date or datetime nested in an object resolved to string | Date (or string) while the runtime hands back a Date. Writing TailorDBField<Defined, Output> still works.

  • #1988 f45ed5b Thanks @dqn! - Add tailor tailordb migration test to rehearse pending migrations in an isolated workspace. The command can load generated seed fixtures or clone source TailorDB records, run the real migration phases, optionally execute a Kysely assertion script, and deletes workspaces it creates unless --keep is passed.

  • #1984 2f8457d Thanks @dqn! - Add --strict to tailordb migration validate: validation additionally fails when a migration not yet applied to the remote has data-loss warnings (e.g. a removed field or type) but neither a migrate.ts nor a recorded --no-script acknowledgment. The failure names the affected type and field and prints the exact command to record the acknowledgment, so CI can require destructive changes to be explicitly acknowledged before merge.

    To support this, tailordb migration script <number> --no-script --reason "..." now accepts warning-tier migrations (previously it was rejected unless the migration required a script), and migration generate offers to record the reason interactively when it detects warnings. Additionally, running migration script <number> when migrate.ts already exists now clears a stale --no-script acknowledgment from diff.json instead of failing, resolving the previously unclearable state after hand-adding a script.

    diff.json files written before data-loss warnings existed now have their warnings reconstructed from the recorded field/type removals when loaded, so validate --strict and --no-script acknowledgments treat them the same as newly generated migrations.

  • #1993 ecff3b2 Thanks @dqn! - Add generated in-place TailorDB migrations for verified field type changes. Migration scripts normalize existing values while the previous field contract remains active, and the target type is applied in the post-migration phase. Generated scripts intentionally fail TypeScript checks until their normalization logic is reviewed.

  • #1990 36715da Thanks @dqn! - Add a safe tailordb migration rebaseline workflow, let checked deployments adopt the new baseline, keep migration history IDs aligned across recovery commands, and reject unsupported migration file formats with upgrade guidance

Patch Changes

  • #1960 50743ad Thanks @toiroakr! - Resolve the tailor, tailor-seed, and tailor-tailordb-erd executables through committed compile-cache launchers. The tailor seed command is now available as soon as the plugin is installed, and the seed and ERD plugin CLIs reuse Node's on-disk compile cache for faster warm starts.

  • #1934 2a3ec7b Thanks @toiroakr! - Drop the chalk dependency in favor of Node's built-in styling, and decide color support per output stream. Diagnostics on stderr now keep their colors when you redirect stdout (tailor executor list > out.txt), and stop writing escape codes into the file when you redirect stderr (tailor deploy 2> log.txt). NO_COLOR, FORCE_COLOR and non-TTY detection keep working as before.

    @tailor-platform/sdk-codemod, @tailor-platform/sdk-plugin-seed and @tailor-platform/sdk-plugin-tailordb-erd now declare the Node and Bun versions they need (node >=22.15.0, bun >=1.2.0), matching @tailor-platform/sdk. Installing them on an older runtime reports the mismatch instead of failing once the CLI runs.

  • #1985 ab23d97 Thanks @dqn! - Copyable migration-script hint commands — from migration generate, migration validate --strict, and deploy's missing-script error — are now rendered by one shell-aware formatter. Values are quoted for the platform shell, and on Windows a value containing %, $, or ! (which cmd.exe/PowerShell expand even inside double quotes) switches the hint to an argv rendering instead of a command line that would resolve to a different path. The deploy hint now also pads the migration number, binds --config with the = form, and omits it for the default config path.

  • #1999 4364357 Thanks @renovate! - fix(deps): update dependency globals to v17.9.0

  • #1994 7e804d4 Thanks @dqn! - Make tailor tailordb migration validate reject generated field type normalization scaffolds until their review marker is removed.

  • #2008 f2135ab Thanks @toiroakr! - Consistently call a TailorDB schema definition a "table" instead of a "type" across the docs, matching the db.type()db.table() rename. Also fix three leftover db.type(...) code samples in docs/services/tailordb.md that should have read db.table(...).

    Update the v2/idp-publish-events-rename codemod registry description to say "tables" instead of "types", matching the same wording fix.

@tailor-platform/sdk-plugin-seed@0.2.0

Minor Changes

  • #1975 b5ca25b Thanks @toiroakr! - Add tailor seed fill to fill in the values a record gets on create for the JSONL seed data rows that are missing them. It fills id by default, so rows can reference each other by id, and --fields names any other create-time field:

    # ./seed/data/Customer.jsonl: {"name":"Acme Corporation"}
    tailor seed fill
    # ./seed/data/Customer.jsonl: {"id":"0b6b6f5e-...","name":"Acme Corporation"}
    
    # also stamp a creation time on rows that have none
    tailor seed fill --fields id,createdAt

    The values come from the type itself — its id, its field defaults, its create hooks — applied to each row on its own. Nothing is validated, so a row can be filled while a required field is still missing or while another file references an id that does not exist yet; that is the point, since the ids are what you need in order to write the rows that reference them. Run tailor seed validate when the data is ready.

    Only the named fields are written, and only into a row that has no value for them, so a value already in the file is never replaced. A line that gains nothing is left byte for byte as it was; a line that takes a value is written with its keys in the order the type declares its fields, so a filled-in id lands at the front. A field the type gives no value to is skipped, so --fields id covers a whole data directory and leaves the IdP _User data alone, and naming a field the platform assigns — a serial field, for instance — fills nothing and says so.

    tailor seed apply --upsert now points at the command when a row has no id, since that is the run it blocks, and newly scaffolded projects get a seed:fill script next to seed:validate.

    The generated seed schema files now export the type's create hook, which is where the values come from. Run tailor generate after upgrading; until then tailor seed fill reports which file needs regenerating.

    createTailorDBHook from @tailor-platform/sdk/test no longer runs the type's own validate. Computing the values a record gets on create and deciding whether a record is acceptable are separate jobs, and the second one now sits where the field-level validation already was: createStandardSchema takes the type as a third argument and reports type-level issues through its result.

    tailor seed validate also stops printing two markers on the header of a failed run (\u2716 \u2717 Found 2 error(s) in ...), now that it hands the CLI a report that is already formatted.

    That also fixes how tailor seed validate reports them. A type-level validate failure used to end the run at the first offending row with a bare message; it now lands in the same report as every other issue, naming the file and every row that fails.

    A test calling createTailorDBHook directly to assert a type-level validate throws needs to go through createStandardSchema instead.

    The same operation is available as fillSeedData from @tailor-platform/sdk/seed.

Patch Changes

  • #1960 50743ad Thanks @toiroakr! - Resolve the tailor, tailor-seed, and tailor-tailordb-erd executables through committed compile-cache launchers. The tailor seed command is now available as soon as the plugin is installed, and the seed and ERD plugin CLIs reuse Node's on-disk compile cache for faster warm starts.

  • #1934 2a3ec7b Thanks @toiroakr! - Drop the chalk dependency in favor of Node's built-in styling, and decide color support per output stream. Diagnostics on stderr now keep their colors when you redirect stdout (tailor executor list > out.txt), and stop writing escape codes into the file when you redirect stderr (tailor deploy 2> log.txt). NO_COLOR, FORCE_COLOR and non-TTY detection keep working as before.

    @tailor-platform/sdk-codemod, @tailor-platform/sdk-plugin-seed and @tailor-platform/sdk-plugin-tailordb-erd now declare the Node and Bun versions they need (node >=22.15.0, bun >=1.2.0), matching @tailor-platform/sdk. Installing them on an older runtime reports the mismatch instead of failing once the CLI runs.

  • #2008 f2135ab Thanks @toiroakr! - Consistently call a TailorDB schema definition a "table" instead of a "type" across the docs, matching the db.type()db.table() rename. Also fix three leftover db.type(...) code samples in docs/services/tailordb.md that should have read db.table(...).

    Update the v2/idp-publish-events-rename codemod registry description to say "tables" instead of "types", matching the same wording fix.

  • Updated dependencies [50743ad, 2a3ec7b, ab23d97, 6e67451, 4364357, b5ca25b, 07c50a6, 7e804d4, f45ed5b, 2f8457d, ecff3b2, 36715da, f2135ab]:

    • @tailor-platform/sdk@2.2.0

@tailor-platform/eslint-plugin-sdk@0.2.1

Patch Changes

  • #1986 d512707 Thanks @dqn! - Keep exported rule names and plugin types aligned with the published lint rules.

@tailor-platform/sdk-codemod@0.4.2

Patch Changes

  • #1934 2a3ec7b Thanks @toiroakr! - Drop the chalk dependency in favor of Node's built-in styling, and decide color support per output stream. Diagnostics on stderr now keep their colors when you redirect stdout (tailor executor list > out.txt), and stop writing escape codes into the file when you redirect stderr (tailor deploy 2> log.txt). NO_COLOR, FORCE_COLOR and non-TTY detection keep working as before.

    @tailor-platform/sdk-codemod, @tailor-platform/sdk-plugin-seed and @tailor-platform/sdk-plugin-tailordb-erd now declare the Node and Bun versions they need (node >=22.15.0, bun >=1.2.0), matching @tailor-platform/sdk. Installing them on an older runtime reports the mismatch instead of failing once the CLI runs.

  • #2008 f2135ab Thanks @toiroakr! - Consistently call a TailorDB schema definition a "table" instead of a "type" across the docs, matching the db.type()db.table() rename. Also fix three leftover db.type(...) code samples in docs/services/tailordb.md that should have read db.table(...).

    Update the v2/idp-publish-events-rename codemod registry description to say "tables" instead of "types", matching the same wording fix.

@tailor-platform/sdk-plugin-tailordb-erd@0.1.2

Patch Changes

  • #1960 50743ad Thanks @toiroakr! - Resolve the tailor, tailor-seed, and tailor-tailordb-erd executables through committed compile-cache launchers. The tailor seed command is now available as soon as the plugin is installed, and the seed and ERD plugin CLIs reuse Node's on-disk compile cache for faster warm starts.

  • #1934 2a3ec7b Thanks @toiroakr! - Drop the chalk dependency in favor of Node's built-in styling, and decide color support per output stream. Diagnostics on stderr now keep their colors when you redirect stdout (tailor executor list > out.txt), and stop writing escape codes into the file when you redirect stderr (tailor deploy 2> log.txt). NO_COLOR, FORCE_COLOR and non-TTY detection keep working as before.

    @tailor-platform/sdk-codemod, @tailor-platform/sdk-plugin-seed and @tailor-platform/sdk-plugin-tailordb-erd now declare the Node and Bun versions they need (node >=22.15.0, bun >=1.2.0), matching @tailor-platform/sdk. Installing them on an older runtime reports the mismatch instead of failing once the CLI runs.

  • Updated dependencies [50743ad, 2a3ec7b, ab23d97, 6e67451, 4364357, b5ca25b, 07c50a6, 7e804d4, f45ed5b, 2f8457d, ecff3b2, 36715da, f2135ab]:

    • @tailor-platform/sdk@2.2.0

@tailor-platform-pr-trigger
tailor-platform-pr-trigger Bot requested review from a team as code owners August 6, 2026 08:43
@pkg-pr-new

pkg-pr-new Bot commented Aug 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tailor-platform/create-sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/create-sdk@8429327

@tailor-platform/eslint-plugin-sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/eslint-plugin-sdk@8429327

@tailor-platform/sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk@8429327

@tailor-platform/sdk-plugin-seed

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-seed@8429327

@tailor-platform/sdk-plugin-tailordb-erd

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-tailordb-erd@8429327

commit: 8429327

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@tailor-platform-pr-trigger
tailor-platform-pr-trigger Bot force-pushed the changeset-release/main branch 2 times, most recently from aa83725 to dc58645 Compare August 7, 2026 00:54
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

🗺️ ERD preview

Self-contained ERD viewer HTML built for this run. Each viewer can switch between the current schema and a diff against base branch main.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@tailor-platform-pr-trigger
tailor-platform-pr-trigger Bot force-pushed the changeset-release/main branch 2 times, most recently from 23c63e6 to 42d4972 Compare August 7, 2026 12:48
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Code Metrics Report (packages/sdk)

main (df07ebe) #2003 (c107326) +/-
Coverage 78.9% 78.9% 0.0%
Code to Test Ratio 1:0.4 1:0.4 0.0
Details
  |                    | main (df07ebe) | #2003 (c107326) | +/-  |
  |--------------------|----------------|-----------------|------|
  | Coverage           |          78.9% |           78.9% | 0.0% |
  |   Files            |            471 |             471 |    0 |
  |   Lines            |          18590 |           18590 |    0 |
  |   Covered          |          14671 |           14671 |    0 |
  | Code to Test Ratio |          1:0.4 |           1:0.4 |  0.0 |
  |   Code             |         133778 |          133778 |    0 |
  |   Test             |          65829 |           65829 |    0 |

SDK Configure Bundle Size

main (df07ebe) #2003 (c107326) +/-
configure-index-size 39.25KB 39.25KB 0KB
dependency-chunks-size 24.96KB 24.96KB 0KB
total-bundle-size 64.22KB 64.22KB 0KB

Runtime Performance

main (df07ebe) #2003 (c107326) +/-
Generate Median 2,304ms 2,142ms -162ms
Generate Max 2,366ms 2,171ms -195ms
Apply Build Median 2,361ms 2,214ms -147ms
Apply Build Max 2,373ms 2,252ms -121ms

Type Performance (instantiations)

main (df07ebe) #2003 (c107326) +/-
tailordb-basic 44,607 44,607 0
tailordb-optional 4,758 4,758 0
tailordb-relation 3,945 3,945 0
tailordb-validate 684 684 0
tailordb-hooks 5,823 5,823 0
tailordb-object 13,752 13,752 0
tailordb-enum 1,609 1,609 0
resolver-basic 12,120 12,120 0
resolver-nested 35,419 35,419 0
resolver-array 24,056 24,056 0
executor-schedule 4,489 4,489 0
executor-webhook 1,130 1,130 0
executor-record 4,585 4,585 0
executor-resolver 5,808 5,808 0
executor-operation-function 1,118 1,118 0
executor-operation-gql 1,126 1,126 0
executor-operation-webhook 1,137 1,137 0
executor-operation-workflow 1,931 1,931 0

Reported by octocov

@toiroakr
toiroakr merged commit f69506b into main Aug 8, 2026
50 checks passed
@toiroakr
toiroakr deleted the changeset-release/main branch August 8, 2026 02: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