fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: remove TypeScript from peer dependencies

Lubos b5f1e4b5 236360b0

+63 -61
+5
.changeset/common-results-kneel.md
··· 1 + --- 2 + "@hey-api/codegen-core": patch 3 + --- 4 + 5 + **internal**: remove TypeScript from peer dependencies
+5
.changeset/fruity-adults-invite.md
··· 1 + --- 2 + "@hey-api/shared": patch 3 + --- 4 + 5 + **internal**: remove TypeScript from peer dependencies
+5
.changeset/rude-games-poke.md
··· 1 + --- 2 + "@hey-api/types": patch 3 + --- 4 + 5 + **internal**: remove TypeScript from peer dependencies
-3
packages/codegen-core/package.json
··· 56 56 "eslint": "9.39.1", 57 57 "typescript": "5.9.3" 58 58 }, 59 - "peerDependencies": { 60 - "typescript": ">=5.5.3" 61 - }, 62 59 "engines": { 63 60 "node": ">=20.19.0" 64 61 }
-3
packages/openapi-python/package.json
··· 73 73 "typescript": "5.9.3", 74 74 "yaml": "2.8.2" 75 75 }, 76 - "peerDependencies": { 77 - "typescript": ">=5.5.3" 78 - }, 79 76 "engines": { 80 77 "node": ">=20.19.0" 81 78 }
+2 -1
packages/openapi-ts/package.json
··· 75 75 "@hey-api/types": "workspace:*", 76 76 "ansi-colors": "4.1.3", 77 77 "color-support": "1.1.3", 78 - "commander": "14.0.3" 78 + "commander": "14.0.3", 79 + "get-tsconfig": "4.13.6" 79 80 }, 80 81 "devDependencies": { 81 82 "@angular/common": "21.1.2",
+23 -6
packages/openapi-ts/src/config/output/config.ts
··· 3 3 4 4 import { log } from '@hey-api/codegen-core'; 5 5 import type { PostProcessor, UserPostProcessor } from '@hey-api/shared'; 6 - import { findTsConfigPath, loadTsConfig, resolveSource, valueToObject } from '@hey-api/shared'; 6 + import { findTsConfigPath, resolveSource, valueToObject } from '@hey-api/shared'; 7 7 import type { MaybeArray } from '@hey-api/types'; 8 - import ts from 'typescript'; 8 + import type { TsConfigJsonResolved } from 'get-tsconfig'; 9 + import { parseTsconfig } from 'get-tsconfig'; 9 10 10 11 import { postProcessors } from './postprocess'; 11 12 import type { Output, UserOutput } from './types'; ··· 64 65 output.tsConfig = loadTsConfig(findTsConfigPath(__dirname, output.tsConfigPath)); 65 66 if ( 66 67 output.importFileExtension === undefined && 67 - (output.tsConfig?.options.moduleResolution === ts.ModuleResolutionKind.NodeNext || 68 - output.tsConfig?.options.moduleResolution === ts.ModuleResolutionKind.Node16 || 69 - output.tsConfig?.options.module === ts.ModuleKind.NodeNext || 70 - output.tsConfig?.options.module === ts.ModuleKind.Node16) 68 + (output.tsConfig?.compilerOptions?.moduleResolution === 'nodenext' || 69 + output.tsConfig?.compilerOptions?.moduleResolution === 'NodeNext' || 70 + output.tsConfig?.compilerOptions?.moduleResolution === 'node16' || 71 + output.tsConfig?.compilerOptions?.moduleResolution === 'Node16' || 72 + output.tsConfig?.compilerOptions?.module === 'nodenext' || 73 + output.tsConfig?.compilerOptions?.module === 'NodeNext' || 74 + output.tsConfig?.compilerOptions?.module === 'node16' || 75 + output.tsConfig?.compilerOptions?.module === 'Node16') 71 76 ) { 72 77 output.importFileExtension = '.js'; 73 78 } ··· 134 139 }; 135 140 }); 136 141 } 142 + 143 + function loadTsConfig(configPath: string | null): TsConfigJsonResolved | null { 144 + if (!configPath) { 145 + return null; 146 + } 147 + 148 + try { 149 + return parseTsconfig(configPath); 150 + } catch { 151 + throw new Error(`Couldn't read tsconfig from path: ${configPath}`); 152 + } 153 + }
+2 -2
packages/openapi-ts/src/config/output/types.ts
··· 1 1 import type { BaseOutput, BaseUserOutput, UserPostProcessor } from '@hey-api/shared'; 2 2 import type { AnyString } from '@hey-api/types'; 3 - import type ts from 'typescript'; 3 + import type { TsConfigJsonResolved } from 'get-tsconfig'; 4 4 5 5 import type { Formatters, Linters, PostProcessorPreset } from './postprocess'; 6 6 ··· 85 85 * The parsed TypeScript configuration used to generate the output. 86 86 * If no `tsconfig` file path was provided or found, this will be `null`. 87 87 */ 88 - tsConfig: ts.ParsedCommandLine | null; 88 + tsConfig: TsConfigJsonResolved | null; 89 89 /** 90 90 * Relative or absolute path to the tsconfig file we should use to 91 91 * generate the output. If a path to tsconfig file is not provided, we
-3
packages/shared/package.json
··· 56 56 "typescript": "5.9.3", 57 57 "yaml": "2.8.2" 58 58 }, 59 - "peerDependencies": { 60 - "typescript": ">=5.5.3" 61 - }, 62 59 "engines": { 63 60 "node": ">=20.19.0" 64 61 }
+1 -1
packages/shared/src/index.ts
··· 117 117 PluginContext, 118 118 PluginNames, 119 119 } from './plugins/types'; 120 - export { findPackageJson, findTsConfigPath, loadPackageJson, loadTsConfig } from './tsConfig'; 120 + export { findPackageJson, findTsConfigPath, loadPackageJson } from './tsConfig'; 121 121 export type { Logs } from './types/logs'; 122 122 export type { WatchValues } from './types/watch'; 123 123 export { escapeComment } from './utils/escape';
-15
packages/shared/src/tsConfig.ts
··· 2 2 import path from 'node:path'; 3 3 4 4 import type { AnyString } from '@hey-api/types'; 5 - import ts from 'typescript'; 6 5 7 6 export function findPackageJson(initialDir: string): unknown | undefined { 8 7 let dir = initialDir; ··· 96 95 97 96 return null; 98 97 } 99 - 100 - export function loadTsConfig(configPath: string | null): ts.ParsedCommandLine | null { 101 - if (!configPath) { 102 - return null; 103 - } 104 - 105 - const raw = ts.readConfigFile(configPath, ts.sys.readFile); 106 - 107 - if (raw.error) { 108 - throw new Error(`Couldn't read tsconfig from path: ${configPath}`); 109 - } 110 - 111 - return ts.parseJsonConfigFileContent(raw.config, ts.sys, path.dirname(configPath)); 112 - }
-3
packages/types/package.json
··· 30 30 }, 31 31 "devDependencies": { 32 32 "typescript": "5.9.3" 33 - }, 34 - "peerDependencies": { 35 - "typescript": ">=5.5.3" 36 33 } 37 34 }
+20 -24
pnpm-lock.yaml
··· 1356 1356 commander: 1357 1357 specifier: 14.0.3 1358 1358 version: 14.0.3 1359 + get-tsconfig: 1360 + specifier: 4.13.6 1361 + version: 4.13.6 1359 1362 devDependencies: 1360 1363 '@angular/common': 1361 1364 specifier: 21.1.2 ··· 10163 10166 resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} 10164 10167 engines: {node: '>= 0.4'} 10165 10168 10166 - get-tsconfig@4.10.1: 10167 - resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==} 10168 - 10169 - get-tsconfig@4.13.0: 10170 - resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==} 10169 + get-tsconfig@4.13.6: 10170 + resolution: {integrity: sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==} 10171 10171 10172 10172 giget@1.2.5: 10173 10173 resolution: {integrity: sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==} ··· 15563 15563 dependencies: 15564 15564 '@ampproject/remapping': 2.3.0 15565 15565 '@angular-devkit/architect': 0.2101.2(chokidar@5.0.0) 15566 - '@angular-devkit/build-webpack': 0.2101.2(chokidar@5.0.0)(webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)))(webpack@5.104.1(esbuild@0.27.2)) 15566 + '@angular-devkit/build-webpack': 0.2101.2(chokidar@5.0.0)(webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1))(webpack@5.104.1(esbuild@0.27.2)) 15567 15567 '@angular-devkit/core': 21.1.2(chokidar@5.0.0) 15568 15568 '@angular/build': 21.1.2(a73756e6d925d6a2ce3b9f3b3e1fe266) 15569 15569 '@angular/compiler-cli': 21.1.2(@angular/compiler@21.1.2)(typescript@5.9.3) ··· 15613 15613 tslib: 2.8.1 15614 15614 typescript: 5.9.3 15615 15615 webpack: 5.104.1(esbuild@0.27.2) 15616 - webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)) 15617 - webpack-dev-server: 5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)) 15616 + webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.104.1) 15617 + webpack-dev-server: 5.2.2(tslib@2.8.1)(webpack@5.104.1) 15618 15618 webpack-merge: 6.0.1 15619 15619 webpack-subresource-integrity: 5.1.0(webpack@5.104.1(esbuild@0.27.2)) 15620 15620 optionalDependencies: ··· 15652 15652 dependencies: 15653 15653 '@ampproject/remapping': 2.3.0 15654 15654 '@angular-devkit/architect': 0.2101.2(chokidar@5.0.0) 15655 - '@angular-devkit/build-webpack': 0.2101.2(chokidar@5.0.0)(webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)))(webpack@5.104.1(esbuild@0.27.2)) 15655 + '@angular-devkit/build-webpack': 0.2101.2(chokidar@5.0.0)(webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1))(webpack@5.104.1(esbuild@0.27.2)) 15656 15656 '@angular-devkit/core': 21.1.2(chokidar@5.0.0) 15657 15657 '@angular/build': 21.1.2(13c6cf4e4b76000cae827571b33755bd) 15658 15658 '@angular/compiler-cli': 21.1.2(@angular/compiler@21.1.2)(typescript@5.9.3) ··· 15702 15702 tslib: 2.8.1 15703 15703 typescript: 5.9.3 15704 15704 webpack: 5.104.1(esbuild@0.27.2) 15705 - webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)) 15706 - webpack-dev-server: 5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)) 15705 + webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.104.1) 15706 + webpack-dev-server: 5.2.2(tslib@2.8.1)(webpack@5.104.1) 15707 15707 webpack-merge: 6.0.1 15708 15708 webpack-subresource-integrity: 5.1.0(webpack@5.104.1(esbuild@0.27.2)) 15709 15709 optionalDependencies: ··· 15737 15737 - webpack-cli 15738 15738 - yaml 15739 15739 15740 - '@angular-devkit/build-webpack@0.2101.2(chokidar@5.0.0)(webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)))(webpack@5.104.1(esbuild@0.27.2))': 15740 + '@angular-devkit/build-webpack@0.2101.2(chokidar@5.0.0)(webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1))(webpack@5.104.1(esbuild@0.27.2))': 15741 15741 dependencies: 15742 15742 '@angular-devkit/architect': 0.2101.2(chokidar@5.0.0) 15743 15743 rxjs: 7.8.2 15744 15744 webpack: 5.104.1(esbuild@0.27.2) 15745 - webpack-dev-server: 5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)) 15745 + webpack-dev-server: 5.2.2(tslib@2.8.1)(webpack@5.104.1) 15746 15746 transitivePeerDependencies: 15747 15747 - chokidar 15748 15748 ··· 24855 24855 '@nolyfill/is-core-module': 1.0.39 24856 24856 debug: 4.4.3 24857 24857 eslint: 9.17.0(jiti@2.6.1) 24858 - get-tsconfig: 4.10.1 24858 + get-tsconfig: 4.13.6 24859 24859 is-bun-module: 2.0.0 24860 24860 stable-hash: 0.0.5 24861 24861 tinyglobby: 0.2.15 ··· 25742 25742 es-errors: 1.3.0 25743 25743 get-intrinsic: 1.3.0 25744 25744 25745 - get-tsconfig@4.10.1: 25746 - dependencies: 25747 - resolve-pkg-maps: 1.0.0 25748 - 25749 - get-tsconfig@4.13.0: 25745 + get-tsconfig@4.13.6: 25750 25746 dependencies: 25751 25747 resolve-pkg-maps: 1.0.0 25752 25748 ··· 29863 29859 ast-kit: 2.2.0 29864 29860 birpc: 4.0.0 29865 29861 dts-resolver: 2.1.3 29866 - get-tsconfig: 4.13.0 29862 + get-tsconfig: 4.13.6 29867 29863 obug: 2.1.1 29868 29864 rolldown: 1.0.0-beta.57 29869 29865 optionalDependencies: ··· 31193 31189 tsx@4.21.0: 31194 31190 dependencies: 31195 31191 esbuild: 0.27.2 31196 - get-tsconfig: 4.13.0 31192 + get-tsconfig: 4.13.6 31197 31193 optionalDependencies: 31198 31194 fsevents: 2.3.3 31199 31195 ··· 32639 32635 32640 32636 webidl-conversions@8.0.1: {} 32641 32637 32642 - webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)): 32638 + webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.104.1): 32643 32639 dependencies: 32644 32640 colorette: 2.0.20 32645 32641 memfs: 4.56.10(tslib@2.8.1) ··· 32652 32648 transitivePeerDependencies: 32653 32649 - tslib 32654 32650 32655 - webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)): 32651 + webpack-dev-server@5.2.2(tslib@2.8.1)(webpack@5.104.1): 32656 32652 dependencies: 32657 32653 '@types/bonjour': 3.5.13 32658 32654 '@types/connect-history-api-fallback': 1.5.4 ··· 32680 32676 serve-index: 1.9.1 32681 32677 sockjs: 0.3.24 32682 32678 spdy: 4.0.2 32683 - webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.104.1(esbuild@0.27.2)) 32679 + webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.104.1) 32684 32680 ws: 8.18.3 32685 32681 optionalDependencies: 32686 32682 webpack: 5.104.1(esbuild@0.27.2)