Skip to content

Commit 0862a93

Browse files
branchseerclaude
andcommitted
fix: add shutdownTracing export to NAPI binding files
The new shutdownTracing() NAPI function needs its export registered in the auto-generated binding files for the snapshot test to pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 452091b commit 0862a93

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/cli/binding/index.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,3 +769,4 @@ module.exports.rewriteImportsInDirectory = nativeBinding.rewriteImportsInDirecto
769769
module.exports.rewriteScripts = nativeBinding.rewriteScripts;
770770
module.exports.run = nativeBinding.run;
771771
module.exports.runCommand = nativeBinding.runCommand;
772+
module.exports.shutdownTracing = nativeBinding.shutdownTracing;

packages/cli/binding/index.d.cts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,13 @@ export declare function rewriteScripts(scriptsJson: string, rulesYaml: string):
267267
*/
268268
export declare function run(options: CliOptions): Promise<number>;
269269

270+
/**
271+
* Flush and drop the tracing guard. Must be called before process.exit()
272+
* because Rust statics in OnceLock are never dropped, and the ChromeLayer
273+
* FlushGuard only writes trace data to disk when dropped.
274+
*/
275+
export declare function shutdownTracing(): void;
276+
270277
/**
271278
* Run a command with fspy tracking, callable from JavaScript.
272279
*

0 commit comments

Comments
 (0)