Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: stop passing isTypeScript to remix.init script #7099

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/kind-grapes-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"create-remix": major
"@remix-run/dev": major
---

Stop passing `isTypeScript` to `remix.init` script
3 changes: 1 addition & 2 deletions packages/create-remix/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions packages/remix-dev/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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);
Expand Down