File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## 0.6.1 - 11 Sep 2023
4
+ -[ #11 ] ( https://github.com/elysiajs/elysia-jwt/pull/11 ) Remove unused imports
5
+ -[ #10 ] ( https://github.com/elysiajs/elysia-jwt/pull/10 ) Meaningful type import
6
+ -[ #9 ] ( https://github.com/elysiajs/elysia-jwt/pull/9 ) s Add missing ESLint plugins
7
+ -[ #8 ] ( https://github.com/elysiajs/elysia-jwt/pull/8 ) Reformat CHANGELOG with
8
+ -[ #7 ] ( https://github.com/elysiajs/elysia-jwt/pull/7 ) Format README with Markdownlint
9
+ -[ #6 ] ( https://github.com/elysiajs/elysia-jwt/pull/6 ) Correct the schema validation
10
+ -[ #5 ] ( https://github.com/elysiajs/elysia-jwt/pull/5 ) Support KeyLike and Uint8Array as secret
11
+ -[ #4 ] ( https://github.com/elysiajs/elysia-jwt/pull/4 ) Remove unnecessary "as any"
12
+ -[ #3 ] ( https://github.com/elysiajs/elysia-jwt/pull/3 ) Schema alidator Security Fix
13
+
3
14
## 0.6.0 - 6 Aug 2023
4
15
5
16
- Add support for Elysia 0.6
Original file line number Diff line number Diff line change 31
31
"license" : " MIT" ,
32
32
"scripts" : {
33
33
"dev" : " bun run --hot example/index.ts" ,
34
- "test" : " bun wiptest && npm run test:node" ,
34
+ "test" : " bun test && npm run test:node" ,
35
35
"test:node" : " npm install --prefix ./test/node/cjs/ && npm install --prefix ./test/node/esm/ && node ./test/node/cjs/index.js && node ./test/node/esm/index.js" ,
36
36
"build" : " rimraf dist && tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json" ,
37
37
"release" : " npm run build && npm run test && npm publish --access public"
Original file line number Diff line number Diff line change 1
- import {
2
- ValidationError ,
3
- getSchemaValidator ,
4
- Elysia ,
5
- } from 'elysia'
1
+ import { Elysia , ValidationError , getSchemaValidator } from 'elysia'
6
2
7
3
import {
8
4
SignJWT ,
@@ -97,9 +93,8 @@ export const jwt = <
97
93
JWTOption < Name , Schema > ) => {
98
94
if ( ! secret ) throw new Error ( "Secret can't be empty" )
99
95
100
- const key = typeof secret === 'string'
101
- ? new TextEncoder ( ) . encode ( secret )
102
- : secret ;
96
+ const key =
97
+ typeof secret === 'string' ? new TextEncoder ( ) . encode ( secret ) : secret
103
98
104
99
const validator = schema
105
100
? getSchemaValidator (
You can’t perform that action at this time.
0 commit comments