Skip to content

Commit

Permalink
Update MSW to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mlev committed Jun 29, 2024
1 parent feff800 commit 7600fa7
Show file tree
Hide file tree
Showing 108 changed files with 476 additions and 1,363 deletions.
923 changes: 225 additions & 698 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/bl-npm-4.1.0-7f94cdcf3f-9e8521fa7e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/gopd-npm-1.0.1-10c1d0b534-a5ccfb8806.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/msw-npm-1.2.2-a36db7de78-e42cec8f55.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ora-npm-5.4.1-4f0343adb7-28d476ee6c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/rxjs-npm-7.8.1-41c443a75b-de4b53db10.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/tmp-npm-0.0.33-bcbf65df2a-902d7aceb7.zip
Binary file not shown.
Binary file removed .yarn/cache/tr46-npm-0.0.3-de53018915-726321c5ea.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"dependencies": {
"base64-url": "^2.3.3",
"jsonwebtoken": "^9.0.0",
"msw": "^1.2.2",
"msw": "^2.3.1",
"node-forge": "^1.3.1",
"node-rsa": "^1.1.1"
},
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { JwtPayload } from 'jsonwebtoken'
import { createJWKS, createKeyPair, signJwt } from './tools.js'
import { setupServer } from 'msw/node'
import { rest } from 'msw'
import { HttpResponse, http } from 'msw'

const createJWKSMock = (
jwksBase: string,
Expand All @@ -13,8 +13,8 @@ const createJWKSMock = (
jwksOrigin: jwksBase,
})
const server = setupServer(
rest.get(new URL(jwksPath, jwksBase).href, (_, res, ctx) =>
res(ctx.status(200), ctx.json(JWKS))
http.get(new URL(jwksPath, jwksBase).href, () =>
HttpResponse.json(JWKS),
)
)

Expand Down
Loading

0 comments on commit 7600fa7

Please sign in to comment.