Skip to content

Commit

Permalink
fix(deps): update dependency msw to v0.47.3 (#6103)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency msw to v0.44.2

* fix: correct type imports, handle new field prop

* chore: upgrade to 0.45.0

* upgrade to v0.47

* chore: dedupe yarn.lock

* fix bin proxy

* fix: don't import subpath

* upgrade to v0.47.3

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
  • Loading branch information
renovate[bot] and jtoar committed Sep 16, 2022
1 parent 589fbec commit 61030fd
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 92 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"lerna": "5.5.1",
"lodash.template": "4.5.0",
"make-dir-cli": "3.0.0",
"msw": "0.40.2",
"msw": "0.47.3",
"ncp": "2.0.0",
"node-notifier": "10.0.1",
"nodemon": "2.0.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"jest": "29.0.3",
"jest-environment-jsdom": "29.0.3",
"jest-watch-typeahead": "2.1.1",
"msw": "0.40.2",
"msw": "0.47.3",
"ts-toolbelt": "9.6.0",
"whatwg-fetch": "3.6.2"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/testing/src/web/mockRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
SetupWorkerApi,
ResponseComposition,
} from 'msw'
import type { StartOptions as StartMSWWorkerOptions } from 'msw/lib/types/setupWorker/glossary'
import type { SharedOptions as SharedMSWOptions } from 'msw/lib/types/sharedOptions'
import type { StartOptions as StartMSWWorkerOptions } from 'msw'
import type { SharedOptions as SharedMSWOptions } from 'msw'

// Allow users to call "mockGraphQLQuery" and "mockGraphQLMutation"
// before the server has started. We store the request handlers in
Expand Down Expand Up @@ -132,6 +132,7 @@ const mockGraphQL = (
data: captureTransform(ctx.data),
extensions: captureTransform(ctx.extensions),
cookie: captureTransform(ctx.cookie),
field: captureTransform(ctx.field),
}

d = data(req.variables, {
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/bins/msw.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
import { createRequire } from 'module'

const requireFromMSW = createRequire(require.resolve('msw/package.json'))
const requireFromMSW = createRequire(require.resolve('msw'))

const bins = requireFromMSW('./package.json')['bin']
const bins = requireFromMSW('../package.json')['bin']

// Most package.json's list their bins as relative paths, but not MSW.
requireFromMSW(`./${bins['msw']}`)
requireFromMSW(`../${bins['msw']}`)

0 comments on commit 61030fd

Please sign in to comment.