Skip to content

feat(sdk-codemod): add v2/plugin-cli-import codemod#1435

Merged
toiroakr merged 1 commit into
mainfrom
feat/v2-plugin-cli-import-codemod
Jun 16, 2026
Merged

feat(sdk-codemod): add v2/plugin-cli-import codemod#1435
toiroakr merged 1 commit into
mainfrom
feat/v2-plugin-cli-import-codemod

Conversation

@dqn

@dqn dqn commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

tailor-sdk upgrade now rewrites deprecated @tailor-platform/sdk/cli plugin imports to their dedicated @tailor-platform/sdk/plugin/* subpaths.

Behaviour

// before
import { kyselyTypePlugin, defineConfig } from "@tailor-platform/sdk/cli";
// after
import { defineConfig } from "@tailor-platform/sdk/cli";
import { kyselyTypePlugin } from "@tailor-platform/sdk/plugin/kysely-type";

Named value and import type forms (including inline { type x }) are rewritten, aliases preserved, and mixed imports split so non-plugin specifiers stay on /cli. Imports that reach a plugin through a namespace (import * as cli) or default binding are left untouched.

Rewrite deprecated plugin re-export imports (kyselyTypePlugin,
enumConstantsPlugin, fileUtilsPlugin, seedPlugin) from
`@tailor-platform/sdk/cli` to their dedicated `@tailor-platform/sdk/plugin/*`
subpaths during `tailor-sdk upgrade`. Named value and `import type` forms
(including inline `{ type x }`) are rewritten and aliases preserved; mixed
imports are split so non-plugin specifiers stay on `/cli`. Imports that reach
a plugin through a namespace or default binding are left untouched.
@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 49c0cc9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tailor-platform/sdk-codemod Minor

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 49c0cc9

@github-actions

Copy link
Copy Markdown

Code Metrics Report (packages/sdk)

main (e963dd1) #1435 (3478d3a) +/-
Coverage 67.9% 67.9% 0.0%
Code to Test Ratio 1:0.4 1:0.4 0.0
Details
  |                    | main (e963dd1) | #1435 (3478d3a) | +/-  |
  |--------------------|----------------|-----------------|------|
  | Coverage           |          67.9% |           67.9% | 0.0% |
  |   Files            |            415 |             415 |    0 |
  |   Lines            |          14572 |           14572 |    0 |
  |   Covered          |           9898 |            9898 |    0 |
  | Code to Test Ratio |          1:0.4 |           1:0.4 |  0.0 |
  |   Code             |          96533 |           96533 |    0 |
  |   Test             |          42498 |           42498 |    0 |

SDK Configure Bundle Size

main (e963dd1) #1435 (3478d3a) +/-
configure-index-size 19.73KB 19.73KB 0KB
dependency-chunks-size 47.71KB 47.71KB 0KB
total-bundle-size 67.44KB 67.44KB 0KB

Runtime Performance

main (e963dd1) #1435 (3478d3a) +/-
Generate Median 2,869ms 2,816ms -53ms
Generate Max 2,897ms 2,846ms -51ms
Apply Build Median 2,927ms 2,857ms -70ms
Apply Build Max 2,938ms 2,888ms -50ms

Type Performance (instantiations)

main (e963dd1) #1435 (3478d3a) +/-
tailordb-basic 36,061 36,061 0
tailordb-optional 3,841 3,841 0
tailordb-relation 5,921 5,921 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 6,659 6,659 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

@dqn dqn marked this pull request as ready for review June 15, 2026 11:34
@dqn dqn requested review from a team and toiroakr June 15, 2026 11:34

@toiroakr toiroakr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@toiroakr toiroakr merged commit 0c20554 into main Jun 16, 2026
42 checks passed
@toiroakr toiroakr deleted the feat/v2-plugin-cli-import-codemod branch June 16, 2026 00:58
This was referenced Jun 16, 2026
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.

2 participants