From 26a2e34000e0dab509c0c65d5e9fbd194d814305 Mon Sep 17 00:00:00 2001 From: ahanot Date: Mon, 25 May 2026 18:04:52 -0400 Subject: [PATCH] chore(deps): bump uuid to 14.0.0 and @hey-api/client-fetch to 0.13.1 uuid 12+ ships ESM-only, so Jest can no longer require() it directly. Extend the ts-jest transform to handle .js files and allow uuid's ESM through transformIgnorePatterns. Supersedes #170 and #157. --- jest.config.mjs | 14 +++++++++++++- package-lock.json | 19 ++++++++++--------- package.json | 4 ++-- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/jest.config.mjs b/jest.config.mjs index 767a60f..ae211c1 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -23,8 +23,20 @@ export default { testEnvironment: "jsdom", testPathIgnorePatterns: ["examples/tests"], transform: { - "^.+.(ts|tsx)?$": ["ts-jest", {}], + "^.+\\.(ts|tsx)$": ["ts-jest", {}], + "^.+\\.js$": ["ts-jest", { + useESM: false, + tsconfig: { + allowJs: true, + module: "commonjs", + esModuleInterop: true, + allowSyntheticDefaultImports: true, + }, + }], }, + transformIgnorePatterns: [ + "node_modules/(?!uuid/)", + ], moduleNameMapper: { "@/jest.setup": ["/jest.setup.ts"], "@/package.json": ["/package.json"], diff --git a/package-lock.json b/package-lock.json index 3f98428..a3ac413 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "0.1.10", "license": "MPL-2.0", "dependencies": { - "@hey-api/client-fetch": "0.12.0", - "uuid": "11.1.0" + "@hey-api/client-fetch": "0.13.1", + "uuid": "14.0.0" }, "devDependencies": { "@eslint/js": "^9.29.0", @@ -1368,9 +1368,10 @@ } }, "node_modules/@hey-api/client-fetch": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.12.0.tgz", - "integrity": "sha512-/iZ6dhs39N0kjzCa9tlNeLNufVUd8zzv/wI1ewQt5AEHaVuDnAxvuQT+fRIPYkfIWKR3gVZKRp5mcCo29voYzQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.13.1.tgz", + "integrity": "sha512-29jBRYNdxVGlx5oewFgOrkulZckpIpBIRHth3uHFn1PrL2ucMy52FvWOY3U3dVx2go1Z3kUmMi6lr07iOpUqqA==", + "deprecated": "Starting with v0.73.0, this package is bundled directly inside @hey-api/openapi-ts.", "license": "MIT", "funding": { "url": "https://github.com/sponsors/hey-api" @@ -10628,16 +10629,16 @@ } }, "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "license": "MIT", "bin": { - "uuid": "dist/esm/bin/uuid" + "uuid": "dist-node/bin/uuid" } }, "node_modules/v8-to-istanbul": { diff --git a/package.json b/package.json index 951c197..455d21e 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ } }, "dependencies": { - "@hey-api/client-fetch": "0.12.0", - "uuid": "11.1.0" + "@hey-api/client-fetch": "0.13.1", + "uuid": "14.0.0" }, "devDependencies": { "@eslint/js": "^9.29.0",