From 1533d54ea9797038303cb674da1cc2fcb4ad73bb Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 5 Aug 2026 16:02:08 +0200 Subject: [PATCH] fix: declare @nrfcloud/validate-with-typebox as a runtime dependency `problemResponse.ts`, `validateInput.ts` and `validateResponse.ts` import `@nrfcloud/validate-with-typebox`, but it was declared as a devDependency, so it is missing from the published package's dependency tree. This did not surface while the package was published to JSR: JSR's NPM compatibility build derives the dependency list from the actual imports, so it published `@jsr/nrfcloud__validate-with-typebox` as a runtime dependency regardless of how it was declared here. The NPM build publishes the declared dependencies verbatim, so the mis-declaration became a real defect. Consumers that do not happen to have `@nrfcloud/validate-with-typebox` in their own dependency tree fail at import time with ERR_MODULE_NOT_FOUND. --- package-lock.json | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5cdfa04..4c3417a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,11 @@ "@middy/core": "7.7.2", "@middy/input-output-logger": "7.7.2", "@nrfcloud/problem-detail": "1.4.4", + "@nrfcloud/validate-with-typebox": "1.0.6", "@sinclair/typebox": "0.34.52" }, "devDependencies": { "@bifravst/prettier-config": "1.1.17", - "@nrfcloud/validate-with-typebox": "1.0.6", "@swc/core": "1.15.47", "@types/aws-lambda": "8.10.162", "@types/node": "25.9.5", @@ -167,7 +167,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/@nrfcloud/validate-with-typebox/-/validate-with-typebox-1.0.6.tgz", "integrity": "sha512-+2gVaYWiDH3qDj0pgJaCvGuptn98K0X8mlDrmPyMBiQ8BP4lZj1J3na8EX719quahdLfuEMYPC4Sw2Jj46tY3Q==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "@sinclair/typebox": "0.34.52" diff --git a/package.json b/package.json index 84ec021..a022028 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ }, "devDependencies": { "@bifravst/prettier-config": "1.1.17", - "@nrfcloud/validate-with-typebox": "1.0.6", "@swc/core": "1.15.47", "@types/aws-lambda": "8.10.162", "@types/node": "25.9.5", @@ -70,6 +69,7 @@ "@middy/core": "7.7.2", "@middy/input-output-logger": "7.7.2", "@nrfcloud/problem-detail": "1.4.4", + "@nrfcloud/validate-with-typebox": "1.0.6", "@sinclair/typebox": "0.34.52" } }