Skip to content

Commit

Permalink
Update for v5 (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalshareef committed Mar 20, 2024
1 parent 81f5d21 commit 4d49b6a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
test:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.1.0
with:
lint: true
license-check: true
4 changes: 0 additions & 4 deletions .taprc

This file was deleted.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "commonjs",
"types": "types/index.d.ts",
"scripts": {
"coverage": "tap --cov --coverage-report=html test",
"coverage": "tap --coverage-report=html test",
"lint": "standard",
"lint:fix": "standard --fix",
"test": "npm run test:unit && npm run test:typescript",
Expand All @@ -31,19 +31,19 @@
},
"homepage": "https://github.com/fastify/fastify-cors#readme",
"devDependencies": {
"@fastify/pre-commit": "^2.0.2",
"@types/node": "^20.1.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@fastify/pre-commit": "^2.1.0",
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"cors": "^2.8.5",
"fastify": "^4.0.0-rc.2",
"standard": "^17.0.0",
"tap": "16.3.9",
"tsd": "^0.30.0",
"typescript": "^5.0.2"
"fastify": "^4.26.2",
"standard": "^17.1.0",
"tap": "18.7.1",
"tsd": "^0.30.7",
"typescript": "^5.4.2"
},
"dependencies": {
"fastify-plugin": "^4.0.0",
"fastify-plugin": "^4.5.1",
"mnemonist": "0.39.8"
},
"tsd": {
Expand Down
2 changes: 1 addition & 1 deletion test/hooks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test('Should error on invalid hook option', async (t) => {
t.plan(1)

const fastify = Fastify()
t.rejects(fastify.register(cors, { hook: 'invalid' }), new TypeError('@fastify/cors: Invalid hook option provided.'))
t.rejects(async () => fastify.register(cors, { hook: 'invalid' }), new TypeError('@fastify/cors: Invalid hook option provided.'))
})

test('Should set hook onRequest if hook option is not set', async (t) => {
Expand Down

0 comments on commit 4d49b6a

Please sign in to comment.