From 837707d2ed03a7c6e69127849bf0c25ae182982d Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 16 Dec 2020 13:34:16 +0100 Subject: [PATCH] feat: update ufo to 0.5 (reducing bundle size) --- package.json | 2 +- src/fetch.ts | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c73730f0..610e3f74 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@nuxt/h2": "^0.0.14", - "@nuxt/ufo": "^0.3.1", + "@nuxt/ufo": "^0.5.0", "@nuxtjs/eslint-config-typescript": "latest", "@types/flat": "latest", "@types/jest": "latest", diff --git a/src/fetch.ts b/src/fetch.ts index a969b73c..15628f2b 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -1,5 +1,5 @@ import destr from 'destr' -import { joinURL, withParams } from '@nuxt/ufo' +import { joinURL, withQuery } from '@nuxt/ufo' import type { Fetch, RequestInfo, RequestInit, Response } from './types' import { createFetchError } from './error' @@ -29,7 +29,7 @@ export function createFetch ({ fetch }: CreateFetchOptions): $Fetch { request = joinURL(opts.baseURL, request) } if (opts.params) { - request = withParams(request, opts.params) + request = withQuery(request, opts.params) } } const response: FetchResponse = await fetch(request, opts) diff --git a/yarn.lock b/yarn.lock index c8a34db4..2320e501 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.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@nuxt/ufo/-/ufo-0.3.1.tgz#3dd07e8ddc1c1eb1b4fe54645f936fa9484228d0" - integrity sha512-AJ2+LO5MDQMZ31UPRQPQUz03zIlJ/huqrR+Mc4jzsFl/UihWniiB1FyhmitvIC19+Van5vK0x0Bhk5K/tmmBgA== +"@nuxt/ufo@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@nuxt/ufo/-/ufo-0.5.0.tgz#a84d5ce9dedee25b81fbbb4b44fef5ca2987af39" + integrity sha512-0My2z3nfJ8KTyz49/kyRBh0naoArsItDgfQP7qf38BfY8HAoiujFIANZyjpnq433UOU0wZqv0djHkydQX56FmQ== "@nuxtjs/eslint-config-typescript@latest": version "5.0.0"