mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
feat: add TypeScript typecheck\
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"@biomejs/biome": "^2.4.8",
|
||||
"@types/bun": "^1.3.10",
|
||||
"@types/node": "^25.5.0",
|
||||
"typescript": "^5.9.3",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -49,6 +50,8 @@
|
||||
|
||||
"commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
|
||||
|
||||
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
||||
|
||||
"undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
|
||||
|
||||
"zod": ["zod@4.1.8", "", {}, "sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ=="],
|
||||
|
||||
+4
-2
@@ -25,7 +25,8 @@
|
||||
"setup": "bash ./scripts/setup.sh",
|
||||
"lint": "biome check .",
|
||||
"lint:fix": "biome check . --fix",
|
||||
"format": "biome format . --write"
|
||||
"format": "biome format . --write",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^5.3.0",
|
||||
@@ -35,7 +36,8 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.4.8",
|
||||
"@types/bun": "^1.3.10",
|
||||
"@types/node": "^25.5.0"
|
||||
"@types/node": "^25.5.0",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"keywords": [
|
||||
"opencode",
|
||||
|
||||
+4
-12
@@ -149,14 +149,13 @@ describe("closeMultiModel", () => {
|
||||
// Freeze timestamp for deterministic tag name
|
||||
const fixedDate = new Date("2023-01-01T00:00:00.000Z");
|
||||
const OriginalDate = Date;
|
||||
// @ts-expect-error
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
override toISOString() {
|
||||
return "2023-01-01T00:00:00.000Z";
|
||||
}
|
||||
} as any;
|
||||
@@ -167,7 +166,6 @@ describe("closeMultiModel", () => {
|
||||
force: true,
|
||||
});
|
||||
// Restore Date
|
||||
// @ts-expect-error
|
||||
global.Date = OriginalDate;
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
@@ -241,14 +239,13 @@ describe("closeMultiModel", () => {
|
||||
// Freeze timestamp for deterministic tag name
|
||||
const fixedDate = new Date("2023-01-01T00:00:00.000Z");
|
||||
const OriginalDate = Date;
|
||||
// @ts-expect-error
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
override toISOString() {
|
||||
return "2023-01-01T00:00:00.000Z";
|
||||
}
|
||||
} as any;
|
||||
@@ -260,7 +257,6 @@ describe("closeMultiModel", () => {
|
||||
});
|
||||
|
||||
// Restore Date after invocation
|
||||
// @ts-expect-error
|
||||
global.Date = OriginalDate;
|
||||
|
||||
// Verify result indicates successful cleanup
|
||||
@@ -308,14 +304,13 @@ describe("closeMultiModel", () => {
|
||||
// Tag command will fail
|
||||
const fixedDate = new Date("2023-01-01T00:00:00.000Z");
|
||||
const OriginalDate = Date;
|
||||
// @ts-expect-error
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
override toISOString() {
|
||||
return "2023-01-01T00:00:00.000Z";
|
||||
}
|
||||
} as any;
|
||||
@@ -332,7 +327,6 @@ describe("closeMultiModel", () => {
|
||||
force: true,
|
||||
});
|
||||
// Restore Date
|
||||
// @ts-expect-error
|
||||
global.Date = OriginalDate;
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
@@ -374,14 +368,13 @@ describe("closeMultiModel", () => {
|
||||
// Freeze timestamp for deterministic tag name
|
||||
const fixedDate = new Date("2023-01-01T00:00:00.000Z");
|
||||
const OriginalDate = Date;
|
||||
// @ts-expect-error
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
override toISOString() {
|
||||
return "2023-01-01T00:00:00.000Z";
|
||||
}
|
||||
} as any;
|
||||
@@ -392,7 +385,6 @@ describe("closeMultiModel", () => {
|
||||
force: true,
|
||||
});
|
||||
// Restore Date
|
||||
// @ts-expect-error
|
||||
global.Date = OriginalDate;
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user