Skip to content

Commit

Permalink
chore: update all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 12, 2021
1 parent 07e8509 commit f93fd90
Show file tree
Hide file tree
Showing 4 changed files with 420 additions and 405 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@
"node-fetch": "^2.6.1"
},
"devDependencies": {
"@nuxt/h2": "^0.0.14",
"@nuxt/ufo": "^0.5.0",
"@nuxtjs/eslint-config-typescript": "latest",
"@types/flat": "latest",
"@types/jest": "latest",
"@types/node": "latest",
"@types/node-fetch": "^2.5.7",
"destr": "^1.0.1",
"@types/node-fetch": "latest",
"destr": "latest",
"eslint": "latest",
"h3": "latest",
"jest": "latest",
"jiti": "^0.1.17",
"listhen": "^0.1.2",
"jiti": "latest",
"listhen": "latest",
"siroc": "latest",
"standard-version": "latest",
"ts-jest": "latest",
"typescript": "latest"
"typescript": "latest",
"ufo": "latest"
}
}
2 changes: 1 addition & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import destr from 'destr'
import { joinURL, withQuery } from '@nuxt/ufo'
import { joinURL, withQuery } from 'ufo'
import type { Fetch, RequestInfo, RequestInit, Response } from './types'
import { createFetchError } from './error'

Expand Down
8 changes: 4 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { listen, Listener } from 'listhen'
import { getParams } from '@nuxt/ufo'
import { createApp } from '@nuxt/h2'
import { getQuery } from 'ufo'
import { createApp } from 'h3'
import { $fetch, FetchError } from '../src/node'

describe('ohmyfetch', () => {
Expand All @@ -9,7 +9,7 @@ describe('ohmyfetch', () => {
it('setup', async () => {
const app = createApp()
.use('/ok', () => 'ok')
.use('/params', req => (getParams(req.url || '')))
.use('/params', req => (getQuery(req.url || '')))
.use('/url', req => req.url)
listener = await listen(app)
})
Expand All @@ -29,7 +29,7 @@ describe('ohmyfetch', () => {
it('404', async () => {
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.data).toMatchObject({ stack: [], statusCode: 404, statusMessage: 'Not Found' })
expect(err.response?.data).toBe(err.data)
expect(err.request).toBe(listener.getURL('404'))
})
Expand Down
Loading

0 comments on commit f93fd90

Please sign in to comment.