Skip to content

Commit

Permalink
fix(yarn): don't run yarn import typescript when creating a new project
Browse files Browse the repository at this point in the history
Since yarn 4, TypeScript support is built-in and this
command fails.
  • Loading branch information
djcsdy committed Nov 16, 2023
1 parent 6374b15 commit c1bcd54
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
2 changes: 0 additions & 2 deletions cli/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export function cliInit(path: string, options: InitOptions): void {
return "git init failed";
case "yarn-set-version-failed":
return "yarn set version failed";
case "yarn-plugin-import-failed":
return "yarn plugin import failed";
case "set-yarn-linker-failed":
return "failed to set yarn linker";
case "yarn-install-failed":
Expand Down
4 changes: 0 additions & 4 deletions project/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import {writeHuskyConfig} from "../husky/write";
import {writeCommitlintConfig} from "../commitlint/write";
import type {YarnSetVersionFailureReason} from "../yarn/set-version-stable";
import {yarnSetVersionStable} from "../yarn/set-version-stable";
import type {YarnPluginImportFailureReason} from "../yarn/plugin-import-typescript";
import {yarnPluginImportTypeScript} from "../yarn/plugin-import-typescript";
import type {SetYarnLinkerFailureReason} from "../yarn/set-linker-to-node-modules";
import {setYarnLinkerToNodeModules} from "../yarn/set-linker-to-node-modules";
import type {Project} from "./project";
Expand All @@ -36,7 +34,6 @@ export type InitFailureReason =
| CommitFailureReason
| GitInitFailureReason
| YarnSetVersionFailureReason
| YarnPluginImportFailureReason
| SetYarnLinkerFailureReason
| YarnInstallFailureReason
| YarnFixFailureReason;
Expand Down Expand Up @@ -65,7 +62,6 @@ export default async function init(project: Project): Promise<InitResult> {
.then(async fsStage => commit(project.path, fsStage))
.then(bindAsyncResultFn<InitFailureReason>(async () => gitInit(project)))
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnSetVersionStable(project)))
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnPluginImportTypeScript(project)))
.then(bindAsyncResultFn<InitFailureReason>(async () => setYarnLinkerToNodeModules(project)))
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnInstall(project)))
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnFix(project)));
Expand Down
18 changes: 0 additions & 18 deletions yarn/plugin-import-typescript.ts

This file was deleted.

0 comments on commit c1bcd54

Please sign in to comment.