From 4f8e5ec9c91ec79e392decc582b82f10add96066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 7 Aug 2023 23:40:23 +0200 Subject: [PATCH] feat!: stop passing `isTypeScript` to `remix.init` script --- .changeset/kind-grapes-clap.md | 6 ++++++ packages/create-remix/index.ts | 3 +-- packages/remix-dev/cli/commands.ts | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .changeset/kind-grapes-clap.md diff --git a/.changeset/kind-grapes-clap.md b/.changeset/kind-grapes-clap.md new file mode 100644 index 00000000000..85f45601d9a --- /dev/null +++ b/.changeset/kind-grapes-clap.md @@ -0,0 +1,6 @@ +--- +"create-remix": major +"@remix-run/dev": major +--- + +Stop passing `isTypeScript` to `remix.init` script diff --git a/packages/create-remix/index.ts b/packages/create-remix/index.ts index 83b23879db6..bbbbd1cb5a7 100644 --- a/packages/create-remix/index.ts +++ b/packages/create-remix/index.ts @@ -491,7 +491,6 @@ async function runInitScriptStep(ctx: Context) { let initScriptDir = path.dirname(ctx.initScriptPath); let initPackageJson = path.resolve(initScriptDir, "package.json"); - let isTypeScript = fs.existsSync(path.join(ctx.cwd, "tsconfig.json")); let packageManager = ctx.pkgManager; try { @@ -525,7 +524,7 @@ async function runInitScriptStep(ctx: Context) { throw new Error("remix.init script doesn't export a function."); } let rootDirectory = path.resolve(ctx.cwd); - await initFn({ isTypeScript, packageManager, rootDirectory }); + await initFn({ packageManager, rootDirectory }); } catch (err) { error("Oh no!", "Template's remix.init script failed"); throw err; diff --git a/packages/remix-dev/cli/commands.ts b/packages/remix-dev/cli/commands.ts index b7f801aaa39..2ca45a5bb07 100644 --- a/packages/remix-dev/cli/commands.ts +++ b/packages/remix-dev/cli/commands.ts @@ -36,7 +36,6 @@ export async function init( } let initPackageJson = path.resolve(initScriptDir, "package.json"); - let isTypeScript = fse.existsSync(path.join(projectDir, "tsconfig.json")); let packageManager = detectPackageManager() ?? "npm"; if (await fse.pathExists(initPackageJson)) { @@ -51,7 +50,7 @@ export async function init( initFn = initFn.default; } try { - await initFn({ isTypeScript, packageManager, rootDirectory: projectDir }); + await initFn({ packageManager, rootDirectory: projectDir }); if (deleteScript) { await fse.remove(initScriptDir);