Skip to content

Commit 0e8385f

Browse files
authored
fix: flaky tests due to corepack concurrency on Windows (#39)
1 parent 8495423 commit 0e8385f

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/createTarball.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@ export async function createTarball(
4343
nodeOptions: {
4444
cwd: root,
4545
},
46+
throwOnError: true,
4647
});
4748

4849
return {
4950
path: tarballPath,
5051
async [Symbol.asyncDispose]() {
51-
return fs.unlink(tarballPath);
52+
try {
53+
await fs.unlink(tarballPath);
54+
} catch {
55+
// ignore unlink errors to avoid masking original errors
56+
}
5257
},
5358
};
5459
}

test/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"files": [
77
"src/*"
88
],
9-
"packageManager": "npm@10.9.3"
9+
"packageManager": "npm@10.9.8+sha512.7d8c1be8e0d298792aac9410682c58dccda53dffe6a600bb8a4d074b3cc8c06e421ad69b469e1b36a8a46adbc2a13e366f920d412aae7551f447bc95982f6156"
1010
}

test/pnpm-workspace/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"files": [
77
"src/*"
88
],
9-
"packageManager": "pnpm@10.14.0"
9+
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319"
1010
}

test/pnpm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"files": [
77
"src/*"
88
],
9-
"packageManager": "pnpm@10.14.0"
9+
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319"
1010
}

0 commit comments

Comments
 (0)