From 549e286ef07bc491b29b541610589d6afd4cf5f6 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Wed, 12 Jul 2023 18:26:12 +0000 Subject: [PATCH] package.json: declare side-effects free --- esm/package.json | 5 +---- package.json | 1 + tsconfig.esm.json | 40 ++++++++++++++++++++++------------------ tsconfig.json | 42 +++++++++++++++++++++++------------------- 4 files changed, 47 insertions(+), 41 deletions(-) diff --git a/esm/package.json b/esm/package.json index 267769c..7f1fc33 100644 --- a/esm/package.json +++ b/esm/package.json @@ -1,7 +1,4 @@ { "type": "module", - "browser": { - "crypto": false, - "./crypto": "./esm/crypto.js" - } + "sideEffects": false } diff --git a/package.json b/package.json index 294f7e5..465cf07 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "prettier": "2.8.4", "typescript": "5.0.2" }, + "sideEffects": false, "main": "index.js", "exports": { ".": { diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 1f86353..fd1b9f9 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -1,20 +1,24 @@ { - "compilerOptions": { - "strict": true, - "outDir": "esm", - "target": "es2020", - "module": "es6", - "moduleResolution": "node16", - "noUnusedLocals": true, - "sourceMap": true, - "baseUrl": ".", - "paths": { - "@noble/hashes/crypto": [ "src/crypto" ] - }, + "compilerOptions": { + "outDir": "esm", + "target": "es2020", + "module": "es6", + "moduleResolution": "node16", + "baseUrl": ".", + "paths": { + "@noble/hashes/crypto": ["src/crypto"] }, - "include": ["src"], - "exclude": [ - "node_modules", - "lib", - ], -} \ No newline at end of file + "sourceMap": true, + "strict": true, + "allowSyntheticDefaultImports": false, + "allowUnreachableCode": false, + "esModuleInterop": false, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUncheckedIndexedAccess": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + }, + "include": ["src"], + "exclude": ["node_modules", "lib"] +} diff --git a/tsconfig.json b/tsconfig.json index 00245ad..00fe97e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,24 @@ { - "compilerOptions": { - "strict": true, - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "outDir": ".", - "target": "es2020", - "lib": ["es2020"], // Set explicitly to remove DOM - "module": "commonjs", - "moduleResolution": "node", - "noUnusedLocals": true, - "baseUrl": ".", - }, - "include": ["src"], - "exclude": [ - "node_modules", - "*.d.ts" - ], -} \ No newline at end of file + "compilerOptions": { + "outDir": ".", + "target": "es2020", + "lib": ["es2020"], // Set explicitly to remove DOM + "module": "commonjs", + "moduleResolution": "node", + "baseUrl": ".", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "strict": true, + "allowSyntheticDefaultImports": false, + "allowUnreachableCode": false, + "esModuleInterop": false, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUncheckedIndexedAccess": false, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": ["src"], + "exclude": ["node_modules", "*.d.ts"] +}