-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathuninstallPackages.ts
60 lines (55 loc) · 1.22 KB
/
uninstallPackages.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { $ } from "execa";
import { readPackageData, removeDependencies } from "../shared/packages.js";
export async function uninstallPackages(offline: boolean | undefined) {
const packageData = await readPackageData();
await removeDependencies(
[
"@clack/prompts",
"@prettier/sync",
"all-contributors-cli",
"chalk",
"create",
"cspell-populate-words",
"execa",
"git-remote-origin-url",
"git-url-parse",
"input-from-file",
"input-from-file-json",
"js-yaml",
"lazy-value",
"npm-user",
"object-strings-deep",
"octokit",
"octokit-from-auth",
"parse-author",
"parse-package-name",
"populate-all-contributors-for-repository",
"prettier",
"replace-in-file",
"rimraf",
"set-github-repository-labels",
"sort-package-json",
"title-case",
"zod",
"zod-validation-error",
],
packageData.dependencies,
);
await removeDependencies(
[
"@octokit/request-error",
"@types/git-url-parse",
"@types/js-yaml",
"@types/parse-author",
"all-contributors-cli",
"c8",
"create-testers",
"eslint-config-prettier",
"globby",
"tsx",
],
packageData.devDependencies,
"-D",
);
await $`pnpm add prettier -D${offline ? " --offline" : ""}`;
}