diff --git a/.pnpmfile.mjs b/.pnpmfile.mjs deleted file mode 100644 index 42eef21..0000000 --- a/.pnpmfile.mjs +++ /dev/null @@ -1,19 +0,0 @@ -/** - * The openapi-typescript package relies on the TypeScript 5 compiler API, which TypeScript 7 no longer ships. Its - * `typescript` peer would otherwise resolve to the workspace root's TypeScript 7, so it gets a private TypeScript 5 - * dependency instead. - * - * @param {{ name?: string; dependencies?: Record; peerDependencies?: Record }} pkg The - * package manifest to adjust. - * @returns {typeof pkg} The adjusted package manifest. - */ -function readPackage(pkg) { - if (pkg.name === "openapi-typescript") { - delete pkg.peerDependencies?.typescript; - pkg.dependencies = { ...pkg.dependencies, typescript: "5.9.3" }; - } - return pkg; -} - -// oxlint-disable-next-line import/prefer-default-export -- pnpm only reads a named `hooks` export -export const hooks = { readPackage }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af83938..9fedc0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,8 +162,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -pnpmfileChecksum: sha256-m6x3Moir6/NbjmQHXbxjGNWfcCk1kUPxErBQCKNIRo8= - importers: .: @@ -233,7 +231,7 @@ importers: version: 24.13.5 openapi-typescript: specifier: 7.13.0 - version: 7.13.0 + version: 7.13.0(typescript@5.9.3) workers/workers-bachman-dev: {} @@ -1841,6 +1839,8 @@ packages: openapi-typescript@7.13.0: resolution: {integrity: sha512-EFP392gcqXS7ntPvbhBzbF8TyBA+baIYEm791Hy5YkjDYKTnk/Tn5OQeKm5BIZvJihpp8Zzr4hzx0Irde1LNGQ==} hasBin: true + peerDependencies: + typescript: ^5.x oxfmt@0.70.0: resolution: {integrity: sha512-IsHxZ4y0wQLLMhnrJblBJgZsLDzfULrJnAw5j/QqsTlMa/m3AqsbToi+W71uhBGaqlqq/PbbjvHc09TJwdv3Tw==} @@ -3005,7 +3005,7 @@ snapshots: obug@3.0.0: {} - openapi-typescript@7.13.0: + openapi-typescript@7.13.0(typescript@5.9.3): dependencies: '@redocly/openapi-core': 1.34.20(supports-color@10.2.2) ansi-colors: 4.1.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ba5c95..59ed754 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,3 +7,8 @@ allowBuilds: minimumReleaseAgeExclude: - "@bachman-dev/oxc-config@0.1.0 || 0.1.1 || 0.1.2 || 0.2.0" - "@cloudflare/workers-types@5.20260924.1" +# openapi-typescript relies on the TypeScript 5 compiler API, which TypeScript 7 no longer ships. Resolving peers from +# each package's own dependencies (rather than the workspace root's TypeScript 7) lets pnpm auto-install a TypeScript 5 +# peer just for it. This is declarative on purpose: Renovate runs pnpm with --ignore-pnpmfile, so a pnpmfile hook here +# would make its lockfile updates drop pnpmfileChecksum and fail frozen installs. +resolvePeersFromWorkspaceRoot: false