diff --git a/package.json b/package.json index e4b90480..ef040caa 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@nuxt/h2": "^0.0.14", - "@nuxt/ufo": "^0.1.4", + "@nuxt/ufo": "^0.3.0", "@nuxtjs/eslint-config-typescript": "latest", "@types/flat": "latest", "@types/jest": "latest", diff --git a/src/fetch.ts b/src/fetch.ts index a969b73c..d15a0791 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -1,5 +1,5 @@ import destr from 'destr' -import { joinURL, withParams } from '@nuxt/ufo' +import { withParams, joinURL } from '@nuxt/ufo' import type { Fetch, RequestInfo, RequestInit, Response } from './types' import { createFetchError } from './error' diff --git a/test/index.test.ts b/test/index.test.ts index 0fd3c4e2..6ceac161 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -27,7 +27,7 @@ describe('ohmyfetch', () => { }) it('404', async () => { - const err: FetchError = await $fetch(listener.getURL('404'), { baseURL: listener.url }).catch(err => err) + const err: FetchError = await $fetch(listener.getURL('404')).catch(err => err) expect(err.stack).toMatch('404 Not Found') expect(err.data).toMatch('Not Found (404)') expect(err.response?.data).toBe(err.data) diff --git a/yarn.lock b/yarn.lock index 46f026a0..331c18d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -513,10 +513,10 @@ resolved "https://registry.yarnpkg.com/@nuxt/ufo/-/ufo-0.0.3.tgz#7673a54b81c020e7aea3a9e01e09a58c494a1eca" integrity sha512-LQkuVafVNB9+ggRF7443AX1V1rEWRs32Frk7F2qnRLf8j/SzRzxEZ99jiZqxVho72zU7NcWQ6Jy62m4fkZC6Wg== -"@nuxt/ufo@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@nuxt/ufo/-/ufo-0.1.4.tgz#41967f00333821c8760f8ee71c50e37c534b7ac6" - integrity sha512-uEfXbPROYZcRbnkVS2NK2vklDpcfZOAjGaniuC4pKJAgHTx0A4f8uMC1R5BSTA8zNZAoweDc7pW6tqvu/JyIhQ== +"@nuxt/ufo@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@nuxt/ufo/-/ufo-0.3.0.tgz#166f05dba92924b145e9859dbb587b4f19567f7c" + integrity sha512-JeMBsBzy6tvZe4zuTC69v4FWP+498SF9zYLzuYJ7A8rNtNvNBtgfmg05zTYEtWyC9rx2WHtvisfpkqolvkqwXA== "@nuxtjs/eslint-config-typescript@latest": version "5.0.0"