From e8e136de95bf0c99e1fcdda7380af6d68bb2bae8 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 17:40:16 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20content-type?= =?UTF-8?q?=20to=20version=202.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- yarn.lock | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d3b358..692b8ae 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@google-cloud/storage": "^7.19.0", "@koa/cors": "^4.0.0", "@koa/router": "^15.5.0", - "content-type": "^1.0.5", + "content-type": "^2.0.0", "convict": "^6.2.5", "dotenv": "^17.4.2", "helmet": "^8.1.0", diff --git a/yarn.lock b/yarn.lock index 2cb7ba2..6fe47f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2745,6 +2745,11 @@ content-type@^1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== +content-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-2.0.0.tgz#2fb3ede69dffa0af78ca7c4ce7589680638b56df" + integrity sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ== + convert-source-map@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" From 1ea515e099891a115e3a9136977d3ee70f5c1317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Tue, 19 May 2026 11:51:38 +0200 Subject: [PATCH 2/2] Fix import of content-type in version 2 content-type@2.0.0 was rewritten in TypeScript and the compiled output sets __esModule: true with only named exports (parse, format). The default import `contentType` now resolves to `undefined`. --- src/middlewares/versioning.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewares/versioning.ts b/src/middlewares/versioning.ts index ace7a2a..187efc9 100644 --- a/src/middlewares/versioning.ts +++ b/src/middlewares/versioning.ts @@ -8,7 +8,7 @@ import { Context } from 'koa'; -import contentType from 'content-type'; +import * as contentType from 'content-type'; // This mime-type is a vendor mime-type (because this starts with `vnd.`). It // also uses the 'json' suffix to outline that the content, if any, is in JSON form.