Skip to content

Commit c1bcd54

Browse files
committed
fix(yarn): don't run yarn import typescript when creating a new project
Since yarn 4, TypeScript support is built-in and this command fails.
1 parent 6374b15 commit c1bcd54

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

cli/init.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ export function cliInit(path: string, options: InitOptions): void {
5757
return "git init failed";
5858
case "yarn-set-version-failed":
5959
return "yarn set version failed";
60-
case "yarn-plugin-import-failed":
61-
return "yarn plugin import failed";
6260
case "set-yarn-linker-failed":
6361
return "failed to set yarn linker";
6462
case "yarn-install-failed":

project/init.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import {writeHuskyConfig} from "../husky/write";
2424
import {writeCommitlintConfig} from "../commitlint/write";
2525
import type {YarnSetVersionFailureReason} from "../yarn/set-version-stable";
2626
import {yarnSetVersionStable} from "../yarn/set-version-stable";
27-
import type {YarnPluginImportFailureReason} from "../yarn/plugin-import-typescript";
28-
import {yarnPluginImportTypeScript} from "../yarn/plugin-import-typescript";
2927
import type {SetYarnLinkerFailureReason} from "../yarn/set-linker-to-node-modules";
3028
import {setYarnLinkerToNodeModules} from "../yarn/set-linker-to-node-modules";
3129
import type {Project} from "./project";
@@ -36,7 +34,6 @@ export type InitFailureReason =
3634
| CommitFailureReason
3735
| GitInitFailureReason
3836
| YarnSetVersionFailureReason
39-
| YarnPluginImportFailureReason
4037
| SetYarnLinkerFailureReason
4138
| YarnInstallFailureReason
4239
| YarnFixFailureReason;
@@ -65,7 +62,6 @@ export default async function init(project: Project): Promise<InitResult> {
6562
.then(async fsStage => commit(project.path, fsStage))
6663
.then(bindAsyncResultFn<InitFailureReason>(async () => gitInit(project)))
6764
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnSetVersionStable(project)))
68-
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnPluginImportTypeScript(project)))
6965
.then(bindAsyncResultFn<InitFailureReason>(async () => setYarnLinkerToNodeModules(project)))
7066
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnInstall(project)))
7167
.then(bindAsyncResultFn<InitFailureReason>(async () => yarnFix(project)));

yarn/plugin-import-typescript.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)