Skip to content

Commit

Permalink
Update for Fastify v5 (#332)
Browse files Browse the repository at this point in the history
* Update for Fastify v5

* remove --cov arg, enabled by default

* update @fastify/pre-commit to latest

* enable coverage

* ignored coverage error
  • Loading branch information
synapse authored Mar 26, 2024
1 parent 77721cc commit 27efd45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 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:
license-check: true
lint: true
5 changes: 2 additions & 3 deletions jwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,13 @@ function fastifyJwt (fastify, options, next) {
} catch (error) {
// Ignoring the else branch because it's not possible to test it,
// it's just a safeguard for future changes in the fast-jwt library
/* istanbul ignore next */
if (error.code === TokenError.codes.malformed) {
throw new AuthorizationTokenInvalidError(error.message)
} else if (error.code === TokenError.codes.invalidType) {
throw new AuthorizationTokenInvalidError(error.message)
} else {
} /* c8 ignore start */ else {
throw error
}
} /* c8 ignore stop */
}
}

Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "npm run lint && npm run test:unit && npm run test:typescript",
"test:typescript": "tsd",
"test:unit": "tap",
"test:unit:report": "tap --cov --coverage-report=html",
"test:unit:report": "tap --coverage-report=html",
"test:unit:verbose": "tap -Rspec"
},
"repository": {
Expand All @@ -32,20 +32,20 @@
},
"homepage": "https://github.com/fastify/fastify-jwt#readme",
"dependencies": {
"@fastify/error": "^3.0.0",
"@lukeed/ms": "^2.0.0",
"@fastify/error": "^3.4.1",
"@lukeed/ms": "^2.0.2",
"fast-jwt": "^4.0.0",
"fastify-plugin": "^4.0.0",
"fastify-plugin": "^4.5.1",
"steed": "^1.1.3"
},
"devDependencies": {
"@fastify/cookie": "^9.0.4",
"@fastify/pre-commit": "^2.0.2",
"@types/node": "^20.1.1",
"fastify": "^4.0.0-rc.2",
"standard": "^17.0.0",
"tap": "^16.0.0",
"tsd": "^0.30.0"
"@fastify/cookie": "^9.3.1",
"@fastify/pre-commit": "^2.1.0",
"@types/node": "^20.11.29",
"fastify": "^4.26.2",
"standard": "^17.1.0",
"tap": "^18.7.1",
"tsd": "^0.30.7"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit 27efd45

Please sign in to comment.