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..0a3dffa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MPL-2.0", "dependencies": { "@hey-api/client-fetch": "0.12.0", - "uuid": "11.1.0" + "uuid": "14.0.0" }, "devDependencies": { "@eslint/js": "^9.29.0", @@ -10628,16 +10628,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..93eb1b2 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@hey-api/client-fetch": "0.12.0", - "uuid": "11.1.0" + "uuid": "14.0.0" }, "devDependencies": { "@eslint/js": "^9.29.0",