Skip to content

Commit d31dc14

Browse files
TakehiroTadaclaude
andcommitted
feat: upgrade @hey-api/openapi-ts to 0.99.0, TypeScript to 6.0.3, ts-morph to 28
- Recreate the pnpm patch for @hey-api/openapi-ts@0.99.0: the TS2416 on ImplFuncTsDsl.toAst() persists and a second one appeared on ImplForTsDsl.toAst() - Add a pnpm patch for @hey-api/shared@0.5.0, which references the value 'log' as a type (TS2749) — both patches keep skipLibCheck: false working - Add a 'ky' module stub to vendor-typestubs.d.ts for the bundled ky client plugin type declarations - Drop downlevelIteration and baseUrl from tsconfig.json (deprecated in TypeScript 6.0, both unused here) - Allow typescript 5.x || 6.x and require ts-morph 28.x as peer dependencies Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
1 parent b0c732b commit d31dc14

7 files changed

Lines changed: 177 additions & 175 deletions

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"license": "MIT",
4848
"author": "Daiki Urata (@7nohe)",
4949
"dependencies": {
50-
"@hey-api/openapi-ts": "0.92.3",
50+
"@hey-api/openapi-ts": "0.99.0",
5151
"cross-spawn": "^7.0.3"
5252
},
5353
"devDependencies": {
@@ -59,23 +59,24 @@
5959
"commander": "^12.0.0",
6060
"lefthook": "^1.6.10",
6161
"rimraf": "^5.0.5",
62-
"ts-morph": "^27.0.2",
63-
"typescript": "^5.9.3",
62+
"ts-morph": "^28.0.0",
63+
"typescript": "^6.0.3",
6464
"vitest": "^1.5.0"
6565
},
6666
"peerDependencies": {
6767
"commander": "12.x",
68-
"ts-morph": "27.x",
69-
"typescript": "5.x"
68+
"ts-morph": "28.x",
69+
"typescript": "5.x || 6.x"
7070
},
7171
"packageManager": "pnpm@9.6.0",
7272
"engines": {
73-
"node": ">=20.19.0",
73+
"node": ">=22.18.0",
7474
"pnpm": ">=9"
7575
},
7676
"pnpm": {
7777
"patchedDependencies": {
78-
"@hey-api/openapi-ts@0.92.3": "patches/@hey-api__openapi-ts@0.92.3.patch"
78+
"@hey-api/openapi-ts@0.99.0": "patches/@hey-api__openapi-ts@0.99.0.patch",
79+
"@hey-api/shared@0.5.0": "patches/@hey-api__shared@0.5.0.patch"
7980
}
8081
}
8182
}

patches/@hey-api__openapi-ts@0.92.3.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/dist/index.d.mts b/dist/index.d.mts
2+
index f2ca29144731f9320cea459d0e290352e2701e92..4255212e3846fee11fa9dd77a782d5ce1a2e00c9 100644
3+
--- a/dist/index.d.mts
4+
+++ b/dist/index.d.mts
5+
@@ -1475,6 +1475,7 @@ declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$31 {
6+
decl(): FuncTsDsl<'decl'>;
7+
/** Switches the function to a function expression form. */
8+
expr(): FuncTsDsl<'expr'>;
9+
+ // @ts-ignore TS2416 - bundled declaration has incorrect base type TsDsl<ArrowFunction>; conditional return is valid at source level
10+
toAst(): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
11+
$validate(): asserts this;
12+
private missingRequiredCalls;
13+
@@ -1848,6 +1849,7 @@ declare class ImplForTsDsl<M extends ForMode = 'for'> extends Mixed$16 {
14+
of(iterable?: ForIterable): ForTsDsl<'of'>;
15+
/** Sets the update expression (e.g., `i++`). */
16+
update(update: ForIterable): this;
17+
+ // @ts-ignore TS2416 - bundled declaration has incorrect base type TsDsl<ForStatement>; conditional return is valid at source level
18+
toAst(): M extends 'for' ? ts.ForStatement : M extends 'of' ? ts.ForOfStatement : ts.ForInStatement;
19+
$validate(): asserts this is this & {
20+
_iterableOrUpdate: ForIterable;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/dist/index.d.mts b/dist/index.d.mts
2+
index d4f7acfd6f4b0a65b9de871e7bc88a6151c8a520..1fdc18bb747a9dfc56b74e3e69e1e9ce3275ca85 100644
3+
--- a/dist/index.d.mts
4+
+++ b/dist/index.d.mts
5+
@@ -3190,6 +3190,7 @@ declare function definePluginConfig<T extends Plugin.Types>(pluginConfig: Plugin
6+
plugin: PluginInstance<T>;
7+
}) => void;
8+
imports?: ((plugin: PluginInstance<T>) => T["imports"]) | undefined;
9+
+ // @ts-ignore TS2749 - bundled declaration references value 'log' as a type; upstream typing bug
10+
symbolMeta?: (symbol: Omit<log, "name">) => log;
11+
tags?: ReadonlyArray<PluginTag>;
12+
};

0 commit comments

Comments
 (0)