From 42e56317aa7d59032b234e0dbdfe429a7a0d9654 Mon Sep 17 00:00:00 2001 From: Amaad Martin Date: Wed, 5 Aug 2026 04:32:16 -0700 Subject: [PATCH] fix(core): declare @types/js-yaml in core's devDependencies core/src imports js-yaml from two files, but js-yaml ships no bundled type declarations. @types/js-yaml was declared only in the workspace root manifest, and npm workspace hoisting resolved it into core. Delete the root declaration and core stops typechecking with two TS7016 errors. The range ^4.0.9 is copied verbatim from the root manifest, so npm resolves both declarations to the one existing tree and no second copy of the type package enters node_modules. It is a devDependency, not a dependency, because no js-yaml type reaches core/dist/types: yaml.load returns unknown in @types/js-yaml v4, and both call sites consume that unknown immediately. This follows the precedent already set in the same manifest by @types/adm-zip. --- core/package.json | 1 + package-lock.json | 1 + 2 files changed, 2 insertions(+) diff --git a/core/package.json b/core/package.json index 678f8c0c9..96d095fc0 100644 --- a/core/package.json +++ b/core/package.json @@ -74,6 +74,7 @@ "@mikro-orm/sqlite": "^6.6.6", "@types/adm-zip": "^0.5.8", "@types/express": "^4.17.25", + "@types/js-yaml": "^4.0.9", "@types/lodash-es": "^4.17.12", "openapi-types": "^12.1.3" }, diff --git a/package-lock.json b/package-lock.json index e29a4a190..7d8c0c916 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,6 +78,7 @@ "@mikro-orm/sqlite": "^6.6.6", "@types/adm-zip": "^0.5.8", "@types/express": "^4.17.25", + "@types/js-yaml": "^4.0.9", "@types/lodash-es": "^4.17.12", "openapi-types": "^12.1.3" },