Merge branch 'master' into ai/issue-34
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
2026-10-14 17:56:13 +00:00
3 changed files with 42 additions and 27 deletions

View File

@@ -112,6 +112,38 @@ test("the test workflow runs the suite through pnpm", () => {
assert.match(read(".gitea", "workflows", "test.yml"), /corepack pnpm test/);
});
// Syndria98/dragonroll#33: PM2 and its `ecosystem.config.js` are gone. It started backend and frontend
// with `npm start`, a script neither package defines; production runs from the compose images (the `CMD`
// of each Dockerfile) and every dev process is started together by `pnpm dev`, checked above. These
// checks keep the PM2 ecosystem from creeping back in.
test("PM2 plays no part in running the monorepo", () => {
const ecosystems = [
"ecosystem.config.js",
"ecosystem.config.cjs",
"ecosystem.config.json",
"ecosystem.json",
].filter((file) => fs.existsSync(path.join(root, file)));
assert.deepEqual(ecosystems, [], `no PM2 ecosystem file may exist, found ${ecosystems.join(", ")}`);
const manifests = [[null, rootManifest], ...apps.map((pkg) => [pkg, packageJsonOf(pkg)])];
for (const [pkg, manifest] of manifests) {
const dependencies = { ...manifest.dependencies, ...manifest.devDependencies, ...manifest.optionalDependencies };
assert.ok(!dependencies.pm2, `${pkg ?? "the workspace root"} must not depend on pm2`);
}
// Neither the images nor the workflows nor compose may fall back to PM2.
const runbooks = [
".gitea/workflows/deploy.yml",
".gitea/workflows/test.yml",
"docker-compose.yml",
...apps.map((pkg) => `${pkg}/Dockerfile`),
];
for (const file of runbooks) {
const text = read(...file.split("/"));
assert.ok(!/\bpm2\b|ecosystem\.config/i.test(text), `${file} must not mention PM2`);
}
});
test("the workspace allows the dependencies that build native binaries to run their scripts", () => {
// pnpm skips install scripts of dependencies by default; the frontend build needs these two to
// place their native binary.