Skip to content

Commit 284b35f

Browse files
committed
chore(gates): retain exact workspace declaration completeness
1 parent fadd2d5 commit 284b35f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎scripts/layering/project-references.test.ts‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ test('the compiled-set predicate is licensed by the tsconfig include/exclude sha
115115
}
116116
});
117117

118-
test('root workspace dependencies name existing packages and exclude the optional Maestro engine', () => {
118+
test('root workspace dependencies cover every non-Maestro package and exclude the optional engine', () => {
119119
const manifest = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package.json'), 'utf8')) as {
120120
dependencies?: Record<string, string>;
121121
devDependencies?: Record<string, string>;
@@ -128,10 +128,16 @@ test('root workspace dependencies name existing packages and exclude the optiona
128128
.map(([name]) => name)
129129
.sort();
130130
const expected = readWorkspacePackages(repoRoot)
131+
.filter((pkg) => pkg.name !== '@agent-device/maestro')
131132
.map((pkg) => pkg.name)
132133
.sort();
133-
for (const name of declared)
134-
assert.ok(expected.includes(name), `Unknown workspace dependency: ${name}`);
134+
assert.deepEqual(
135+
declared,
136+
expected,
137+
'a workspace package the root program consumes must be declared workspace:* in the root ' +
138+
'manifest (its tsconfig references already name it; the root project resolves package ' +
139+
'specifiers through these declarations)',
140+
);
135141
assert.ok(
136142
!declared.includes('@agent-device/maestro'),
137143
'The optional engine must be installed through the plugin store. R11 rejects undeclared imports from core.',

0 commit comments

Comments
 (0)