mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-08-28 05:25:25 +00:00
fix(group): close missing ); in manifest-extractor include branch
The 'include' branch in ManifestExtractor.resolveSymbol was missing the closing ); for the executor() call, causing a syntax error that broke ESLint, Prettier, and the full test CI on all platforms. Reported by Claude PR review on #1156.
This commit is contained in:
parent
fcc4319ab9
commit
3f5d21c530
3 changed files with 62 additions and 0 deletions
|
|
@ -280,6 +280,7 @@ export class ManifestExtractor {
|
|||
ORDER BY f.filePath ASC
|
||||
LIMIT 1`,
|
||||
{ contract: link.contract },
|
||||
);
|
||||
} else if (link.type === 'custom') {
|
||||
// Workspace extractors produce qualified contracts like "mathlex::Expression".
|
||||
// Graph nodes store the unqualified symbol name ("Expression"), so strip
|
||||
|
|
|
|||
54
gitnexus/test/global-setup.ts
Normal file
54
gitnexus/test/global-setup.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* Vitest globalSetup — runs once in the MAIN process before any forks.
|
||||
*
|
||||
* Creates a single shared LadybugDB with full schema so that forked test
|
||||
* files only need to clear + reseed data instead of recreating the
|
||||
* entire schema each time (~29 DDL queries per file eliminated).
|
||||
*
|
||||
* The dbPath is shared with test files via vitest's provide/inject API.
|
||||
*/
|
||||
import path from 'path';
|
||||
import lbug from '@ladybugdb/core';
|
||||
import type { GlobalSetupContext } from 'vitest/node';
|
||||
import { createTempDir } from './helpers/test-db.js';
|
||||
import {
|
||||
NODE_SCHEMA_QUERIES,
|
||||
REL_SCHEMA_QUERIES,
|
||||
EMBEDDING_SCHEMA,
|
||||
} from '../src/core/lbug/schema.js';
|
||||
|
||||
export default async function setup({ provide }: GlobalSetupContext) {
|
||||
const tmpHandle = await createTempDir('gitnexus-shared-');
|
||||
const dbPath = path.join(tmpHandle.dbPath, 'lbug');
|
||||
|
||||
// Create DB with full schema
|
||||
const db = new lbug.Database(dbPath);
|
||||
const conn = new lbug.Connection(db);
|
||||
|
||||
for (const q of NODE_SCHEMA_QUERIES) {
|
||||
await conn.query(q);
|
||||
}
|
||||
for (const q of REL_SCHEMA_QUERIES) {
|
||||
await conn.query(q);
|
||||
}
|
||||
await conn.query(EMBEDDING_SCHEMA);
|
||||
|
||||
// Pre-install FTS extension so forks don't need to download it
|
||||
try {
|
||||
await conn.query('INSTALL fts');
|
||||
await conn.query('LOAD EXTENSION fts');
|
||||
} catch {
|
||||
// FTS may already be installed system-wide — not fatal
|
||||
}
|
||||
|
||||
await conn.close();
|
||||
await db.close();
|
||||
|
||||
// Share the dbPath with all test files via inject('lbugDbPath')
|
||||
provide('lbugDbPath', dbPath);
|
||||
|
||||
// Teardown: remove temp directory after all tests complete
|
||||
return async () => {
|
||||
await tmpHandle.cleanup();
|
||||
};
|
||||
}
|
||||
7
gitnexus/test/vitest.d.ts
vendored
Normal file
7
gitnexus/test/vitest.d.ts
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import 'vitest';
|
||||
|
||||
declare module 'vitest' {
|
||||
export interface ProvidedContext {
|
||||
lbugDbPath: string;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue