From 8bf15b216d7252f223087e7dff62ab04c89f3c08 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 31 Dec 2024 04:48:00 -0500 Subject: [PATCH] chore: add remaining block migrations to migrate/update old repos --- src/next/blocks/blockESLint.test.ts | 2 +- src/next/blocks/blockESLint.ts | 2 +- src/next/blocks/blockKnip.ts | 11 +++++++++++ src/next/blocks/blockVitest.test.ts | 2 +- src/next/blocks/blockVitest.ts | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/next/blocks/blockESLint.test.ts b/src/next/blocks/blockESLint.test.ts index 15b1cd24..9fce1268 100644 --- a/src/next/blocks/blockESLint.test.ts +++ b/src/next/blocks/blockESLint.test.ts @@ -259,7 +259,7 @@ describe("blockESLint", () => { }, { "commands": [ - "rm .eslintrc* .eslintignore", + "rm .eslintrc* .eslintignore eslint.config.*", ], "phase": 0, }, diff --git a/src/next/blocks/blockESLint.ts b/src/next/blocks/blockESLint.ts index 58027767..cbbf38ff 100644 --- a/src/next/blocks/blockESLint.ts +++ b/src/next/blocks/blockESLint.ts @@ -67,7 +67,7 @@ export const blockESLint = base.createBlock({ return { scripts: [ { - commands: ["rm .eslintrc* .eslintignore"], + commands: ["rm .eslintrc* .eslintignore eslint.config.*"], phase: CommandPhase.Migrations, }, ], diff --git a/src/next/blocks/blockKnip.ts b/src/next/blocks/blockKnip.ts index fa2f0399..fadbb202 100644 --- a/src/next/blocks/blockKnip.ts +++ b/src/next/blocks/blockKnip.ts @@ -3,11 +3,22 @@ import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js"; import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js"; import { blockPackageJson } from "./blockPackageJson.js"; import { getPackageDependencies, getPackageDependency } from "./packageData.js"; +import { CommandPhase } from "./phases.js"; export const blockKnip = base.createBlock({ about: { name: "Knip", }, + migrate() { + return { + scripts: [ + { + commands: ["rm .knip* knip.*"], + phase: CommandPhase.Migrations, + }, + ], + }; + }, produce() { return { addons: [ diff --git a/src/next/blocks/blockVitest.test.ts b/src/next/blocks/blockVitest.test.ts index 7f03630e..7e36afec 100644 --- a/src/next/blocks/blockVitest.test.ts +++ b/src/next/blocks/blockVitest.test.ts @@ -499,7 +499,7 @@ describe("blockVitest", () => { "scripts": [ { "commands": [ - "rm .github/codecov.yml .mocha* codecov.yml jest.config.*", + "rm .github/codecov.yml .mocha* codecov.yml jest.config.* vitest.config.*", ], "phase": 0, }, diff --git a/src/next/blocks/blockVitest.ts b/src/next/blocks/blockVitest.ts index 286325cd..d1281b79 100644 --- a/src/next/blocks/blockVitest.ts +++ b/src/next/blocks/blockVitest.ts @@ -37,7 +37,7 @@ export const blockVitest = base.createBlock({ scripts: [ { commands: [ - "rm .github/codecov.yml .mocha* codecov.yml jest.config.*", + "rm .github/codecov.yml .mocha* codecov.yml jest.config.* vitest.config.*", ], phase: CommandPhase.Migrations, },