From 35d40c3518f14bb9d14bc0ecca41b5dea05ccc98 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Tue, 29 Jun 2021 10:02:45 -0300 Subject: [PATCH 1/2] Transpile to ES5 to support IE11 --- tsconfig.build.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index 46382618c..41ab4259d 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -16,7 +16,9 @@ "noUnusedParameters": true, "sourceMap": true, "strict": true, - "target": "es6", + "target": "es5", + "lib": ["es6", "dom"], + "downlevelIteration": true, "resolveJsonModule": true, "jsx": "react", "outDir": "./dist", From 642742a41890b1a3e4292033eff4216191fbcd0b Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Tue, 29 Jun 2021 11:26:45 -0300 Subject: [PATCH 2/2] Exclude constructor line from coverage --- package-lock.json | 2 +- src/utils/errors.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ceecd392..d2facd6a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@auth0/nextjs-auth0", - "version": "1.4.0", + "version": "1.4.2", "license": "MIT", "dependencies": { "base64url": "^3.0.1", diff --git a/src/utils/errors.ts b/src/utils/errors.ts index ee1353666..3ca7e1c5b 100644 --- a/src/utils/errors.ts +++ b/src/utils/errors.ts @@ -9,7 +9,7 @@ export class AccessTokenError extends Error { public code: string; constructor(code: string, message: string) { - super(message); + super(message) /* istanbul ignore next */; // Saving class name in the property of our custom error as a shortcut. this.name = this.constructor.name; @@ -49,7 +49,7 @@ export class HandlerError extends Error { public code: string | undefined; constructor(error: Error | AccessTokenError | HttpError) { - super(htmlSafe(error.message)); + super(htmlSafe(error.message)) /* istanbul ignore next */; this.name = error.name;