Skip to content

Commit 73345ed

Browse files
committed
fix
1 parent 08f87a4 commit 73345ed

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

.github/bin/list-workspaces/list-workspaces.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { getFiles } from '../util/get-files.mjs';
33
import fs, { promises as fsp } from 'fs';
44
import { toposort } from '../util/toposort.mjs';
55

6+
const p = (path.posix ?? path);
7+
68
export async function listWorkspaces() {
79
try {
810
const rootPackageJSON = JSON.parse(await fsp.readFile('package.json'));
@@ -14,12 +16,12 @@ export async function listWorkspaces() {
1416
const packageDirs = await getFiles(workspace.slice(0, -2), false);
1517
for (const packageDir of packageDirs) {
1618
packages.add(
17-
path.resolve((path.posix ?? path).join(packageDir, 'package.json'))
19+
p.resolve(p.join(packageDir, 'package.json'))
1820
);
1921
}
2022
} else {
2123
packages.add(
22-
path.resolve((path.posix ?? path).join(workspace, 'package.json'))
24+
p.resolve(p.join(workspace, 'package.json'))
2325
);
2426
}
2527
}
@@ -34,9 +36,7 @@ export async function listWorkspaces() {
3436

3537
for (const packageJSONPath of Array.from(packages)) {
3638
const packageJSON = JSON.parse(await fsp.readFile(packageJSONPath));
37-
const packagePath = path.relative(process.cwd(), path.dirname(packageJSONPath));
38-
39-
console.error('workspace', packagePath);
39+
const packagePath = p.relative(process.cwd(), p.dirname(packageJSONPath));
4040

4141
result.push({
4242
path: packagePath,

.github/bin/modified-workspaces/modified-workspaces.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export async function listModifiedWorkspaces() {
6767

6868
let isNonWorkspaceFile = true;
6969
for (const workspace of workspaces) {
70-
console.error('workspace', workspace.path);
7170
if (modifiedFile.startsWith(workspace.path)) {
7271
isNonWorkspaceFile = false;
7372

0 commit comments

Comments
 (0)