From e571377eb96fb0cbd7f138b757a208a67072bc96 Mon Sep 17 00:00:00 2001 From: Noah Zinsmeister Date: Mon, 28 Feb 2022 18:15:51 -0500 Subject: [PATCH] only emit CJS --- packages/core/package.json | 15 +++++---------- packages/core/tsconfig.cjs.json | 7 ------- packages/core/tsconfig.json | 2 +- packages/eip1193/package.json | 15 +++++---------- packages/eip1193/tsconfig.cjs.json | 7 ------- packages/eip1193/tsconfig.json | 2 +- packages/empty/package.json | 15 +++++---------- packages/empty/tsconfig.cjs.json | 7 ------- packages/empty/tsconfig.json | 2 +- packages/frame/package.json | 15 +++++---------- packages/frame/tsconfig.cjs.json | 7 ------- packages/frame/tsconfig.json | 2 +- packages/magic/package.json | 15 +++++---------- packages/magic/tsconfig.cjs.json | 7 ------- packages/magic/tsconfig.json | 2 +- packages/metamask/package.json | 15 +++++---------- packages/metamask/tsconfig.cjs.json | 7 ------- packages/metamask/tsconfig.json | 2 +- packages/network/package.json | 15 +++++---------- packages/network/tsconfig.cjs.json | 7 ------- packages/network/tsconfig.json | 2 +- packages/store/package.json | 15 +++++---------- packages/store/tsconfig.cjs.json | 7 ------- packages/store/tsconfig.json | 2 +- packages/types/package.json | 15 +++++---------- packages/types/tsconfig.cjs.json | 7 ------- packages/types/tsconfig.json | 2 +- packages/url/package.json | 15 +++++---------- packages/url/tsconfig.cjs.json | 7 ------- packages/url/tsconfig.json | 2 +- packages/walletconnect/package.json | 15 +++++---------- packages/walletconnect/tsconfig.cjs.json | 7 ------- packages/walletconnect/tsconfig.json | 2 +- packages/walletlink/package.json | 15 +++++---------- packages/walletlink/tsconfig.cjs.json | 7 ------- packages/walletlink/tsconfig.json | 2 +- tsconfig.cjs.json | 7 ------- tsconfig.json | 2 +- 38 files changed, 73 insertions(+), 224 deletions(-) delete mode 100644 packages/core/tsconfig.cjs.json delete mode 100644 packages/eip1193/tsconfig.cjs.json delete mode 100644 packages/empty/tsconfig.cjs.json delete mode 100644 packages/frame/tsconfig.cjs.json delete mode 100644 packages/magic/tsconfig.cjs.json delete mode 100644 packages/metamask/tsconfig.cjs.json delete mode 100644 packages/network/tsconfig.cjs.json delete mode 100644 packages/store/tsconfig.cjs.json delete mode 100644 packages/types/tsconfig.cjs.json delete mode 100644 packages/url/tsconfig.cjs.json delete mode 100644 packages/walletconnect/tsconfig.cjs.json delete mode 100644 packages/walletlink/tsconfig.cjs.json delete mode 100644 tsconfig.cjs.json diff --git a/packages/core/package.json b/packages/core/package.json index a8d785ae3..b789d8f3e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -13,18 +13,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/core/tsconfig.cjs.json b/packages/core/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/core/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/eip1193/package.json b/packages/eip1193/package.json index ddead3b78..b7ead503d 100644 --- a/packages/eip1193/package.json +++ b/packages/eip1193/package.json @@ -14,18 +14,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/eip1193/tsconfig.cjs.json b/packages/eip1193/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/eip1193/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/eip1193/tsconfig.json b/packages/eip1193/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/eip1193/tsconfig.json +++ b/packages/eip1193/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index 87ad2859f..56a7e114a 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -13,18 +13,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/empty/tsconfig.cjs.json b/packages/empty/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/empty/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/empty/tsconfig.json b/packages/empty/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/empty/tsconfig.json +++ b/packages/empty/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/frame/package.json b/packages/frame/package.json index d67fed3d9..b00445e2f 100644 --- a/packages/frame/package.json +++ b/packages/frame/package.json @@ -14,18 +14,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/frame/tsconfig.cjs.json b/packages/frame/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/frame/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/frame/tsconfig.json b/packages/frame/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/frame/tsconfig.json +++ b/packages/frame/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/magic/package.json b/packages/magic/package.json index 8b59d1a99..84eda4c6f 100644 --- a/packages/magic/package.json +++ b/packages/magic/package.json @@ -14,18 +14,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/magic/tsconfig.cjs.json b/packages/magic/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/magic/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/magic/tsconfig.json b/packages/magic/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/magic/tsconfig.json +++ b/packages/magic/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/metamask/package.json b/packages/metamask/package.json index 7c80984d3..263d94327 100644 --- a/packages/metamask/package.json +++ b/packages/metamask/package.json @@ -14,18 +14,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/metamask/tsconfig.cjs.json b/packages/metamask/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/metamask/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/metamask/tsconfig.json b/packages/metamask/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/metamask/tsconfig.json +++ b/packages/metamask/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/network/package.json b/packages/network/package.json index a44f7a963..a960980d6 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -13,18 +13,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/network/tsconfig.cjs.json b/packages/network/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/network/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/network/tsconfig.json b/packages/network/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/network/tsconfig.json +++ b/packages/network/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/store/package.json b/packages/store/package.json index a9d3a04ad..605d10011 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -13,18 +13,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/store/tsconfig.cjs.json b/packages/store/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/store/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/store/tsconfig.json b/packages/store/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/store/tsconfig.json +++ b/packages/store/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/types/package.json b/packages/types/package.json index 28948e95c..05a1697e0 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -13,18 +13,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/types/tsconfig.cjs.json b/packages/types/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/types/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/url/package.json b/packages/url/package.json index 94e8aa54e..5dc606e94 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -13,18 +13,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/url/tsconfig.cjs.json b/packages/url/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/url/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/url/tsconfig.json b/packages/url/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/url/tsconfig.json +++ b/packages/url/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/walletconnect/package.json b/packages/walletconnect/package.json index f4a3b066c..736273fcc 100644 --- a/packages/walletconnect/package.json +++ b/packages/walletconnect/package.json @@ -14,18 +14,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/walletconnect/tsconfig.cjs.json b/packages/walletconnect/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/walletconnect/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/walletconnect/tsconfig.json b/packages/walletconnect/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/walletconnect/tsconfig.json +++ b/packages/walletconnect/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/packages/walletlink/package.json b/packages/walletlink/package.json index 240163be1..43410a245 100644 --- a/packages/walletlink/package.json +++ b/packages/walletlink/package.json @@ -14,18 +14,13 @@ "files": [ "dist/*" ], - "exports": { - "types": "./dist/esm/index.d.ts", - "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js" - }, - "types": "./dist/esm/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.js", + "type": "commonjs", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", + "exports": "./dist/index.js", "scripts": { "prebuild": "rm -rf dist", - "build": "tsc && tsc --project tsconfig.cjs.json", - "postbuild": "mv dist/esm/index.js dist/esm/index.mjs", + "build": "tsc", "start": "tsc --watch" }, "dependencies": { diff --git a/packages/walletlink/tsconfig.cjs.json b/packages/walletlink/tsconfig.cjs.json deleted file mode 100644 index 08d87e8d8..000000000 --- a/packages/walletlink/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.cjs.json", - "include": ["./src"], - "compilerOptions": { - "outDir": "./dist/cjs" - } -} diff --git a/packages/walletlink/tsconfig.json b/packages/walletlink/tsconfig.json index cc2aa9f0a..67531bbb0 100644 --- a/packages/walletlink/tsconfig.json +++ b/packages/walletlink/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./src"], "compilerOptions": { - "outDir": "./dist/esm" + "outDir": "./dist" } } diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json deleted file mode 100644 index 035372f1f..000000000 --- a/tsconfig.cjs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "CommonJS", - "declaration": false, - } -} diff --git a/tsconfig.json b/tsconfig.json index 928d732ce..3e510d8f6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "@tsconfig/recommended/tsconfig.json", "compilerOptions": { - "module": "ES2020", + "module": "CommonJS", "declaration": true, "moduleResolution": "Node" },