complete-cli 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import { assertObject, repeat } from "complete-common";
|
|
3
|
-
import { $q, copyFileOrDirectory, formatWithPrettier, getFileNamesInDirectory, getPackageJSON, getPackageManagerInstallCICommand, getPackageManagerInstallCommand, isFile, makeDirectory, readFile, renameFile, updatePackageJSONDependencies, writeFile, writeFileAsync, } from "complete-node";
|
|
3
|
+
import { $q, copyFileOrDirectory, formatWithPrettier, getFileNamesInDirectory, getPackageJSON, getPackageManagerInstallCICommand, getPackageManagerInstallCommand, isFile, makeDirectory, PackageManager, readFile, renameFile, updatePackageJSONDependencies, writeFile, writeFileAsync, } from "complete-node";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { ACTION_YML, ACTION_YML_TEMPLATE_PATH, TEMPLATES_DYNAMIC_DIR, TEMPLATES_STATIC_DIR, } from "../../constants.js";
|
|
6
6
|
import { initGitRepository } from "../../git.js";
|
|
@@ -12,6 +12,7 @@ export async function createProject(projectName, authorName, projectPath, create
|
|
|
12
12
|
}
|
|
13
13
|
copyStaticFiles(projectPath);
|
|
14
14
|
copyDynamicFiles(projectName, authorName, projectPath, packageManager);
|
|
15
|
+
copyPackageManagerSpecificFiles(projectPath, packageManager);
|
|
15
16
|
// There is no package manager lock files yet, so we have to pass "false" to this function.
|
|
16
17
|
const updated = await updatePackageJSONDependencies(projectPath, false, true);
|
|
17
18
|
if (!updated) {
|
|
@@ -110,8 +111,17 @@ function copyDynamicFiles(projectName, authorName, projectPath, packageManager)
|
|
|
110
111
|
const destinationPath = path.join(projectPath, "README.md");
|
|
111
112
|
writeFile(destinationPath, readmeMD);
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
}
|
|
115
|
+
function copyPackageManagerSpecificFiles(projectPath, packageManager) {
|
|
116
|
+
if (packageManager === PackageManager.pnpm) {
|
|
117
|
+
// `pnpm` requires the `shamefully-hoist` option to be enabled for "complete-lint" to work
|
|
118
|
+
// correctly.
|
|
119
|
+
const npmrc = `save-exact=true
|
|
120
|
+
shamefully-hoist=true
|
|
121
|
+
`;
|
|
122
|
+
const npmrcPath = path.join(projectPath, ".npmrc");
|
|
123
|
+
writeFile(npmrcPath, npmrc);
|
|
124
|
+
}
|
|
115
125
|
}
|
|
116
126
|
async function revertVersionsInPackageJSON(projectPath) {
|
|
117
127
|
const packageJSONPath = path.join(projectPath, "package.json");
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
// eslint-disable-next-line complete/require-capital-const-assertions
|
|
2
|
-
export const LOCKED_DEPENDENCIES = [
|
|
3
|
-
{
|
|
4
|
-
name: "typescript",
|
|
5
|
-
version: "5.7.3",
|
|
6
|
-
reason: "https://github.com/typescript-eslint/typescript-eslint/issues/10884",
|
|
7
|
-
},
|
|
8
|
-
];
|
|
2
|
+
export const LOCKED_DEPENDENCIES = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "complete-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"description": "A command line tool for bootstrapping TypeScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"chalk": "5.4.1",
|
|
39
39
|
"clipanion": "4.0.0-rc.4",
|
|
40
40
|
"complete-common": "1.3.0",
|
|
41
|
-
"complete-node": "5.
|
|
41
|
+
"complete-node": "5.1.1",
|
|
42
42
|
"klaw-sync": "6.0.0",
|
|
43
43
|
"yaml": "2.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/klaw-sync": "6.0.5",
|
|
47
|
-
"@types/node": "22.13.
|
|
47
|
+
"@types/node": "22.13.9",
|
|
48
48
|
"glob": "11.0.1",
|
|
49
49
|
"ts-loader": "9.5.2",
|
|
50
50
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
51
|
-
"typescript": "5.
|
|
52
|
-
"typescript-eslint": "8.
|
|
51
|
+
"typescript": "5.8.2",
|
|
52
|
+
"typescript-eslint": "8.26.0",
|
|
53
53
|
"webpack": "5.98.0",
|
|
54
54
|
"webpack-cli": "6.0.1",
|
|
55
55
|
"webpack-shebang-plugin": "1.1.8"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import { assertObject, repeat } from "complete-common";
|
|
3
|
-
import type { PackageManager } from "complete-node";
|
|
4
3
|
import {
|
|
5
4
|
$q,
|
|
6
5
|
copyFileOrDirectory,
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
getPackageManagerInstallCommand,
|
|
12
11
|
isFile,
|
|
13
12
|
makeDirectory,
|
|
13
|
+
PackageManager,
|
|
14
14
|
readFile,
|
|
15
15
|
renameFile,
|
|
16
16
|
updatePackageJSONDependencies,
|
|
@@ -43,6 +43,7 @@ export async function createProject(
|
|
|
43
43
|
|
|
44
44
|
copyStaticFiles(projectPath);
|
|
45
45
|
copyDynamicFiles(projectName, authorName, projectPath, packageManager);
|
|
46
|
+
copyPackageManagerSpecificFiles(projectPath, packageManager);
|
|
46
47
|
|
|
47
48
|
// There is no package manager lock files yet, so we have to pass "false" to this function.
|
|
48
49
|
const updated = await updatePackageJSONDependencies(projectPath, false, true);
|
|
@@ -178,9 +179,21 @@ function copyDynamicFiles(
|
|
|
178
179
|
const destinationPath = path.join(projectPath, "README.md");
|
|
179
180
|
writeFile(destinationPath, readmeMD);
|
|
180
181
|
}
|
|
182
|
+
}
|
|
181
183
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
function copyPackageManagerSpecificFiles(
|
|
185
|
+
projectPath: string,
|
|
186
|
+
packageManager: PackageManager,
|
|
187
|
+
) {
|
|
188
|
+
if (packageManager === PackageManager.pnpm) {
|
|
189
|
+
// `pnpm` requires the `shamefully-hoist` option to be enabled for "complete-lint" to work
|
|
190
|
+
// correctly.
|
|
191
|
+
const npmrc = `save-exact=true
|
|
192
|
+
shamefully-hoist=true
|
|
193
|
+
`;
|
|
194
|
+
const npmrcPath = path.join(projectPath, ".npmrc");
|
|
195
|
+
writeFile(npmrcPath, npmrc);
|
|
196
|
+
}
|
|
184
197
|
}
|
|
185
198
|
|
|
186
199
|
async function revertVersionsInPackageJSON(projectPath: string) {
|
|
@@ -5,11 +5,4 @@ interface LockedDependency {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line complete/require-capital-const-assertions
|
|
8
|
-
export const LOCKED_DEPENDENCIES: readonly LockedDependency[] = [
|
|
9
|
-
{
|
|
10
|
-
name: "typescript",
|
|
11
|
-
version: "5.7.3",
|
|
12
|
-
reason:
|
|
13
|
-
"https://github.com/typescript-eslint/typescript-eslint/issues/10884",
|
|
14
|
-
},
|
|
15
|
-
];
|
|
8
|
+
export const LOCKED_DEPENDENCIES: readonly LockedDependency[] = [];
|