Skip to content

Commit

Permalink
Merge pull request #87 from xenit-eu/renovate/fetch-mock-11.x
Browse files Browse the repository at this point in the history
Update dependency fetch-mock to v11
  • Loading branch information
vierbergenlars authored Oct 18, 2024
2 parents 7479bc2 + 55ff4b4 commit 8c9a85b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 97 deletions.
3 changes: 1 addition & 2 deletions packages/fetch-hooks/__tests__/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { appendHeader } from '../src/request';

test("compose", async () => {
const fakeFetch = fetchMock.sandbox();
global.Request = fakeFetch.config.Request as any;

const testHeader = "X-Test";

Expand All @@ -29,7 +28,7 @@ test("compose", async () => {

expect(response.ok).toBe(true);
expect(await response.json()).toEqual({
test: "1,2,3"
test: "1, 2, 3"
})

})
6 changes: 3 additions & 3 deletions packages/fetch-hooks/__tests__/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { DuplicateInvocationError, FetchHookInvocationImpl } from '../src/hook/i

describe("hook", () => {
const fakeFetch = fetchMock.sandbox();
global.Request = fakeFetch.config.Request as any;

fakeFetch.post("http://localhost/length", async (_url, {headers, body}) => {
const h = new Headers(headers)
Expand Down Expand Up @@ -71,8 +70,9 @@ describe("hook", () => {
"X-Loopback": "true"
},
method: "POST",
body: request.body
})
body: request.body,
duplex: "half" // This is required when a stream is sent, but it is not part of the types yet
} as unknown as RequestInit)
return next(newRequest);
});

Expand Down
1 change: 0 additions & 1 deletion packages/fetch-hooks/__tests__/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { setHeader } from '../src/request';

describe("setHeader", () => {
const fakeFetch = fetchMock.sandbox();
global.Request = fakeFetch.config.Request as any;

const testHeader = "X-Test";

Expand Down
2 changes: 1 addition & 1 deletion packages/fetch-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"directory": "packages/fetch-hooks"
},
"devDependencies": {
"fetch-mock": "^9.11.0"
"fetch-mock": "^11.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/typed-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"directory": "packages/typed-fetch"
},
"devDependencies": {
"fetch-mock": "^9.11.0"
"fetch-mock": "^11.0.0"
}
}
123 changes: 34 additions & 89 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/core@npm:^7.0.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.22.9":
"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.22.9":
version: 7.25.8
resolution: "@babel/core@npm:7.25.8"
dependencies:
Expand Down Expand Up @@ -1408,7 +1408,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.22.10, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.8.4":
"@babel/runtime@npm:^7.22.10, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.8.4":
version: 7.25.7
resolution: "@babel/runtime@npm:7.25.7"
dependencies:
Expand Down Expand Up @@ -1511,7 +1511,7 @@ __metadata:
resolution: "@contentgrid/fetch-hooks@workspace:packages/fetch-hooks"
dependencies:
"@babel/runtime": "npm:^7.22.10"
fetch-mock: "npm:^9.11.0"
fetch-mock: "npm:^11.0.0"
tslib: "npm:^2.6.1"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -1551,7 +1551,7 @@ __metadata:
resolution: "@contentgrid/typed-fetch@workspace:packages/typed-fetch"
dependencies:
"@babel/runtime": "npm:^7.22.10"
fetch-mock: "npm:^9.11.0"
fetch-mock: "npm:^11.0.0"
tslib: "npm:^2.6.1"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -2867,6 +2867,13 @@ __metadata:
languageName: node
linkType: hard

"@types/glob-to-regexp@npm:^0.4.4":
version: 0.4.4
resolution: "@types/glob-to-regexp@npm:0.4.4"
checksum: 10c0/7288ff853850d8302a8770a3698b187fc3970ad12ee6427f0b3758a3e7a0ebb0bd993abc6ebaaa979d09695b4194157d2bfaa7601b0fb9ed72c688b4c1298b88
languageName: node
linkType: hard

"@types/graceful-fs@npm:^4.1.3":
version: 4.1.6
resolution: "@types/graceful-fs@npm:4.1.6"
Expand Down Expand Up @@ -3902,13 +3909,6 @@ __metadata:
languageName: node
linkType: hard

"core-js@npm:^3.0.0":
version: 3.32.0
resolution: "core-js@npm:3.32.0"
checksum: 10c0/8839b9a5cfff4999cf5e3277072c7c581b29618c6dbc2f9d0170c529a701310ec78843bd97bede0742cf6899b526bdb062bb1d148c6e9a40f3d19173b7ee8e88
languageName: node
linkType: hard

"core-util-is@npm:~1.0.0":
version: 1.0.3
resolution: "core-util-is@npm:1.0.3"
Expand Down Expand Up @@ -4086,6 +4086,13 @@ __metadata:
languageName: node
linkType: hard

"dequal@npm:^2.0.3":
version: 2.0.3
resolution: "dequal@npm:2.0.3"
checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888
languageName: node
linkType: hard

"detect-indent@npm:^5.0.0":
version: 5.0.0
resolution: "detect-indent@npm:5.0.0"
Expand Down Expand Up @@ -4422,26 +4429,19 @@ __metadata:
languageName: node
linkType: hard

"fetch-mock@npm:^9.11.0":
version: 9.11.0
resolution: "fetch-mock@npm:9.11.0"
"fetch-mock@npm:^11.0.0":
version: 11.1.5
resolution: "fetch-mock@npm:11.1.5"
dependencies:
"@babel/core": "npm:^7.0.0"
"@babel/runtime": "npm:^7.0.0"
core-js: "npm:^3.0.0"
debug: "npm:^4.1.1"
glob-to-regexp: "npm:^0.4.0"
"@types/glob-to-regexp": "npm:^0.4.4"
dequal: "npm:^2.0.3"
glob-to-regexp: "npm:^0.4.1"
is-subset: "npm:^0.1.1"
lodash.isequal: "npm:^4.5.0"
path-to-regexp: "npm:^2.2.1"
querystring: "npm:^0.2.0"
whatwg-url: "npm:^6.5.0"
peerDependencies:
node-fetch: "*"
regexparam: "npm:^3.0.0"
peerDependenciesMeta:
node-fetch:
optional: true
checksum: 10c0/1bc2a83b34c10ad412ee381b5f9ee64c4daa6390f9b42a76ae7dc9dcbb5a6795f7f8748e315fcafe612e7a8abd05c8f2d3554a36d576f22e12497010d9dd8e4c
checksum: 10c0/f32f1d7879b654a3fab7c3576901193ddd4c63cb9aeae2ed66ff42062400c0937d4696b1a5171e739d5f62470e6554e190f14816789f5e3b2bf1ad90208222e6
languageName: node
linkType: hard

Expand Down Expand Up @@ -4746,7 +4746,7 @@ __metadata:
languageName: node
linkType: hard

"glob-to-regexp@npm:^0.4.0":
"glob-to-regexp@npm:^0.4.1":
version: 0.4.1
resolution: "glob-to-regexp@npm:0.4.1"
checksum: 10c0/0486925072d7a916f052842772b61c3e86247f0a80cc0deb9b5a3e8a1a9faad5b04fb6f58986a09f34d3e96cd2a22a24b7e9882fb1cf904c31e9a310de96c429
Expand Down Expand Up @@ -6222,13 +6222,6 @@ __metadata:
languageName: node
linkType: hard

"lodash.isequal@npm:^4.5.0":
version: 4.5.0
resolution: "lodash.isequal@npm:4.5.0"
checksum: 10c0/dfdb2356db19631a4b445d5f37868a095e2402292d59539a987f134a8778c62a2810c2452d11ae9e6dcac71fc9de40a6fedcb20e2952a15b431ad8b29e50e28f
languageName: node
linkType: hard

"lodash.ismatch@npm:^4.4.0":
version: 4.4.0
resolution: "lodash.ismatch@npm:4.4.0"
Expand All @@ -6243,13 +6236,6 @@ __metadata:
languageName: node
linkType: hard

"lodash.sortby@npm:^4.7.0":
version: 4.7.0
resolution: "lodash.sortby@npm:4.7.0"
checksum: 10c0/fc48fb54ff7669f33bb32997cab9460757ee99fafaf72400b261c3e10fde21538e47d8cfcbe6a25a31bcb5b7b727c27d52626386fc2de24eb059a6d64a89cdf5
languageName: node
linkType: hard

"lodash@npm:^4.17.21":
version: 4.17.21
resolution: "lodash@npm:4.17.21"
Expand Down Expand Up @@ -7335,13 +7321,6 @@ __metadata:
languageName: node
linkType: hard

"path-to-regexp@npm:^2.2.1":
version: 2.4.0
resolution: "path-to-regexp@npm:2.4.0"
checksum: 10c0/286e3f2ea633ae9447d9c6beb2974db67801ffd64927e70129604e1fb987d94c9b38fa70cc494cd088c78d521914edec87de7f11928848c9ac265632c8644fc8
languageName: node
linkType: hard

"path-type@npm:^3.0.0":
version: 3.0.0
resolution: "path-type@npm:3.0.0"
Expand Down Expand Up @@ -7522,27 +7501,13 @@ __metadata:
languageName: node
linkType: hard

"punycode@npm:^2.1.0":
version: 2.3.0
resolution: "punycode@npm:2.3.0"
checksum: 10c0/8e6f7abdd3a6635820049e3731c623bbef3fedbf63bbc696b0d7237fdba4cefa069bc1fa62f2938b0fbae057550df7b5318f4a6bcece27f1907fc75c54160bee
languageName: node
linkType: hard

"pure-rand@npm:^6.0.0":
version: 6.0.3
resolution: "pure-rand@npm:6.0.3"
checksum: 10c0/f8bf59c29ef7fa6302e462cae3aa47932fb364e1bf8f095667b542d77c6fa26e52068eefa5c39b2e715a6c92d41fd8dd321bf81c07077f45e9373fc33f80e0ed
languageName: node
linkType: hard

"querystring@npm:^0.2.0":
version: 0.2.1
resolution: "querystring@npm:0.2.1"
checksum: 10c0/6841b32bec4f16ffe7f5b5e4373b47ad451f079cde3a7f45e63e550f0ecfd8f8189ef81fb50079413b3fc1c59b06146e4c98192cb74ed7981aca72090466cd94
languageName: node
linkType: hard

"queue-microtask@npm:^1.2.2":
version: 1.2.3
resolution: "queue-microtask@npm:1.2.3"
Expand Down Expand Up @@ -7702,6 +7667,13 @@ __metadata:
languageName: node
linkType: hard

"regexparam@npm:^3.0.0":
version: 3.0.0
resolution: "regexparam@npm:3.0.0"
checksum: 10c0/a6430d7b97d5a7d5518f37a850b6b73aab479029d02f46af4fa0e8e4a1d7aad05b7a0d2d10c86ded21a14d5f0fa4c68525f873a5fca2efeefcccd93c36627459
languageName: node
linkType: hard

"regexpu-core@npm:^6.1.1":
version: 6.1.1
resolution: "regexpu-core@npm:6.1.1"
Expand Down Expand Up @@ -8520,15 +8492,6 @@ __metadata:
languageName: node
linkType: hard

"tr46@npm:^1.0.1":
version: 1.0.1
resolution: "tr46@npm:1.0.1"
dependencies:
punycode: "npm:^2.1.0"
checksum: 10c0/41525c2ccce86e3ef30af6fa5e1464e6d8bb4286a58ea8db09228f598889581ef62347153f6636cd41553dc41685bdfad0a9d032ef58df9fbb0792b3447d0f04
languageName: node
linkType: hard

"tr46@npm:~0.0.3":
version: 0.0.3
resolution: "tr46@npm:0.0.3"
Expand Down Expand Up @@ -8868,13 +8831,6 @@ __metadata:
languageName: node
linkType: hard

"webidl-conversions@npm:^4.0.2":
version: 4.0.2
resolution: "webidl-conversions@npm:4.0.2"
checksum: 10c0/def5c5ac3479286dffcb604547628b2e6b46c5c5b8a8cfaa8c71dc3bafc85859bde5fbe89467ff861f571ab38987cf6ab3d6e7c80b39b999e50e803c12f3164f
languageName: node
linkType: hard

"whatwg-mimetype@npm:^4.0.0":
version: 4.0.0
resolution: "whatwg-mimetype@npm:4.0.0"
Expand All @@ -8892,17 +8848,6 @@ __metadata:
languageName: node
linkType: hard

"whatwg-url@npm:^6.5.0":
version: 6.5.0
resolution: "whatwg-url@npm:6.5.0"
dependencies:
lodash.sortby: "npm:^4.7.0"
tr46: "npm:^1.0.1"
webidl-conversions: "npm:^4.0.2"
checksum: 10c0/5afeff7da025fbaecceca6a5e0cdc6d10666efab245d0e5d785263a09a16b3afce7a81712512e184c98e70bdb79fb20d0ecd34553e9c121a9ba4f36760db4226
languageName: node
linkType: hard

"which@npm:^2.0.1":
version: 2.0.2
resolution: "which@npm:2.0.2"
Expand Down

0 comments on commit 8c9a85b

Please sign in to comment.