Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions apps/backend/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,29 @@ module.exports = {
isolatedModules: true,
},
],
// jwks-rsa 4 depends on jose 6, which is ESM-only ("type": "module", no
// require condition). This backend is CommonJS, so Jest cannot parse it and
// every suite that transitively reaches the auth stack fails on
// `Unexpected token 'export'`. Transpile it for the test run only; the
// application build is unaffected because tsc never touches node_modules.
"^.+\\.m?js$": [
"ts-jest",
{
diagnostics: false,
isolatedModules: true,
tsconfig: {
allowJs: true,
module: "CommonJS",
target: "ES2022",
esModuleInterop: true,
},
},
],
},
// Everything in node_modules stays untransformed except jose. The alternation
// covers both segments of the pnpm layout: the store directory
// (node_modules/.pnpm/jose@6.2.8/) and the link inside it
// (.../node_modules/jose/), so neither position matches and the files are
// handed to the transform above.
transformIgnorePatterns: ["node_modules/(?!\\.pnpm/jose@|jose/)"],
};
2 changes: 1 addition & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"google-auth-library": "^10.9.1",
"helmet": "^8.3.0",
"jsonwebtoken": "9.0.3",
"jwks-rsa": "^3.2.0",
"jwks-rsa": "^4.1.0",
"moment": "2.30.1",
"moment-timezone": "^0.6.3",
"multer": "2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"supertokens-node": "^24.0.3",
"jsonwebtoken": "9.0.3",
"jwks-rsa": "^3.2.0"
"jwks-rsa": "^4.1.0"
},
"peerDependencies": {
"cors": "^2.8.5",
Expand Down
29 changes: 25 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading