From 2bd819eee0d9c2334fee57eeec9e56a9986b100a Mon Sep 17 00:00:00 2001 From: Eoin Murphy Date: Tue, 24 Sep 2024 13:53:44 +0100 Subject: [PATCH] chore: no longer ship ts files in npm packages & bump target to es2019 --- npm-admin-client/package.json | 7 +++---- npm-admin-client/tsconfig.json | 7 ++++--- npm-client/package.json | 7 +++---- npm-client/tsconfig.json | 6 ++++-- tsconfig.json | 4 ++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/npm-admin-client/package.json b/npm-admin-client/package.json index 5cfc1d78..c5f52276 100644 --- a/npm-admin-client/package.json +++ b/npm-admin-client/package.json @@ -13,11 +13,10 @@ "url": "https://github.com/MonacoProtocol/protocol/issues" }, "homepage": "https://github.com/MonacoProtocol/protocol/blob/main/npm-admin-client/README.md", - "main": "src/index.js", - "module": "src/index.js", + "main": "dist/src/index.js", + "module": "dist/src/index.js", "files": [ - "/src", - "/types" + "/dist" ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/npm-admin-client/tsconfig.json b/npm-admin-client/tsconfig.json index 02218af1..6a7aabc9 100644 --- a/npm-admin-client/tsconfig.json +++ b/npm-admin-client/tsconfig.json @@ -1,9 +1,11 @@ { "compilerOptions": { - "target": "es5", + "target": "ES2019", + "lib": ["ES2019"], "module": "commonjs", - "allowJs": true, "declaration": true, + "outDir": "./dist", + "allowJs": true, "strict": true, "noImplicitAny": false, "esModuleInterop": true, @@ -12,7 +14,6 @@ "allowSyntheticDefaultImports": true, "baseUrl": "src", "downlevelIteration": true, - "lib": ["es2022", "dom"], "skipLibCheck": true }, "include": ["./src/", "./types/"] diff --git a/npm-client/package.json b/npm-client/package.json index c7476cfe..66646051 100644 --- a/npm-client/package.json +++ b/npm-client/package.json @@ -13,11 +13,10 @@ "url": "https://github.com/MonacoProtocol/protocol/issues" }, "homepage": "https://github.com/MonacoProtocol/protocol/blob/main/npm-client/README.md", - "main": "src/index.js", - "module": "src/index.js", + "main": "dist/src/index.js", + "module": "dist/src/index.js", "files": [ - "/src", - "/types" + "/dist" ], "scripts": { "build": "tsc --downlevelIteration", diff --git a/npm-client/tsconfig.json b/npm-client/tsconfig.json index 8e0c8ec3..2ec27a86 100644 --- a/npm-client/tsconfig.json +++ b/npm-client/tsconfig.json @@ -1,9 +1,11 @@ { "compilerOptions": { - "target": "es5", + "target": "ES2019", + "lib": ["ES2019"], "module": "commonjs", - "allowJs": true, "declaration": true, + "outDir": "./dist", + "allowJs": true, "strict": true, "noImplicitAny": false, "esModuleInterop": true, diff --git a/tsconfig.json b/tsconfig.json index 034ef270..f9997f44 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,9 @@ "compilerOptions": { "types": ["jest"], "typeRoots": ["./node_modules/@types"], - "lib": ["es2015"], + "target": "ES2019", + "lib": ["ES2019"], "module": "commonjs", - "target": "es6", "esModuleInterop": true, "resolveJsonModule": true }