Skip to content

Commit 988a748

Browse files
coderabbitai[bot]CodeRabbit
andauthored
fix: apply CodeRabbit auto-fixes
Fixed 2 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
1 parent 56ed862 commit 988a748

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"cli.json"
3333
],
3434
"scripts": {
35-
"build": "rm -rf lib && swc src -d lib --strip-leading-paths && bun run typecheck:build && chmod +x lib/bin.js",
36-
"prepublishOnly": "bun run build",
35+
"build": "rm -rf lib && swc src -d lib --strip-leading-paths && npm run typecheck:build && chmod +x lib/bin.js",
36+
"prepublishOnly": "npm run build",
3737
"typecheck": "tsc --noEmit",
3838
"typecheck:build": "tsc -p tsconfig.build.json",
3939
"lint": "bun run typecheck && biome check .",

tests/constants.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ import { describe, expect, it } from 'bun:test';
33
const loadConstantsWithArgv = async (argv1: string) => {
44
const originalArgv = process.argv;
55
process.argv = ['node', argv1];
6-
const url = `../src/utils/constants.ts?t=${Date.now()}_${Math.random()}`;
7-
const mod = await import(url);
8-
process.argv = originalArgv;
9-
return mod;
6+
try {
7+
const url = `../src/utils/constants.ts?t=${Date.now()}_${Math.random()}`;
8+
const mod = await import(url);
9+
return mod;
10+
} finally {
11+
process.argv = originalArgv;
12+
}
1013
};
1114

1215
describe('constants', () => {

0 commit comments

Comments
 (0)