Skip to content

Commit

Permalink
chore!: bump fastify@5 (#260)
Browse files Browse the repository at this point in the history
* chore!: bump fastify@5

* fix: decorator
  • Loading branch information
climba03003 authored Oct 7, 2024
1 parent 63760da commit 5e3b45e
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 120 deletions.
2 changes: 1 addition & 1 deletion packages/config/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function build <T = EnvSchemaData> (options: EnvSchemaOpt<T>): { env: T,
done()
}
FastifyPlugin(plugin, {
fastify: '4.x',
fastify: '5.x',
name: '@kakang/fastify-config',
decorators: {
fastify: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"eslint": "^9.11.1",
"fastify": "^4.28.1",
"fastify": "^5.0.0",
"neostandard": "^0.11.6",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cronjob/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const plugin: FastifyPluginAsync<FastifyCronJobOption> = async function (fastify
}

export const fastifyCronJob = FastifyPlugin(plugin, {
fastify: '4.x',
fastify: '5.x',
name: '@kakang/fastify-cronjob',
decorators: {
fastify: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/cronjob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"eslint": "^9.11.1",
"fastify": "^4.28.1",
"fastify": "^5.0.0",
"mongodb": "^6.9.0",
"neostandard": "^0.11.6",
"rimraf": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/mongodb/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const plugin: FastifyPluginAsync<fastifyMongoDBOption> = async function (fastify
}

export const fastifyMongoDB = FastifyPlugin(plugin, {
fastify: '4.x',
fastify: '5.x',
name: '@kakang/fastify-mongodb',
decorators: {
fastify: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"eslint": "^9.11.1",
"fastify": "^4.28.1",
"fastify": "^5.0.0",
"mongodb": "^6.9.0",
"neostandard": "^0.11.6",
"rimraf": "^6.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/multipart/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ const plugin: FastifyPluginAsync<FastifyMultipartOption> = async function (fasti
throw FST_MP_CONFLICT_CONFIG()
}

fastify.decorateRequest(kAdapter, null)
fastify.decorateRequest(kStorage, null)
fastify.decorateRequest(kAdapter)
fastify.decorateRequest(kStorage)
fastify.decorateRequest(kIsMultipart, false)
fastify.decorateRequest(kIsMultipartParsed, false)
fastify.decorateRequest('files', null)
Expand Down Expand Up @@ -271,7 +271,7 @@ const plugin: FastifyPluginAsync<FastifyMultipartOption> = async function (fasti
}

export const FastifyMultipart = FastifyPlugin(plugin, {
fastify: '4.x',
fastify: '5.x',
name: '@kakang/fastify-multipart',
dependencies: [],
})
Expand Down
2 changes: 1 addition & 1 deletion packages/multipart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"eslint": "^9.11.1",
"fastify": "^4.28.1",
"fastify": "^5.0.0",
"formidable": "^3.5.1",
"neostandard": "^0.11.6",
"rimraf": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/multipart/test/create-fastify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function createFastify (t: TestContext, options?: FastifyMultipartO
const inline = parseMode.inline ?? false
const iterator = parseMode.iterator ?? false
const formData = parseMode.formData ?? false
const fastify = Fastify(fastifyOptions)
const fastify = Fastify({ ...fastifyOptions })

await fastify.register(FastifyMultipart, options)

Expand Down
8 changes: 4 additions & 4 deletions packages/multipart/test/warning.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { request } from './request'

test('multipart already parsed', async function (t) {
t.test('addHook', async function (t) {
const fastify = Fastify(fastifyOptions)
const fastify = Fastify({ ...fastifyOptions })

t.after(async function () {
await fastify.close()
Expand Down Expand Up @@ -57,7 +57,7 @@ test('multipart already parsed', async function (t) {
})

t.test('parseMultipart', async function (t) {
const fastify = Fastify(fastifyOptions)
const fastify = Fastify({ ...fastifyOptions })

t.after(async function () {
await fastify.close()
Expand Down Expand Up @@ -104,7 +104,7 @@ test('multipart already parsed', async function (t) {

t.test('multipart', async function (t) {
const ok: typeof t.ok = t.ok
const fastify = Fastify(fastifyOptions)
const fastify = Fastify({ ...fastifyOptions })

t.after(async function () {
await fastify.close()
Expand Down Expand Up @@ -154,7 +154,7 @@ test('multipart already parsed', async function (t) {

t.test('formData', async function (t) {
const ok: typeof t.ok = t.ok
const fastify = Fastify(fastifyOptions)
const fastify = Fastify({ ...fastifyOptions })

t.after(async function () {
await fastify.close()
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth2/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const plugin: FastifyPluginAsync<FastifyOAuthOption> = async function (fastify,
}

export const FastifyOAuth2 = FastifyPlugin(plugin, {
fastify: '4.x',
fastify: '5.x',
name: '@kakang/fastify-oauth2',
dependencies: [],
})
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"eslint": "^9.11.1",
"fastify": "^4.28.1",
"fastify": "^5.0.0",
"neostandard": "^0.11.6",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/static/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const plugin: FastifyPluginAsync<FastifyStaticOption> = async function (fastify,
}

export const FastifyStatic = FastifyPlugin(plugin, {
fastify: '4.x',
fastify: '5.x',
name: '@kakang/fastify-static',
decorators: {
fastify: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"eslint": "^9.11.1",
"fastify": "^4.28.1",
"fastify": "^5.0.0",
"neostandard": "^0.11.6",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
Expand Down
Loading

0 comments on commit 5e3b45e

Please sign in to comment.