diff --git a/package.json b/package.json index e6e51d8..ee14e2c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "ci:publish": "pnpm build:all && pnpm changeset publish", "ci:version": "changeset version && pnpm install --no-frozen-lockfile && git add .", "cli": "ts-node -P scripts/tsconfig.script.json scripts/cli.ts", - "cli-dev": "pnpm cli --respawn --transpile-only", + "cli-dev": "ts-node -P scripts/tsconfig.script.json --transpile-only scripts/cli.ts", "cs:add": "changeset add", "cs:publish": "changeset publish", "cs:tag": "changeset tag", diff --git a/scripts/rename-package.ts b/scripts/rename-package.ts index 2e77db9..0f2d111 100644 --- a/scripts/rename-package.ts +++ b/scripts/rename-package.ts @@ -33,11 +33,13 @@ export default function useRenameWorkspacePackage(cli: CAC) { tasks.push([pkg, renamed]); } - if (!tasks.length) { - consola.error('No copy tasks available.'); + const filteredTasks = tasks.filter((t) => t[1].length); + + if (!filteredTasks.length) { + consola.error('No rename task available.'); } - for (const [raw, renamed] of tasks) { + for (const [raw, renamed] of filteredTasks) { const rawDir = CLIUtils.resolvePackageDir(raw); const dest = CLIUtils.resolvePackageDir(renamed);