Skip to content
Source
Sign inSign up
TanStack/intent

perf: defer validate and review imports in maintainer command #345

MergedLadyBluenotes(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/345/headmerged by LadyBluenotes(GitHub profile, opens in a new tab)

Showing 2 changed files with 10 additions and 4 deletions.

x
0 of 2 viewed, 2 left
5 additions and 0 deletions.changeset/defer-maintainer-validate-review.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/intent': patch
+---
+​
+Load `validate` and `review` command modules in `intent maintainer` only when the requested action uses them. `maintainer setup`, `add`, `remove`, and `sync` no longer evaluate the validation, example-checking, and review command bundles at startup; behavior does not change.
5 additions and 4 deletionspackages/intent/src/commands/maintainer.tsModified
View file
@@ -21,14 +21,11 @@
} from '../maintainer/distribution.js'
import { planSetupGithubActions } from '../setup/index.js'
import { detectIntentCommandPackageManager } from '../shared/command-runner.js'
-import { describeSkillExamples } from '../validate/blocks.js'
import { getMetaDir } from './support.js'
import {
buildMaintainerGuidanceBlock,
planIntentSkillsBlock,
} from './install/guidance.js'
-import { runReviewCommand } from './review.js'
-import { runValidateCommand } from './validate.js'
import type { DistributionOptions } from '../maintainer/distribution.js'
import type { ReviewPrompts } from '../review/interactive.js'
​
@@ -326,6 +323,7 @@
await runInteractiveReview(process.cwd(), options.base, prompts)
return
+ const { runReviewCommand } = await import('./review.js')
runReviewCommand(undefined, options)