File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,18 +13,14 @@ jobs:
1313 build :
1414 runs-on : ubuntu-latest
1515
16- strategy :
17- matrix :
18- node-version : [22.x, 24.x]
19-
2016 steps :
2117 - name : Checkout
2218 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2319
24- - name : Use Node.js ${{ matrix.node-version }}
20+ - name : Use Node.js
2521 uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2622 with :
27- node-version : ${{ matrix.node-version }}
23+ node-version : ' lts/* '
2824 check-latest : true
2925 package-manager-cache : false
3026
3430 - recursive: true
3531 args: [--no-frozen-lockfile]
3632
37- - name : Build
33+ - name : Lintd
3834 working-directory : package
39- run : pnpm lint && pnpm build
35+ run : pnpm lint
4036
37+ - name : Build
38+ working-directory : package
39+ run : pnpm build
Original file line number Diff line number Diff line change 4242 with :
4343 run_install : |
4444 - recursive: true
45- args: [--no- frozen-lockfile]
45+ args: [--frozen-lockfile]
4646
4747 # No need to install dependencies - npm version works without them
4848 - name : Version bump
5151 VERSION=$(pnpm version "$VERSION_TYPE" --no-git-tag-version)
5252 echo "version=$VERSION" >> "$GITHUB_OUTPUT"
5353 pnpm --recursive exec pnpm pkg set version=$(node -p "JSON.parse(fs.readFileSync('package.json', 'utf8')).version")
54+ pnpm install --no-frozen-lockfile
5455 env :
5556 VERSION_TYPE : ${{ github.event.inputs.version }}
5657
Original file line number Diff line number Diff line change 66 "keywords" : [],
77 "author" : " " ,
88 "license" : " ISC" ,
9- "packageManager" : " pnpm@10.29.2 " ,
9+ "packageManager" : " pnpm@10.30.1 " ,
1010 "engines" : {
1111 "node" : " >=22.0.0"
1212 }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ const eslintConfig = defineConfig(
2727 'cdk.out' ,
2828 'dist' ,
2929 'bin' ,
30+ 'esm' ,
3031 ] ,
3132 } ,
3233 eslint . configs . recommended ,
Original file line number Diff line number Diff line change 3838 "devDependencies" : {
3939 "@eslint/compat" : " ^2.0.2" ,
4040 "@eslint/js" : " ^10.0.1" ,
41- "@stylistic/eslint-plugin" : " ^5.8 .0" ,
41+ "@stylistic/eslint-plugin" : " ^5.9 .0" ,
4242 "@swc/cli" : " ^0.8.0" ,
4343 "@swc/core" : " ^1.15.11" ,
44- "@types/node" : " ^25.2.3 " ,
44+ "@types/node" : " ^25.3.0 " ,
4545 "@vitest/coverage-v8" : " ^4.0.18" ,
4646 "chokidar" : " ^5.0.0" ,
4747 "eslint" : " ^10.0.0" ,
Original file line number Diff line number Diff line change @@ -60,13 +60,18 @@ export async function token(
6060 if ( error instanceof Error ) {
6161 // Use predefined error messages to avoid information leakage
6262 if ( error . message . includes ( 'PKCS8' ) ) {
63- throw new Error ( 'JWT token generation failed: Invalid key format' ) ;
63+ throw new Error ( 'JWT token generation failed: Invalid key format' , error ) ;
6464 } else if ( error . message . includes ( 'sign' ) ) {
65- throw new Error ( 'JWT token generation failed: Signing operation failed' ) ;
65+ throw new Error ( 'JWT token generation failed: Signing operation failed' , error ) ;
6666 }
67- throw new Error ( 'JWT token generation failed: Internal error' ) ;
67+ throw new Error ( 'JWT token generation failed: Internal error' , error ) ;
68+ }
69+ if ( error ) {
70+ throw new Error ( 'JWT token generation failed: Unknown error occurred' , error ) ;
71+ } else {
72+ // eslint-disable-next-line preserve-caught-error
73+ throw new Error ( 'JWT token generation failed: Unknown error occurred' ) ;
6874 }
69- throw new Error ( 'JWT token generation failed: Unknown error occurred' ) ;
7075 }
7176} ;
7277
You can’t perform that action at this time.
0 commit comments