Skip to content

Commit

Permalink
chore: update fastify
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfriesen committed Apr 29, 2022
1 parent 1f6fca5 commit b11959c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
"eslint-plugin-import": "2.26.0",
"eventsource": "2.0.0",
"fancy-log": "2.0.0",
"fastify": "3.28.0",
"fastify-cors": "6.0.3",
"fastify-formbody": "5.2.0",
"fastify-multipart": "5.3.1",
"fastify-static": "4.6.1",
"fastify": "3.29.0",
"@fastify/cors": "7.0.0",
"@fastify/formbody": "6.0.0",
"@fastify/multipart": "6.0.0",
"@fastify/static": "5.0.0",
"graphql": "15.8.0",
"graphql-tools": "8.2.5",
"gulp": "4.0.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/platform-fastify/adapters/fastify-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ export class FastifyAdapter<

public useStaticAssets(options: FastifyStaticOptions) {
return this.register(
loadPackage('fastify-static', 'FastifyAdapter.useStaticAssets()', () =>
require('fastify-static'),
loadPackage('@fastify/static', 'FastifyAdapter.useStaticAssets()', () =>
require('@fastify/static'),
),
options,
);
Expand Down Expand Up @@ -424,14 +424,14 @@ export class FastifyAdapter<
}

public enableCors(options: CorsOptions | CorsOptionsDelegate<TRequest>) {
this.register(import('fastify-cors'), options);
this.register(import('@fastify/cors'), options);
}

public registerParserMiddleware() {
if (this._isParserRegistered) {
return;
}
this.register(import('fastify-formbody'));
this.register(import('@fastify/formbody'));
this._isParserRegistered = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { FastifyStaticOptions, PointOfViewOptions } from './external';
export interface NestFastifyApplication extends INestApplication {
/**
* A wrapper function around native `fastify.register()` method.
* Example `app.register(require('fastify-formbody'))
* Example `app.register(require('@fastify/formbody'))
* @returns {Promise<FastifyInstance>}
*/
register<Options extends FastifyPluginOptions = any>(
Expand Down
6 changes: 3 additions & 3 deletions packages/platform-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"access": "public"
},
"dependencies": {
"fastify": "3.28.0",
"fastify-cors": "6.0.3",
"fastify-formbody": "5.2.0",
"fastify": "3.29.0",
"@fastify/cors": "7.0.0",
"@fastify/formbody": "6.0.0",
"light-my-request": "4.9.0",
"middie": "6.0.0",
"path-to-regexp": "3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion sample/17-mvc-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@nestjs/common": "8.2.3",
"@nestjs/core": "8.2.3",
"@nestjs/platform-fastify": "8.2.3",
"fastify-static": "4.5.0",
"@fastify/static": "5.0.0",
"handlebars": "4.7.7",
"point-of-view": "4.15.3",
"reflect-metadata": "0.1.13",
Expand Down

0 comments on commit b11959c

Please sign in to comment.