@backstage/repo-tools 0.15.2-next.1 → 0.15.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @backstage/repo-tools
|
|
2
2
|
|
|
3
|
+
## 0.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 133ac7a: Fixed knip-reports command failing when workspace path contains spaces and process termination issues by replacing `execFile` with `spawn` and removing `shell` option.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/config-loader@1.10.3
|
|
10
|
+
- @backstage/backend-plugin-api@1.4.3
|
|
11
|
+
|
|
3
12
|
## 0.15.2-next.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -82,16 +82,20 @@ async function handlePackage({
|
|
|
82
82
|
const run = util.createBinRunner(paths.paths.targetRoot, "");
|
|
83
83
|
let report = await run(
|
|
84
84
|
`${knipDir}/knip.js`,
|
|
85
|
-
|
|
85
|
+
"-W",
|
|
86
86
|
// Run the desired workspace
|
|
87
|
-
|
|
87
|
+
packageDir,
|
|
88
|
+
"--config",
|
|
89
|
+
"knip.json",
|
|
88
90
|
"--no-exit-code",
|
|
89
91
|
// Removing this will end the process in case there are findings by knip
|
|
90
92
|
"--no-progress",
|
|
91
93
|
// Remove unnecessary debugging from output
|
|
92
94
|
// TODO: Add more checks when dependencies start to look ok, see https://knip.dev/reference/cli#--include
|
|
93
|
-
"--include
|
|
94
|
-
"
|
|
95
|
+
"--include",
|
|
96
|
+
"dependencies,unlisted",
|
|
97
|
+
"--reporter",
|
|
98
|
+
"markdown"
|
|
95
99
|
);
|
|
96
100
|
report = report.replaceAll(`| ${packageDir}/`, "| ");
|
|
97
101
|
report = report.replaceAll(
|
|
@@ -13,27 +13,39 @@ const limiter = pLimit__default.default(os__default.default.cpus().length);
|
|
|
13
13
|
function createBinRunner(cwd, path) {
|
|
14
14
|
return async (...command) => limiter(
|
|
15
15
|
() => new Promise((resolve, reject) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
const args = path ? [path, ...command] : command;
|
|
17
|
+
const child = child_process.spawn("node", args, {
|
|
18
|
+
cwd,
|
|
19
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
20
|
+
});
|
|
21
|
+
let stdout = "";
|
|
22
|
+
let stderr = "";
|
|
23
|
+
child.stdout?.on("data", (data) => {
|
|
24
|
+
stdout += data.toString();
|
|
25
|
+
});
|
|
26
|
+
child.stderr?.on("data", (data) => {
|
|
27
|
+
stderr += data.toString();
|
|
28
|
+
});
|
|
29
|
+
child.on("error", (err) => {
|
|
30
|
+
reject(new Error(`Process error: ${err.message}`));
|
|
31
|
+
});
|
|
32
|
+
child.on("close", (code, signal) => {
|
|
33
|
+
if (signal) {
|
|
34
|
+
reject(
|
|
35
|
+
new Error(
|
|
36
|
+
`Process was killed with signal ${signal}
|
|
37
|
+
${stderr}`
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
} else if (code !== 0) {
|
|
41
|
+
reject(new Error(`Process exited with code ${code}
|
|
29
42
|
${stderr}`));
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
43
|
+
} else if (stderr.trim()) {
|
|
44
|
+
reject(new Error(`Command printed error output: ${stderr}`));
|
|
45
|
+
} else {
|
|
46
|
+
resolve(stdout);
|
|
35
47
|
}
|
|
36
|
-
);
|
|
48
|
+
});
|
|
37
49
|
})
|
|
38
50
|
);
|
|
39
51
|
}
|
package/dist/package.json.cjs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/repo-tools",
|
|
3
|
-
"version": "0.15.2
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "CLI for Backstage repo tooling ",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "cli"
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
45
45
|
"@apisyouwonthate/style-guide": "^1.4.0",
|
|
46
|
-
"@backstage/backend-plugin-api": "1.4.3
|
|
47
|
-
"@backstage/catalog-model": "1.7.5",
|
|
48
|
-
"@backstage/cli-common": "0.1.15",
|
|
49
|
-
"@backstage/cli-node": "0.2.14",
|
|
50
|
-
"@backstage/config-loader": "1.10.3
|
|
51
|
-
"@backstage/errors": "1.2.7",
|
|
46
|
+
"@backstage/backend-plugin-api": "^1.4.3",
|
|
47
|
+
"@backstage/catalog-model": "^1.7.5",
|
|
48
|
+
"@backstage/cli-common": "^0.1.15",
|
|
49
|
+
"@backstage/cli-node": "^0.2.14",
|
|
50
|
+
"@backstage/config-loader": "^1.10.3",
|
|
51
|
+
"@backstage/errors": "^1.2.7",
|
|
52
52
|
"@electric-sql/pglite": "^0.3.0",
|
|
53
53
|
"@manypkg/get-packages": "^1.1.3",
|
|
54
54
|
"@microsoft/api-documenter": "^7.25.7",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"zod": "^3.22.4"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@backstage/backend-test-utils": "1.9.0
|
|
90
|
-
"@backstage/cli": "0.34.2
|
|
91
|
-
"@backstage/types": "1.2.
|
|
89
|
+
"@backstage/backend-test-utils": "^1.9.0",
|
|
90
|
+
"@backstage/cli": "^0.34.2",
|
|
91
|
+
"@backstage/types": "^1.2.2",
|
|
92
92
|
"@types/is-glob": "^4.0.2",
|
|
93
93
|
"@types/node": "^20.16.0",
|
|
94
94
|
"@types/prettier": "^2.0.0",
|