mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
fix(clean): remove native build state (review round 3)
This commit is contained in:
@@ -60,16 +60,18 @@ describe('RepositoryCleaner', () => {
|
||||
expect(existsSync(join(root, 'products/shell/lib'))).toBe(true)
|
||||
})
|
||||
|
||||
it('removes the native Landlock entry output that emits directly to lib', async () => {
|
||||
it('removes the native Landlock entry output and solution build info', async () => {
|
||||
const root = fixture()
|
||||
const entry = 'native/landlock-run/packages/entry'
|
||||
addProject(root, entry, 'lib')
|
||||
write(join(root, entry, 'lib/index.js'))
|
||||
write(join(root, 'native/landlock-run/tsconfig.tsbuildinfo'))
|
||||
|
||||
await new RepositoryCleaner(root).clean()
|
||||
|
||||
expect(existsSync(join(root, entry, 'lib'))).toBe(false)
|
||||
expect(existsSync(join(root, entry, 'src/index.ts'))).toBe(true)
|
||||
expect(existsSync(join(root, 'native/landlock-run/tsconfig.tsbuildinfo'))).toBe(false)
|
||||
})
|
||||
|
||||
it('refuses project outputs reached through a symlink outside the repository', async () => {
|
||||
|
||||
@@ -72,6 +72,11 @@ export class RepositoryCleaner {
|
||||
for (const entry of await readdir(this.root, { withFileTypes: true })) {
|
||||
if (entry.isFile() && entry.name.endsWith('.tsbuildinfo')) targets.add(join(this.root, entry.name))
|
||||
}
|
||||
await this.addIfPresent(
|
||||
targets,
|
||||
join(this.root, 'native/landlock-run/tsconfig.tsbuildinfo'),
|
||||
canonicalRoot,
|
||||
)
|
||||
|
||||
// The root project-reference graph is the source of truth for live build targets.
|
||||
// Each emitting project declares lib/types as outDir; its parent lib also owns
|
||||
|
||||
Reference in New Issue
Block a user