From 5ac2ebed11db83cd0b568b50ff2e17119ee53e9e Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 16 Jan 2025 13:27:25 -0500 Subject: [PATCH] chore: fix remaining silent merges, and move APIs to create-fs --- package.json | 1 + pnpm-lock.yaml | 3 +++ src/next/blocks/blockContributorCovenant.ts | 1 - src/next/blocks/blockDevelopmentDocs.ts | 1 - src/next/blocks/blockESLint.ts | 1 - src/next/blocks/blockGitHubActionsCI.ts | 1 - src/next/blocks/blockKnip.ts | 1 - src/next/blocks/blockPackageJson.ts | 1 - src/next/blocks/blockTSup.ts | 1 - src/next/blocks/blockVitest.ts | 1 - src/steps/writing/creation/index.ts | 10 +++------- src/steps/writing/writeStructure.ts | 3 ++- 12 files changed, 9 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 04a4eb737..5453ff163 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@prettier/sync": "^0.5.2", "chalk": "^5.4.1", "create": "^0.1.0-alpha.15", + "create-fs": "^0.1.1", "cspell-populate-words": "^0.3.0", "execa": "^9.5.2", "git-remote-origin-url": "^4.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5bfad320b..936d0a132 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: create: specifier: ^0.1.0-alpha.15 version: 0.1.0-alpha.15 + create-fs: + specifier: ^0.1.1 + version: 0.1.1 cspell-populate-words: specifier: ^0.3.0 version: 0.3.0 diff --git a/src/next/blocks/blockContributorCovenant.ts b/src/next/blocks/blockContributorCovenant.ts index 5a17a6d16..996ec8833 100644 --- a/src/next/blocks/blockContributorCovenant.ts +++ b/src/next/blocks/blockContributorCovenant.ts @@ -9,7 +9,6 @@ export const blockContributorCovenant = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm CODE_OF_CONDUCT.md"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockDevelopmentDocs.ts b/src/next/blocks/blockDevelopmentDocs.ts index dd7fcc823..13dcc8986 100644 --- a/src/next/blocks/blockDevelopmentDocs.ts +++ b/src/next/blocks/blockDevelopmentDocs.ts @@ -68,7 +68,6 @@ export const blockDevelopmentDocs = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm DEVELOPMENT.md"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockESLint.ts b/src/next/blocks/blockESLint.ts index f1e5d88ba..d9ceab8d2 100644 --- a/src/next/blocks/blockESLint.ts +++ b/src/next/blocks/blockESLint.ts @@ -68,7 +68,6 @@ export const blockESLint = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm .eslintrc* .eslintignore eslint.config.*"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockGitHubActionsCI.ts b/src/next/blocks/blockGitHubActionsCI.ts index 090708edb..d35c477d3 100644 --- a/src/next/blocks/blockGitHubActionsCI.ts +++ b/src/next/blocks/blockGitHubActionsCI.ts @@ -33,7 +33,6 @@ export const blockGitHubActionsCI = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm -rf .circleci travis.yml"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockKnip.ts b/src/next/blocks/blockKnip.ts index 517772568..cd3b0cf77 100644 --- a/src/next/blocks/blockKnip.ts +++ b/src/next/blocks/blockKnip.ts @@ -18,7 +18,6 @@ export const blockKnip = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm .knip* knip.*"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockPackageJson.ts b/src/next/blocks/blockPackageJson.ts index a38a3c329..7b8876873 100644 --- a/src/next/blocks/blockPackageJson.ts +++ b/src/next/blocks/blockPackageJson.ts @@ -30,7 +30,6 @@ export const blockPackageJson = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm package-lock.json yarn.lock"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockTSup.ts b/src/next/blocks/blockTSup.ts index 5efe85a31..dfb82d60b 100644 --- a/src/next/blocks/blockTSup.ts +++ b/src/next/blocks/blockTSup.ts @@ -20,7 +20,6 @@ export const blockTSup = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm -rf .babelrc* babel.config.* dist lib"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/next/blocks/blockVitest.ts b/src/next/blocks/blockVitest.ts index 5c6410464..9ba0c5312 100644 --- a/src/next/blocks/blockVitest.ts +++ b/src/next/blocks/blockVitest.ts @@ -33,7 +33,6 @@ export const blockVitest = base.createBlock({ return { scripts: [ { - silent: true, commands: ["rm .mocha* jest.config.* vitest.config.*"], phase: CommandPhase.Migrations, silent: true, diff --git a/src/steps/writing/creation/index.ts b/src/steps/writing/creation/index.ts index 72cb4db41..805fd308c 100644 --- a/src/steps/writing/creation/index.ts +++ b/src/steps/writing/creation/index.ts @@ -1,9 +1,5 @@ -import { - CreatedFiles, - produceBase, - producePreset, - SystemFetchers, -} from "create"; +import { produceBase, producePreset, SystemFetchers } from "create"; +import { CreatedDirectory } from "create-fs"; import prettier from "prettier"; import { presetCommon } from "../../../next/presets/presetCommon.js"; @@ -62,7 +58,7 @@ export async function createStructure( }; } -async function recursivelyFormat(files: CreatedFiles): Promise { +async function recursivelyFormat(files: CreatedDirectory): Promise { const result: Structure = {}; for (const [key, value] of Object.entries(files)) { diff --git a/src/steps/writing/writeStructure.ts b/src/steps/writing/writeStructure.ts index 1a5531f8e..5a487116d 100644 --- a/src/steps/writing/writeStructure.ts +++ b/src/steps/writing/writeStructure.ts @@ -1,4 +1,5 @@ -import { applyFilesToSystem, createWritingFileSystem } from "create"; +import { applyFilesToSystem } from "create"; +import { createWritingFileSystem } from "create-fs"; import { $ } from "execa"; import { isUsingCreateEngine } from "../../shared/isUsingCreateEngine.js";