Skip to content

Commit e03b3d2

Browse files
build(deps-dev): bump @biomejs/biome from 2.5.3 to 2.5.4 (#2125)
* build(deps-dev): bump @biomejs/biome from 2.5.3 to 2.5.4 Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.5.3 to 2.5.4. - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.4/packages/@biomejs/biome) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-version: 2.5.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fix: adapt tests to biome 2.5.4 formatting rules (#2125) Biome 2.5.4 changed how curried test.each/it.each/describe.each calls are formatted, reformatting three existing test files. Also suppress a useImportType false positive in the #1833 regression fixture, which intentionally uses a plain (non-`type`) import to test that codegraph still credits type-only consumers of a plain import. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carlos Almeida <contato@carlosalmeida.com> Co-authored-by: carlos-alm <127798846+carlos-alm@users.noreply.github.com>
1 parent 6097f9c commit e03b3d2

5 files changed

Lines changed: 135 additions & 128 deletions

File tree

package-lock.json

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/fixtures/issue-1833-plain-type-import/consumer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// importing type-level declarations this way; codegraph must still credit
44
// Config/Mode as consumed since interfaces/type aliases are erased before
55
// runtime and can never receive a `calls` edge (#1833).
6+
// biome-ignore lint/style/useImportType: intentionally a plain (non-`type`) import — this fixture regression-tests #1833's plain-import-of-type-only-symbols case
67
import { Config, Mode } from './types.js';
78

89
export function useConfig(cfg: Config): Mode {

tests/integration/issue-1778-reflection-dynamic-kind-parity.test.ts

Lines changed: 82 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -106,85 +106,89 @@ async function buildAndReadEdgesTo(
106106
}
107107

108108
describe('#1778: .call/.apply/.bind reflection tagging — engine parity', () => {
109-
it.each(
110-
ENGINES,
111-
)('%s: greet.call(ctx) with NO prior direct call resolves dyn=1 (minimal repro, no dedup collision)', async (engine) => {
112-
// Exactly the issue's own minimal repro: no direct call to `greet` exists
113-
// anywhere, so the dedup-collision path in emitDirectCallEdgesForCall never
114-
// fires — this is the plain, uncomplicated case the #1693 fix wrongly broke.
115-
const edges = await buildAndReadEdgesTo(
116-
{
117-
'index.js': [
118-
'export function greet(name) { return name; }',
119-
"export function runCall(ctx) { return greet.call(ctx, 'world'); }",
120-
'',
121-
].join('\n'),
122-
},
123-
engine,
124-
'greet',
125-
);
126-
expect(edges).toHaveLength(1);
127-
expect(edges[0]).toMatchObject({ source: 'runCall', target: 'greet', confidence: 1 });
128-
expect(edges[0].dynamic).toBe(1);
129-
});
109+
it.each(ENGINES)(
110+
'%s: greet.call(ctx) with NO prior direct call resolves dyn=1 (minimal repro, no dedup collision)',
111+
async (engine) => {
112+
// Exactly the issue's own minimal repro: no direct call to `greet` exists
113+
// anywhere, so the dedup-collision path in emitDirectCallEdgesForCall never
114+
// fires — this is the plain, uncomplicated case the #1693 fix wrongly broke.
115+
const edges = await buildAndReadEdgesTo(
116+
{
117+
'index.js': [
118+
'export function greet(name) { return name; }',
119+
"export function runCall(ctx) { return greet.call(ctx, 'world'); }",
120+
'',
121+
].join('\n'),
122+
},
123+
engine,
124+
'greet',
125+
);
126+
expect(edges).toHaveLength(1);
127+
expect(edges[0]).toMatchObject({ source: 'runCall', target: 'greet', confidence: 1 });
128+
expect(edges[0].dynamic).toBe(1);
129+
},
130+
);
130131

131-
it.each(
132-
ENGINES,
133-
)('%s: direct f() followed by f.call({}) to the same target dedups to a single dyn=0 edge (#1687)', async (engine) => {
134-
// The original #1687 scenario: a direct call and a reflection-style call to
135-
// the SAME target from the SAME caller/scope. Must collapse to ONE edge
136-
// (no double-edge emission) and that edge must be dyn=0, matching native's
137-
// plain first-recorded-wins dedup (the direct call is recorded first, in
138-
// true source order, and the later reflection call must not flip it).
139-
const edges = await buildAndReadEdgesTo(
140-
{ 'index.js': ['function f() {}', 'f();', 'f.call({});', ''].join('\n') },
141-
engine,
142-
'f',
143-
);
144-
expect(edges).toHaveLength(1);
145-
expect(edges[0].dynamic).toBe(0);
146-
});
132+
it.each(ENGINES)(
133+
'%s: direct f() followed by f.call({}) to the same target dedups to a single dyn=0 edge (#1687)',
134+
async (engine) => {
135+
// The original #1687 scenario: a direct call and a reflection-style call to
136+
// the SAME target from the SAME caller/scope. Must collapse to ONE edge
137+
// (no double-edge emission) and that edge must be dyn=0, matching native's
138+
// plain first-recorded-wins dedup (the direct call is recorded first, in
139+
// true source order, and the later reflection call must not flip it).
140+
const edges = await buildAndReadEdgesTo(
141+
{ 'index.js': ['function f() {}', 'f();', 'f.call({});', ''].join('\n') },
142+
engine,
143+
'f',
144+
);
145+
expect(edges).toHaveLength(1);
146+
expect(edges[0].dynamic).toBe(0);
147+
},
148+
);
147149

148-
it.each(
149-
ENGINES,
150-
)('%s: f.call({}) followed by direct f() to the same target dedups to a single dyn=1 edge (reverse-order sanity)', async (engine) => {
151-
// Mirror of the #1687 fixture with the two call sites swapped: the
152-
// reflection call is now genuinely first in source order, so it should win
153-
// the dedup and the later direct call must not downgrade it.
154-
const edges = await buildAndReadEdgesTo(
155-
{ 'index.js': ['function f() {}', 'f.call({});', 'f();', ''].join('\n') },
156-
engine,
157-
'f',
158-
);
159-
expect(edges).toHaveLength(1);
160-
expect(edges[0].dynamic).toBe(1);
161-
});
150+
it.each(ENGINES)(
151+
'%s: f.call({}) followed by direct f() to the same target dedups to a single dyn=1 edge (reverse-order sanity)',
152+
async (engine) => {
153+
// Mirror of the #1687 fixture with the two call sites swapped: the
154+
// reflection call is now genuinely first in source order, so it should win
155+
// the dedup and the later direct call must not downgrade it.
156+
const edges = await buildAndReadEdgesTo(
157+
{ 'index.js': ['function f() {}', 'f.call({});', 'f();', ''].join('\n') },
158+
engine,
159+
'f',
160+
);
161+
expect(edges).toHaveLength(1);
162+
expect(edges[0].dynamic).toBe(1);
163+
},
164+
);
162165

163-
it.each(
164-
ENGINES,
165-
)('%s: bare decorator before call-expression decorator still upgrades to dyn=1 (#1683 regression guard)', async (engine) => {
166-
// Regression guard for the ORIGINAL motivating case of the dynZeroEdgeRows
167-
// upgrade path: the WASM query path collects `@Log()` (dyn=0) before the
168-
// bare `@Log` (dyn=1) despite `@Log` appearing earlier in the source — the
169-
// line-order comparison introduced by #1778's fix must still upgrade this
170-
// to dyn=1, exactly as the pre-#1778 unconditional-upgrade logic did.
171-
const edges = await buildAndReadEdgesTo(
172-
{
173-
'index.ts': [
174-
'export function Log(target: unknown): void {}',
175-
'',
176-
'@Log',
177-
'export class UserController {}',
178-
'',
179-
'@Log()',
180-
'export class OrderController {}',
181-
'',
182-
].join('\n'),
183-
},
184-
engine,
185-
'Log',
186-
);
187-
expect(edges).toHaveLength(1);
188-
expect(edges[0].dynamic).toBe(1);
189-
});
166+
it.each(ENGINES)(
167+
'%s: bare decorator before call-expression decorator still upgrades to dyn=1 (#1683 regression guard)',
168+
async (engine) => {
169+
// Regression guard for the ORIGINAL motivating case of the dynZeroEdgeRows
170+
// upgrade path: the WASM query path collects `@Log()` (dyn=0) before the
171+
// bare `@Log` (dyn=1) despite `@Log` appearing earlier in the source — the
172+
// line-order comparison introduced by #1778's fix must still upgrade this
173+
// to dyn=1, exactly as the pre-#1778 unconditional-upgrade logic did.
174+
const edges = await buildAndReadEdgesTo(
175+
{
176+
'index.ts': [
177+
'export function Log(target: unknown): void {}',
178+
'',
179+
'@Log',
180+
'export class UserController {}',
181+
'',
182+
'@Log()',
183+
'export class OrderController {}',
184+
'',
185+
].join('\n'),
186+
},
187+
engine,
188+
'Log',
189+
);
190+
expect(edges).toHaveLength(1);
191+
expect(edges[0].dynamic).toBe(1);
192+
},
193+
);
190194
});

tests/unit/config.test.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -440,18 +440,17 @@ describe('applyEnvOverrides', () => {
440440
expect(config.llm.provider).toBe('openai');
441441
});
442442

443-
it.each([
444-
'native',
445-
'wasm',
446-
'auto',
447-
] as const)('overrides build.engine from env when set to "%s"', (engine) => {
448-
process.env.CODEGRAPH_ENGINE = engine;
449-
const config = applyEnvOverrides({
450-
llm: { provider: null, model: null, baseUrl: null, apiKey: null },
451-
build: { engine: 'auto', fastSkipDiag: false },
452-
});
453-
expect(config.build.engine).toBe(engine);
454-
});
443+
it.each(['native', 'wasm', 'auto'] as const)(
444+
'overrides build.engine from env when set to "%s"',
445+
(engine) => {
446+
process.env.CODEGRAPH_ENGINE = engine;
447+
const config = applyEnvOverrides({
448+
llm: { provider: null, model: null, baseUrl: null, apiKey: null },
449+
build: { engine: 'auto', fastSkipDiag: false },
450+
});
451+
expect(config.build.engine).toBe(engine);
452+
},
453+
);
455454

456455
it('warns and falls back to "auto" when CODEGRAPH_ENGINE is invalid', () => {
457456
process.env.CODEGRAPH_ENGINE = 'natve';

tests/unit/hook-track-edits-worktree.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ describe('track-edits.sh Windows path normalization', () => {
164164
it.each([
165165
['live hook', HOOK_PATH],
166166
['docs example', DOCS_HOOK_PATH],
167-
])('%s: leaves a POSIX path with a literal backslash in the filename untouched', (_label, hookPath) => {
168-
expect(normalize(hookPath, '/tmp/proj/weird\\name.ts')).toBe('/tmp/proj/weird\\name.ts');
169-
});
167+
])(
168+
'%s: leaves a POSIX path with a literal backslash in the filename untouched',
169+
(_label, hookPath) => {
170+
expect(normalize(hookPath, '/tmp/proj/weird\\name.ts')).toBe('/tmp/proj/weird\\name.ts');
171+
},
172+
);
170173
});

0 commit comments

Comments
 (0)