From 31838ea1edc838520db791f57f8972b2674af619 Mon Sep 17 00:00:00 2001 From: Michael Hart Date: Mon, 12 Feb 2024 16:37:20 +1100 Subject: [PATCH] Add types field for newer TS versions Fixes #56 #57 #58 #60 --- .vscode/settings.json | 2 +- package.json | 21 ++++++++++++--------- tsconfig.json | 3 ++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b269e4..18fa144 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "typescript.tsdk": "node_modules/typescript/lib", "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" } } diff --git a/package.json b/package.json index 4ea1e45..1bc6f7c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,10 @@ "description": "A compact AWS client for modern JS environments", "author": "Michael Hart (https://github.com/mhart)", "license": "MIT", - "repository": "github:mhart/aws4fetch", + "repository": { + "type": "git", + "url": "git+https://github.com/mhart/aws4fetch.git" + }, "main": "dist/aws4fetch.cjs.js", "module": "dist/aws4fetch.esm.js", "browser": "dist/aws4fetch.umd.js", @@ -14,7 +17,8 @@ "worker": "./dist/aws4fetch.esm.js", "browser": "./dist/aws4fetch.umd.js", "require": "./dist/aws4fetch.cjs.js", - "default": "./dist/aws4fetch.umd.js" + "default": "./dist/aws4fetch.umd.js", + "types": "./dist/main.d.ts" } }, "types": "dist/main.d.ts", @@ -32,15 +36,14 @@ "integration": "node test/integration.js" }, "devDependencies": { - "eslint": "^8.24.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.26.0", + "eslint": "^8.56.0", + "eslint-config-standard": "^17.1.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.0.1", - "eslint-plugin-standard": "^5.0.0", - "puppeteer": "^18.0.5", + "eslint-plugin-promise": "^6.1.1", + "puppeteer": "^22.0.0", "rollup": "^2.79.1", "rollup-plugin-cleanup": "^3.2.1", - "typescript": "^4.8.4" + "typescript": "^4.9.5" } } diff --git a/tsconfig.json b/tsconfig.json index adfde01..53c1d4e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "ES2016", + "moduleResolution": "node", "rootDir": "src", "outDir": "dist", "allowJs": true, @@ -8,7 +9,7 @@ "strict": true, "noImplicitAny": true, "strictNullChecks": true, - "noUnusedLocals": true + "noUnusedLocals": true, }, "include": ["src/**/*"] }