fix(tooling): isolate concurrent repository checks
This commit is contained in:
+8
-14
@@ -6,21 +6,15 @@ import { relative, resolve } from "node:path";
|
|||||||
|
|
||||||
const root = resolve(import.meta.dirname, "..");
|
const root = resolve(import.meta.dirname, "..");
|
||||||
|
|
||||||
// Collect all TS, MJS, and Python source files, excluding generated and third-party dirs.
|
// Native globSync is available throughout the Node versions in package.engines.
|
||||||
const sourceFiles = [
|
// Its exclusion option is `exclude`; `ignore` and `nodir` belong to npm glob.
|
||||||
...globSync("src/**/*.ts", {
|
const sourceFiles = globSync(
|
||||||
|
["src/**/*.ts", "tests/**/*.ts", "scripts/**/*.mjs", "bridge/**/*.py"],
|
||||||
|
{
|
||||||
cwd: root,
|
cwd: root,
|
||||||
nodir: true,
|
exclude: (path) => path.split(/[\\/]/u).includes("node_modules"),
|
||||||
ignore: ["dist/**", "node_modules/**"],
|
},
|
||||||
}),
|
);
|
||||||
...globSync("tests/**/*.ts", {
|
|
||||||
cwd: root,
|
|
||||||
nodir: true,
|
|
||||||
ignore: ["node_modules/**"],
|
|
||||||
}),
|
|
||||||
...globSync("scripts/**/*.mjs", { cwd: root, nodir: true }),
|
|
||||||
...globSync("bridge/**/*.py", { cwd: root, nodir: true }),
|
|
||||||
];
|
|
||||||
|
|
||||||
const patterns = [
|
const patterns = [
|
||||||
{ regex: /TODO(?::\s*(.*))?$/gm, label: "TODO" },
|
{ regex: /TODO(?::\s*(.*))?$/gm, label: "TODO" },
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { tmpdir } from "node:os";
|
||||||
|
import { join } from "node:path";
|
||||||
|
|
||||||
import { defineConfig } from "vitest/config";
|
import { defineConfig } from "vitest/config";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -8,6 +11,10 @@ export default defineConfig({
|
|||||||
coverage: {
|
coverage: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
provider: "v8",
|
provider: "v8",
|
||||||
|
reportsDirectory: join(
|
||||||
|
tmpdir(),
|
||||||
|
`rea-vitest-coverage-${String(process.pid)}`,
|
||||||
|
),
|
||||||
include: ["src/**"],
|
include: ["src/**"],
|
||||||
thresholds: {
|
thresholds: {
|
||||||
statements: 65,
|
statements: 65,
|
||||||
|
|||||||
Reference in New Issue
Block a user