From 63d7955a315d5d59f947d175db1ee4b2cf7fa971 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 04:46:50 +0000 Subject: [PATCH 1/2] chore(deps): bump jwt-decode from 3.1.2 to 4.0.0 Bumps [jwt-decode](https://github.com/auth0/jwt-decode) from 3.1.2 to 4.0.0. - [Release notes](https://github.com/auth0/jwt-decode/releases) - [Changelog](https://github.com/auth0/jwt-decode/blob/main/CHANGELOG.md) - [Commits](https://github.com/auth0/jwt-decode/compare/v3.1.2...v4.0.0) --- updated-dependencies: - dependency-name: jwt-decode dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 +++++++++++-------- packages/custom-decorators/package-lock.json | 2 +- packages/custom-decorators/package.json | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3e87dc6c..25754c0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12285,9 +12285,12 @@ } }, "node_modules/jwt-decode": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", - "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", + "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==", + "engines": { + "node": ">=18" + } }, "node_modules/keyv": { "version": "4.5.4", @@ -19051,7 +19054,7 @@ "version": "1.3.10", "license": "ISC", "dependencies": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" }, "peerDependencies": { "@nestjs/common": ">=8", @@ -19156,7 +19159,7 @@ "@algoan/nestjs-custom-decorators": { "version": "file:packages/custom-decorators", "requires": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" } }, "@algoan/nestjs-google-pubsub-client": { @@ -28233,9 +28236,9 @@ } }, "jwt-decode": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", - "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", + "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==" }, "keyv": { "version": "4.5.4", diff --git a/packages/custom-decorators/package-lock.json b/packages/custom-decorators/package-lock.json index 81251197..471f3444 100644 --- a/packages/custom-decorators/package-lock.json +++ b/packages/custom-decorators/package-lock.json @@ -9,7 +9,7 @@ "version": "1.3.10", "license": "ISC", "dependencies": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" }, "peerDependencies": { "@nestjs/common": ">=8", diff --git a/packages/custom-decorators/package.json b/packages/custom-decorators/package.json index f417d235..13940a37 100644 --- a/packages/custom-decorators/package.json +++ b/packages/custom-decorators/package.json @@ -36,7 +36,7 @@ "url": "https://github.com/algoan/nestjs-components/issues" }, "dependencies": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" }, "peerDependencies": { "@nestjs/common": ">=8", From 800ab6f9e3f2cd32393134e8ff9dd061c8e3e266 Mon Sep 17 00:00:00 2001 From: Guillaume Ongenae Date: Wed, 8 Nov 2023 11:02:41 +0100 Subject: [PATCH 2/2] fix(custom-decorators): fix import of jwt decode --- packages/custom-decorators/src/decode-jwt.decorator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/custom-decorators/src/decode-jwt.decorator.ts b/packages/custom-decorators/src/decode-jwt.decorator.ts index 4b5feaf3..d5a2ec41 100644 --- a/packages/custom-decorators/src/decode-jwt.decorator.ts +++ b/packages/custom-decorators/src/decode-jwt.decorator.ts @@ -1,5 +1,5 @@ import { createParamDecorator, ExecutionContext, UnauthorizedException } from '@nestjs/common'; -import jwtDecode from 'jwt-decode'; +import { jwtDecode } from 'jwt-decode'; export const DecodeJWT: () => ParameterDecorator = createParamDecorator( async (_data: unknown, ctx: ExecutionContext): Promise => {