From 8aebb6e7cf6a90405e9237160471af5c244126cc Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Thu, 15 Sep 2022 14:19:56 +0200 Subject: [PATCH] build: update tsconfigs --- src/util/errors.ts | 1 + tsconfig/base.json | 3 ++- tsconfig/node-cjs.json | 1 + tsconfig/node-esm.json | 3 +-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/util/errors.ts b/src/util/errors.ts index 33fef5803e..ab215512ed 100644 --- a/src/util/errors.ts +++ b/src/util/errors.ts @@ -11,6 +11,7 @@ export class JOSEError extends Error { constructor(message?: string) { super(message) this.name = this.constructor.name + // @ts-ignore Error.captureStackTrace?.(this, this.constructor) } } diff --git a/tsconfig/base.json b/tsconfig/base.json index b83511fe8a..2550e0f966 100644 --- a/tsconfig/base.json +++ b/tsconfig/base.json @@ -3,7 +3,8 @@ "../src/index.ts" ], "compilerOptions": { - "lib": ["ES6", "DOM"], + "lib": ["ES2017", "DOM"], + "types": [], "strict": true, "forceConsistentCasingInFileNames": true, "noUnusedLocals": true, diff --git a/tsconfig/node-cjs.json b/tsconfig/node-cjs.json index a2b8840983..b687a496dd 100644 --- a/tsconfig/node-cjs.json +++ b/tsconfig/node-cjs.json @@ -1,6 +1,7 @@ { "extends": "./base.json", "compilerOptions": { + "types": ["node"], "target": "ES2019", "module": "CommonJS", "outDir": "../dist/node/cjs" diff --git a/tsconfig/node-esm.json b/tsconfig/node-esm.json index 5f7122d424..891f5da62e 100644 --- a/tsconfig/node-esm.json +++ b/tsconfig/node-esm.json @@ -1,7 +1,6 @@ { - "extends": "./base.json", + "extends": "./node-cjs.json", "compilerOptions": { - "target": "ES2019", "module": "ES2020", "outDir": "../dist/node/esm" }