Skip to content

Commit

Permalink
Update fastify-error dependency (#3857)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Apr 28, 2022
1 parent a985b69 commit e295181
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions fastify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FastifyInstance } from './types/instance'
import { FastifyServerFactory } from './types/serverFactory'
import { Options as AjvOptions } from '@fastify/ajv-compiler'
import { Options as FJSOptions } from '@fastify/fast-json-stringify-compiler'
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'
import { FastifyReply } from './types/reply'
import { FastifySchemaValidationError } from './types/schema'
import { ConstructorAction, ProtoAction } from "./types/content-type-parser";
Expand Down Expand Up @@ -174,7 +174,7 @@ export type FastifyServerOptions<

type TrustProxyFunction = (address: string, hop: number) => boolean

declare module 'fastify-error' {
declare module '@fastify/error' {
interface FastifyError {
validation?: ValidationResult[];
}
Expand All @@ -199,7 +199,7 @@ export { FastifyContext, FastifyContextConfig } from './types/context'
export { RouteHandler, RouteHandlerMethod, RouteOptions, RouteShorthandMethod, RouteShorthandOptions, RouteShorthandOptionsWithHandler } from './types/route'
export * from './types/register'
export { FastifyBodyParser, FastifyContentTypeParser, AddContentTypeParser, hasContentTypeParser, getDefaultJsonParser, ProtoAction, ConstructorAction } from './types/content-type-parser'
export { FastifyError } from 'fastify-error'
export { FastifyError } from '@fastify/error'
export { FastifySchema, FastifySchemaCompiler } from './types/schema'
export { HTTPMethods, RawServerBase, RawRequestDefaultExpression, RawReplyDefaultExpression, RawServerDefault, ContextConfigDefault, RequestBodyDefault, RequestQuerystringDefault, RequestParamsDefault, RequestHeadersDefault } from './types/utils'
export * from './types/hooks'
Expand Down
2 changes: 1 addition & 1 deletion lib/errors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const createError = require('fastify-error')
const createError = require('@fastify/error')
const codes = {
/**
* Basic
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@
},
"dependencies": {
"@fastify/ajv-compiler": "^3.1.0",
"@fastify/error": "^2.0.0",
"@fastify/fast-json-stringify-compiler": "^1.0.0",
"abstract-logging": "^2.0.1",
"avvio": "^8.1.0",
"fastify-error": "^1.1.0",
"find-my-way": "^5.3.0",
"light-my-request": "^4.7.0",
"pino": "^7.5.1",
Expand Down
2 changes: 1 addition & 1 deletion test/types/hooks.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'
import { expectAssignable, expectError, expectType } from 'tsd'
import fastify, {
FastifyInstance,
Expand Down
2 changes: 1 addition & 1 deletion test/types/plugin.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as http from 'http'
import * as https from 'https'
import { expectType, expectError, expectAssignable } from 'tsd'
import { FastifyPluginCallback, FastifyPluginAsync } from '../../types/plugin'
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'

// FastifyPlugin & FastifyRegister
interface TestOptions extends FastifyPluginOptions {
Expand Down
2 changes: 1 addition & 1 deletion test/types/route.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expectType, expectError, expectAssignable, printType } from 'tsd'
import { HTTPMethods } from '../../types/utils'
import * as http from 'http'
import { RequestPayload } from '../../types/hooks'
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'

/*
* Testing Fastify HTTP Routes and Route Shorthands.
Expand Down
2 changes: 1 addition & 1 deletion types/hooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RouteOptions, RouteGenericInterface } from './route'
import { RawServerBase, RawServerDefault, RawRequestDefaultExpression, RawReplyDefaultExpression, ContextConfigDefault } from './utils'
import { FastifyRequest } from './request'
import { FastifyReply } from './reply'
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'
import { FastifyLoggerInstance } from './logger'
import {
FastifyRequestType,
Expand Down
2 changes: 1 addition & 1 deletion types/instance.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'
import { CallbackFunc as LightMyRequestCallback, Chain as LightMyRequestChain, InjectOptions, Response as LightMyRequestResponse } from 'light-my-request'
import { AddContentTypeParser, ConstructorAction, FastifyBodyParser, getDefaultJsonParser, hasContentTypeParser, ProtoAction, removeAllContentTypeParsers, removeContentTypeParser } from './content-type-parser'
import { onCloseAsyncHookHandler, onCloseHookHandler, onErrorAsyncHookHandler, onErrorHookHandler, onReadyAsyncHookHandler, onReadyHookHandler, onRegisterHookHandler, onRequestAsyncHookHandler, onRequestHookHandler, onResponseAsyncHookHandler, onResponseHookHandler, onRouteHookHandler, onSendAsyncHookHandler, onSendHookHandler, onTimeoutAsyncHookHandler, onTimeoutHookHandler, preHandlerAsyncHookHandler, preHandlerHookHandler, preParsingAsyncHookHandler, preParsingHookHandler, preSerializationAsyncHookHandler, preSerializationHookHandler, preValidationAsyncHookHandler, preValidationHookHandler } from './hooks'
Expand Down
2 changes: 1 addition & 1 deletion types/logger.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'
import { RouteGenericInterface } from './route'
import { FastifyRequest } from './request'
import { FastifyReply } from './reply'
Expand Down
2 changes: 1 addition & 1 deletion types/route.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FastifyReply, ReplyGenericInterface } from './reply'
import { FastifySchema, FastifySchemaCompiler, FastifySchemaValidationError, FastifySerializerCompiler } from './schema'
import { HTTPMethods, RawServerBase, RawServerDefault, RawRequestDefaultExpression, RawReplyDefaultExpression, ContextConfigDefault } from './utils'
import { preValidationHookHandler, preHandlerHookHandler, preSerializationHookHandler, onRequestHookHandler, preParsingHookHandler, onResponseHookHandler, onSendHookHandler, onErrorHookHandler, onTimeoutHookHandler } from './hooks'
import { FastifyError } from 'fastify-error'
import { FastifyError } from '@fastify/error'
import { FastifyContext } from './context'
import {
FastifyRequestType,
Expand Down

0 comments on commit e295181

Please sign in to comment.