{"_id":"@aryzing/bun-mock-fetch","_rev":"12-66c42fe34fd452820666d831eb333562","name":"@aryzing/bun-mock-fetch","dist-tags":{"latest":"1.2.0"},"versions":{"0.1.0":{"name":"@aryzing/bun-mock-fetch","version":"0.1.0","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@0.1.0","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"dist":{"shasum":"0406f778b2249da0fcb2b0cb77940773c9a149aa","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-0.1.0.tgz","fileCount":17,"integrity":"sha512-4NLlYjWtDt49b8Zv5uM/A8PgWFw61FqZhso5wQhpyui4VmxKaCbQGl3ZZeNlgwZykEvnUQJpZxhM8xPiQ+rvUA==","signatures":[{"sig":"MEQCICWthjYkvc/ZRaanY/a9wacPfzfKyqcXUnFWOCRy1Ke8AiA1f+1AcK0OCQCsP5vPGgYGDLlrL1nRTl4+uCFGrLWBsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17235},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"e2e97db02665105dd7bf7032d118e035884c2ded","scripts":{"ci":"bun run build && bun run check-format && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"_npmVersion":"10.8.3","description":"Mock fetch requests in Bun. Particularly useful when running tests.","directories":{},"_nodeVersion":"18.20.4","dependencies":{"glob":"^11.0.0","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_0.1.0_1725557903944_0.8490755523737941","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@aryzing/bun-mock-fetch","version":"0.2.0","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@0.2.0","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"dist":{"shasum":"83b20dcf63911256bd408b94f42b3fac0648eee0","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-0.2.0.tgz","fileCount":17,"integrity":"sha512-GBSUv+sb/EcFHqtxa/LpeivtbYaOqLNTtXz3G0D98q00CzneQ8DdgVYB/aBI/JtMCAU1QtI/P/4wNg0VmQZyAQ==","signatures":[{"sig":"MEUCIC7fGQQQ3h5rX9RwTDtMW9HR7aLJYB+DqeEg5XkMaKGuAiEAyzvw3UoTo54pvW5/lM4d1jq4/+QtxCUSKOxJIGLIhDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15992},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"4064a1a560302f70b0215b9512dd18d66cf15133","scripts":{"ci":"bun run build && bun run check-format && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"_npmVersion":"10.8.3","description":"Mock fetch requests in Bun. Particularly useful when running tests.","directories":{},"_nodeVersion":"18.20.4","dependencies":{"glob":"^11.0.0","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_0.2.0_1725562438285_0.11373969039559473","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@aryzing/bun-mock-fetch","version":"0.2.1","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@0.2.1","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"7f4bd4fead84fa9b799ae74f3376a03f6ad10ce7","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-0.2.1.tgz","fileCount":17,"integrity":"sha512-+8R/TMeoLAyKa2euX4PUAG4G0QD7qXkYOap06IYKD1lDaO+6YhR1CD+GtV05ffV+jkw0Wu6phjPqZLHHTKw6og==","signatures":[{"sig":"MEQCIFllLv4OfZESNJC0Vn5LpqSKS1tfNhSOMqf02/IR2LdeAiB7DEq8xiG6DKjbuswL+87DR+HpAguP/e/UBjSZ2GryXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16093},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"e45cc839393b640e915715b154fa36f93a5053df","scripts":{"ci":"bun run build && bun run check-format && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"10.8.3","description":"Mock fetch requests in Bun. Particularly useful when running tests.","directories":{},"_nodeVersion":"18.20.4","dependencies":{"glob":"^11.0.0","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_0.2.1_1725563208780_0.3799062570840239","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"@aryzing/bun-mock-fetch","version":"0.2.2","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@0.2.2","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"4d54501b3784a677a1327356e5736e218cc18d39","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-0.2.2.tgz","fileCount":17,"integrity":"sha512-7+m3nRN5R5X6UqYDTiVnns9b82sVswm9Lf/jKtlHDjOX0+jxG76hUOE10FSXTPrXvkcoj0wEgRlU1HlR9pVP4Q==","signatures":[{"sig":"MEUCIQC2mPYAtYsS8NG6ijK4R1Bv01VY+rzIIEwtODc+wKF/6gIgfeM+NU7ITiaIy/XwlSJiwIZS8siKHg5E4VUIO7Tb7uU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16064},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"bb8873e947807688acc1433178dd31cba172edb9","scripts":{"ci":"bun run build && bun run check-format && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"10.8.3","description":"Mock fetch requests in Bun. Great for tests.","directories":{},"_nodeVersion":"18.20.4","dependencies":{"glob":"^11.0.0","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_0.2.2_1725609283661_0.37362559714133536","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@aryzing/bun-mock-fetch","version":"1.0.0","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.0.0","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"94fbada0b64782cbd13cbbd8d379920b70e9eaef","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.0.0.tgz","fileCount":14,"integrity":"sha512-MZ7wnpe4UdBOlZKfBg9yK5SZkWvRnGKdg/TkO6hrtNszAogMT0eju2BCDG+bODVRsa65Y6ZT16Mt5AH/3aE/5w==","signatures":[{"sig":"MEUCIGnHXq4t36e+q3Yf0FBllxGLprbPTB6vqPf+7k8q4Jg1AiEAsVPVPxRk2+34Bf7opiuYRcP0EVQqh1vATZi66XPfcAM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20797},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"1fb14f7cfe3fc918c43bb894419d72833bf88648","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.3.0","description":"Mock fetch requests in Bun. Great for tests.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"glob":"^11.0.2","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.0.0_1745763350312_0.9081133405690662","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aryzing/bun-mock-fetch","version":"1.0.1","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.0.1","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"ea6f4ec2ea51550294edb5a33e9b8911eb713ca6","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.0.1.tgz","fileCount":14,"integrity":"sha512-L+mj5Il0PF3KqVehFwb7zJMmGFFJy9Q/y6u8cg7yr2roSPV+5E+2vLI4oHyW5yqQey+tFp3jYaW8lmW7iBTv/w==","signatures":[{"sig":"MEQCIEo52SvZtSo3k8G8wQ5xstjwy2KNisqs5N1t3rKQdXuyAiAp2j0NPiqVtLadDduehUORxAxXpQXA+Gxq67dAzbbpbw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21030},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"ebc7af5837952a20c82433cbe477bce518a0bd9f","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.3.0","description":"Mock fetch requests in Bun. Great for tests.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"glob":"^11.0.2","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.0.1_1745785722727_0.020587548792608823","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aryzing/bun-mock-fetch","version":"1.0.2","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.0.2","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"6d0eedd67586ef148bba39e91c4832b4bb265ce1","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.0.2.tgz","fileCount":14,"integrity":"sha512-gZfthvMo0JpvRaHbJAPyOGkiExnNACgJJf6O7QJMSNLZBfzsdUdI4+gGx0s1+/GXamDKDIV6tcbhJGcltzAyyw==","signatures":[{"sig":"MEUCIQDG5bDp/L0Uohskz9E95X1wrngDKU+gUnMxuQCwCK+21AIgPsyHjgFi0/JKzIbAAfBIKzjTNuVfFyNLsv6KPHtcXxM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21072},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"c819a33fc2400836008000a2e592810e8b12434b","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.3.0","description":"Mock fetch requests in Bun. Great for tests.","directories":{},"_nodeVersion":"20.19.1","dependencies":{"glob":"^11.0.2","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.0.2_1746182929455_0.17918621012630265","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aryzing/bun-mock-fetch","version":"1.0.3","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.0.3","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"3918af2b7fc7c5006b285a7d75187ac50c16ea32","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.0.3.tgz","fileCount":14,"integrity":"sha512-+cM1hq2TGv2qqvJ7W5pZjHeCUCruvo3U00yRvn0GcDo+pYHkA+415cnsopIdLDaud4wQTdIuckfkWdDXvP6lNg==","signatures":[{"sig":"MEQCIHvsvcl423XOEQqkFiJH8YzZ1BiURuos6TCb0nrQlu6bAiAlCwzjsuw4+hBPNpXHMgskIOSyj1l7mF1foo/kK2/t+g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21068},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"aae4a8ba1d56babc3e857073a0cc21576cf4bf1e","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.4.1","description":"Mock fetch requests in Bun. Great for tests.","directories":{},"_nodeVersion":"20.19.2","dependencies":{"glob":"^11.0.2","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.0.3_1749715357110_0.5402765998275016","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@aryzing/bun-mock-fetch","version":"1.0.4","keywords":["bun","mock","fetch","mocking","testing"],"author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.0.4","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"f03b058c76086566135e3640dfd66811af7281a5","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.0.4.tgz","fileCount":14,"integrity":"sha512-NnjHhUdj8RoWDhxLjStNSXjPTOtHf2J3eVxPd29D9BHb1mxQSDvuFEG9DyGaU/l23XQXkfNheU0eaZWfXmMYVQ==","signatures":[{"sig":"MEYCIQDsj+hxsWqL/25wo+Y0EQfNNsQn5RWtoAIlEYYgs5fDKwIhAJj+V4XJ18x4ex1bF+yIwHJSaNcpyBAyvuXn2nzFaRNh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21205},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d6b2b07331957424d14316380a073a146f847c52","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.5.2","description":"Mock fetch requests in Bun.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"glob":"^11.0.2","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.0.4_1754550017753_0.70402713549568","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aryzing/bun-mock-fetch","version":"1.1.0","keywords":["bun","fetch","mock","mocking","test","testing","tests"],"author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.1.0","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"ac62ec2cdc89aa58c07f7488e7bdee8cad7234b0","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.1.0.tgz","fileCount":14,"integrity":"sha512-3lCAGESrjhiM0Zc/Nh+3+z5uxf7A4+LO/0bXlKwyM7ShSDSFFmlMuXbXLDP7Gcg8VvOTLF+KPUpgFR8dgmNSXg==","signatures":[{"sig":"MEQCIGTlTFs9jVMzQNO4P0tsSiyydBIBdFEd16xxvpZbuHNBAiABAEeUCFr2tOXH6jZFV8KZ6KIdliBb6AQwQk020VmxfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21230},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"2a0660dbd119bb45c15c8fd6e5afa60b03e72e17","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.5.2","description":"Mock fetch requests in Bun.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"glob":"^11.0.2","minimatch":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.3.3","@types/bun":"latest","@arethetypeswrong/cli":"^0.15.4"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.1.0_1754550233404_0.9754293546351831","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@aryzing/bun-mock-fetch","version":"1.1.1","keywords":["bun","fetch","mock","mocking","test","testing","tests"],"author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","_id":"@aryzing/bun-mock-fetch@1.1.1","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"dist":{"shasum":"06b334d99c53457a197c85922495bcfed5b54da6","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.1.1.tgz","fileCount":14,"integrity":"sha512-qJRiFPdyFyp+cptHU8XrnDQWM9Qy7mSR+dwVxXqdc7HJC4By0M9R72KEXNuVzgvDbRXRDVhEqK0Yy9QUpiSNsQ==","signatures":[{"sig":"MEQCIE1/yIi+/94el2npDKAeYwzQam3cDWeoUquDKyymNhgkAiA+ArdqRjqBJVLVjtdC6/E87Y/zcnLWj33QdTtM6tX/fg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21234},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"a2bcbc7b72a612f81981f58ac1fc838707e66c1e","scripts":{"ci":"bun run check-format && bun test && bun run build && bun run check-exports","build":"tsc","format":"prettier --write .","check-types":"tsc --noEmit","check-format":"prettier --check .","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet"},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"repository":{"url":"git+https://github.com/aryzing/bun-mock-fetch.git","type":"git"},"_npmVersion":"11.11.0","description":"Mock fetch requests in Bun.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"glob":"^13.0.6","minimatch":"^10.2.4"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.8.1","@types/bun":"latest","@arethetypeswrong/cli":"^0.18.2"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-mock-fetch_1.1.1_1772909902357_0.2628474655398676","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@aryzing/bun-mock-fetch","version":"1.2.0","author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"description":"Mock fetch requests in Bun.","type":"module","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/aryzing/bun-mock-fetch.git"},"scripts":{"build":"tsc","check-format":"prettier --check .","format":"prettier --write .","check-types":"tsc --noEmit","check-exports":"attw --pack . --ignore-rules=cjs-resolves-to-esm --quiet","ci":"bun run check-format && bun test && bun run build && bun run check-exports"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.2","@types/bun":"latest","prettier":"^3.8.1"},"peerDependencies":{"typescript":"^5.0.0"},"license":"MIT","dependencies":{"glob":"^13.0.6","minimatch":"^10.2.4"},"keywords":["bun","fetch","mock","mocking","test","testing","tests"],"gitHead":"ce72976c52e9ce87cf14defb69631b86f1efee62","types":"./dist/index.d.ts","_id":"@aryzing/bun-mock-fetch@1.2.0","bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"homepage":"https://github.com/aryzing/bun-mock-fetch#readme","_nodeVersion":"20.20.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-/wNMULBO2STHmrlaAIMPg3VVhyv3X+7Bfto0vtNKSRSH68RKqJIxssyP61HdP0n1dLndBY8kdTZQ698ten4U7A==","shasum":"bb7be3ffa18755567a185459958c01c42d4aa528","tarball":"https://registry.npmjs.org/@aryzing/bun-mock-fetch/-/bun-mock-fetch-1.2.0.tgz","fileCount":14,"unpackedSize":28706,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCkuaPEQnZY/7yQSoz6M8KwAajdxP7XrS6OA0eBFj2FXwIhAPoksa2mZ9nGq5LfCGS9ZYtJrlM+xqBtKhOGKlmKCPx2"}]},"_npmUser":{"name":"aryzing","email":"ebardaji@gmail.com"},"directories":{},"maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bun-mock-fetch_1.2.0_1773049246814_0.5114856212811782"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-05T17:38:23.802Z","modified":"2026-03-09T09:40:47.094Z","0.1.0":"2024-09-05T17:38:24.118Z","0.2.0":"2024-09-05T18:53:58.495Z","0.2.1":"2024-09-05T19:06:48.952Z","0.2.2":"2024-09-06T07:54:43.798Z","1.0.0":"2025-04-27T14:15:50.563Z","1.0.1":"2025-04-27T20:28:42.914Z","1.0.2":"2025-05-02T10:48:49.659Z","1.0.3":"2025-06-12T08:02:37.296Z","1.0.4":"2025-08-07T07:00:18.002Z","1.1.0":"2025-08-07T07:03:53.611Z","1.1.1":"2026-03-07T18:58:22.503Z","1.2.0":"2026-03-09T09:40:46.997Z"},"bugs":{"url":"https://github.com/aryzing/bun-mock-fetch/issues"},"author":{"name":"Eduard Bardají Puig","email":"@aryzing"},"license":"MIT","homepage":"https://github.com/aryzing/bun-mock-fetch#readme","keywords":["bun","fetch","mock","mocking","test","testing","tests"],"repository":{"type":"git","url":"git+https://github.com/aryzing/bun-mock-fetch.git"},"description":"Mock fetch requests in Bun.","maintainers":[{"name":"aryzing","email":"ebardaji@gmail.com"}],"readme":"# Bun Mock Fetch\n\nMock fetch requests in Bun. Great for tests and debugging.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [API](#api)\n  - [mockFetch](#mockfetch)\n  - [clearFetchMocks](#clearfetchmocks)\n  - [json](#json)\n  - [setPassthrough](#setpassthrough)\n  - [setLogging](#setlogging)\n- [Configuration](#configuration)\n  - [Request Matcher](#request-matcher)\n  - [Response](#response)\n- [Examples](#examples)\n  - [Tests with own mocks](#tests-with-own-mocks)\n  - [Tests with shared mocks](#tests-with-shared-mocks)\n  - [Mocking network calls during development](#mocking-network-calls-during-development)\n  - [Debugging API calls during development](#debugging-api-calls-during-development)\n  - [Proxying real responses](#proxying-real-responses)\n\n## Installation\n\n```shell\nbun add @aryzing/bun-mock-fetch\n```\n\n## API\n\n### `mockFetch`\n\n```typescript\nmockFetch(requestMatcher: RequestMatcher, response: Response | ResponseFn): void\n```\n\nRegisters a mock. When `fetch` is called and the request matches `requestMatcher`, the provided `response` is returned instead of making a real network request. Each call adds a new mock. If multiple mocks match a request, the most recently registered mock takes precedence.\n\n### `clearFetchMocks`\n\n```typescript\nclearFetchMocks(): void\n```\n\nRemoves all registered mocks and restores the original built-in `fetch`. Clearing mocks does not alter [passthrough](#setpassthrough) or [logging](#setlogging) settings.\n\n### `json`\n\n```typescript\njson(data: unknown, init?: ResponseInit): Response\n```\n\nCreates a `Response` with the given data serialized as JSON and `Content-Type: application/json` set. Optional `init` is forwarded to the `Response` constructor and can be used to set a custom status code or additional headers.\n\n```typescript\nimport { json, mockFetch } from \"@aryzing/bun-mock-fetch\";\n\n// 200 JSON response.\nmockFetch(/example/, json({ message: \"Hello, world!\" }));\n\n// 201 JSON response.\nmockFetch(/example/, json({ id: 1 }, { status: 201 }));\n\n// 422 JSON error response.\nmockFetch(/example/, json({ error: \"Invalid input\" }, { status: 422 }));\n```\n\n### `setPassthrough`\n\n```typescript\nsetPassthrough(value: boolean): void\n```\n\nControls whether requests that don't match any mock are forwarded to the native built-in `fetch`. Enabled by default. Set to `false` to throw on unmatched requests instead.\n\n### `setLogging`\n\n```typescript\nsetLogging(value: boolean): void\n```\n\nEnables or disables debug logging. Disabled by default.\n\n## Configuration\n\n### Request Matcher\n\n```typescript\nimport { mockFetch } from \"@aryzing/bun-mock-fetch\";\n\n// Simple string matching.\nmockFetch(\"https://example.com\", new Response());\n\n// Using minimatch.\nmockFetch(\"https://example.com/foo/**\", new Response());\n\n// Using regex.\nmockFetch(/example/, new Response());\n\n// Using a matcher function.\nmockFetch((input, init) => {\n  // Check input examples.\n  if (typeof input === \"string\") return input.includes(\"example\");\n  if (input instanceof URL) return input.host.includes(\"example\");\n  if (input instanceof Request) return input.url.includes(\"example\");\n\n  // Check init example.\n  return init?.method === \"POST\";\n}, new Response());\n\n// Using a detailed matcher object. All properties are optional.\nmockFetch(\n  {\n    // Must match this string, glob, or regex.\n    url: \"https://example.com\",\n    // Must match this method (case-insensitive).\n    method: \"POST\",\n    // Must include these headers (case-insensitive) and match their values.\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n  },\n  new Response(),\n);\n```\n\n### Response\n\n```typescript\nimport { json, mockFetch } from \"@aryzing/bun-mock-fetch\";\n\n// Text response.\nmockFetch(/example/, new Response(\"Hello, world!\"));\n\n// JSON response.\nmockFetch(/example/, json({ message: \"Hello, world!\" }));\n\n// Response function.\nmockFetch(/example/, async ({ mockedRequest, input, init, nativeFetch }) => {\n  console.log(mockedRequest); // The matched mock request config.\n  console.log(input); // The 1st arg. to `fetch`.\n  console.log(init); // The 2nd arg. to `fetch`.\n\n  // Delayed response example, useful for spinners and timeouts.\n  await Bun.sleep(1000);\n\n  // Proxy the request or otherwise fetch data using the native built-in fetch.\n  const quote = await nativeFetch(\"https://example.com/quote-of-the-day\").then(\n    (r) => r.text(),\n  );\n\n  // Configure response based on request.\n  const name =\n    (await (input instanceof Request ? input : new Request(\"\", init)).text()) ||\n    \"guest\";\n\n  return new Response(`Hello ${name}! ${quote}`);\n});\n```\n\n## Examples\n\n### Tests with own mocks\n\n```typescript\nimport { clearFetchMocks, mockFetch } from \"@aryzing/bun-mock-fetch\";\n\nafterEach(() => {\n  clearFetchMocks();\n});\n\ntest(\"first test\", async () => {\n  mockFetch(\"https://api.example.com/data\", new Response(\"first\"));\n  expect(await exampleApiClient.getData()).toBe(\"first\");\n});\n\ntest(\"second test\", async () => {\n  mockFetch(\"https://api.example.com/data\", new Response(\"second\"));\n  expect(await exampleApiClient.getData()).toBe(\"second\");\n});\n```\n\n### Tests with shared mocks\n\n```typescript\nimport { clearFetchMocks, mockFetch } from \"@aryzing/bun-mock-fetch\";\n\nbeforeAll(() => {\n  mockFetch(\"https://foo.example.com/data\", new Response(\"foo\"));\n  mockFetch(\"https://bar.example.com/data\", new Response(\"bar\"));\n});\n\nafterAll(() => {\n  clearFetchMocks();\n});\n\ntest(\"first test\", async () => {\n  expect(await exampleFooClient()).toBe(\"foo\");\n});\n\ntest(\"second test\", async () => {\n  expect(await exampleFooClient()).toBe(\"foo\");\n  expect(await exampleBarClient()).toBe(\"bar\");\n});\n\ntest(\"third test\", async () => {\n  expect(await exampleBarClient()).toBe(\"bar\");\n});\n```\n\n### Mocking network calls during development\n\n```typescript\nimport { sdk } from \"@example/sdk\";\nimport { json, mockFetch } from \"@aryzing/bun-mock-fetch\";\n\nmockFetch(\"https://sdk.example.com/auth\", json({ token: \"abc...def\" }));\nmockFetch(\"https://sdk.example.com/shopping-cart\", json({ items: mockItems }));\n\nawait sdk.init(); // E.g., internally calls `/auth`\nconst items = await sdk.getShoppingCart();\nrender(items); // E.g., a UI framework\n```\n\n### Debugging API calls during development\n\nEnable logging to print every intercepted request to the console. Passthrough remains on so all unmatched requests still go through to the real network normally.\n\n```typescript\nimport { setLogging } from \"@aryzing/bun-mock-fetch\";\n\nsetLogging(true);\n\n// All fetch calls will now be logged to the console, e.g.:\n// [@aryzing/bun-mock-fetch]: Mocked fetch called with path: https://api.example.com/data\n// [@aryzing/bun-mock-fetch]: No matching mock found for request: https://api.example.com/data\n// [@aryzing/bun-mock-fetch]: Using built-in fetch for request: https://api.example.com/data\n```\n\nTo intercept a specific endpoint and inspect its request without affecting others:\n\n```typescript\nimport { json, mockFetch, setLogging } from \"@aryzing/bun-mock-fetch\";\n\nsetLogging(true);\n\nmockFetch(\"https://api.example.com/flaky-endpoint\", async ({ input, init }) => {\n  console.log(\"request headers:\", init?.headers);\n  return json({ debug: true });\n});\n```\n\n### Proxying real responses\n\nUse `nativeFetch` to forward the request to the real network and modify the response before returning it.\n\n```typescript\nimport { mockFetch } from \"@aryzing/bun-mock-fetch\";\n\n// Inject a field into every response from an endpoint.\nmockFetch(\n  \"https://api.example.com/users\",\n  async ({ input, init, nativeFetch }) => {\n    const response = await nativeFetch(input, init);\n    const data = await response.json();\n    return Response.json({ ...data, injected: true });\n  },\n);\n\n// Add an auth header to outgoing requests before forwarding.\nmockFetch(\n  \"https://api.example.com/**\",\n  async ({ input, init, nativeFetch }) => {\n    return nativeFetch(input, {\n      ...init,\n      headers: { ...init?.headers, Authorization: \"Bearer token123\" },\n    });\n  },\n);\n```\n","readmeFilename":"README.md"}