From 90fbadcd46539ecc3029e7d6501a17705da481ef Mon Sep 17 00:00:00 2001 From: Shevchik Igor Date: Thu, 20 Aug 2026 09:36:29 +0000 Subject: [PATCH] chore(deps): declare TypeScript instead of deriving it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `typescript` was declared only as a peerDependency (`^5.6.3 || ^6.0.0 || ^7.0.0`) and never as a devDependency, so pnpm chose it from that range and any root `pnpm add` re-resolved the root importer's peers from scratch, flipping it to 5.9.3 and churning ~305 lockfile lines inside a diff about something else (#451). Measured, because the flip is invisible in a version-set comparison: main root 6.0.3 -> pnpm add -> 5.9.3 this commit root 6.0.3 -> pnpm add -> 6.0.3 It drags more than the root. On main, one `pnpm add` moves the whole `dist` build toolchain down — `@nuxt/module-builder`, `unbuild` and `tsconfck` land on 5.9.3 while `vue-tsc` stays on 6.0.3 and `mkdist` splits across both, so the published declarations would be built by a mixed toolchain. That matters because `deploy.yml` installs without `--frozen-lockfile`. Here every one of them stays on 6.0.3. A declaration rather than an override, and the difference is the point. An override at the same version was written first and does one thing more — it collapses the second copy that `nuxt-component-meta` pulls in through a hard `typescript: ^5.9.3` dependency. It also rewrites 24 recorded peer ranges to values upstream never published, forces a third-party package's dependency across a major boundary, and erases the unmet-peer report for `@nuxt/module-builder`, `tsconfck` and `unbuild` — including one that is not optional. Since the extra copy only reaches docs-time metadata extraction, and the rendered prop tables are identical either way, that trade is not worth making. `pnpm peers check` still reports the pre-existing mismatch here, which is the honest state. `^6.0.3` is what `playgrounds/nuxt`, `playgrounds/vue` and `playgrounds/demo` already declare; the root was the odd one out. Closes #451. --- package.json | 1 + pnpm-lock.yaml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3fe65d0c..8d677cdc 100644 --- a/package.json +++ b/package.json @@ -210,6 +210,7 @@ "vue-component-type-helpers": "^3.3.10" }, "devDependencies": { + "typescript": "^6.0.3", "@conventional-commits/parser": "0.4.1", "@nuxt/eslint-config": "^1.17.0", "@nuxt/module-builder": "^1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3140d07c..d3bcbbee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -211,9 +211,6 @@ importers: tinyglobby: specifier: ^0.2.17 version: 0.2.17 - typescript: - specifier: ^5.6.3 || ^6.0.0 || ^7.0.0 - version: 6.0.3 ufo: specifier: ^1.6.4 version: 1.6.4 @@ -287,6 +284,9 @@ importers: nuxt: specifier: ^4.5.2 version: 4.5.2(5eaa5debc483dd6b779810f76a647995) + typescript: + specifier: ^6.0.3 + version: 6.0.3 unbuild: specifier: ^3.6.1 version: 3.6.1(typescript@6.0.3)(vue-sfc-transformer@0.2.3(@volar/typescript@2.4.28(typescript@6.0.3))(@vue/compiler-core@3.5.41)(@vue/language-core@3.3.10)(esbuild@0.27.7)(rolldown@1.2.3)(typescript@6.0.3)(vue@3.5.41(typescript@6.0.3)))(vue-tsc@3.3.10(typescript@6.0.3))(vue@3.5.41(typescript@6.0.3))