diff --git a/index.js b/index.js index ebeadb5..d2bebeb 100644 --- a/index.js +++ b/index.js @@ -25,12 +25,11 @@ if (!globalThis.AbortController) { if (!globalThis.ReadableStream) { try { - // eslint-disable-next-line node/file-extension-in-import, node/no-unsupported-features/es-syntax globalThis.ReadableStream = await import('web-streams-polyfill/ponyfill/es2018'); } catch {} } -const {default: ky, HTTPError, TimeoutError} = await import('ky'); // eslint-disable-line node/no-unsupported-features/es-syntax +const {default: ky, HTTPError, TimeoutError} = await import('ky'); export default ky; export {HTTPError, TimeoutError}; diff --git a/index.test-d.ts b/index.test-d.ts index 81ae831..6ab77a7 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -1,4 +1,4 @@ import {expectType} from 'tsd'; -import ky, {ResponsePromise} from '.'; +import ky, {type ResponsePromise} from './index.js'; expectType(ky('https://sindresorhus.com')); diff --git a/package.json b/package.json index bf79521..ac3fcb7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "default": "./browser.js" }, "engines": { - "node": ">=14" + "node": ">=14.16" }, "scripts": { "test": "xo && ava && tsd" @@ -60,17 +60,17 @@ ], "dependencies": { "abort-controller": "^3.0.0", - "node-fetch": "^3.2.2" + "node-fetch": "^3.2.10" }, "devDependencies": { - "ava": "^4.1.0", + "ava": "^4.3.3", "ky": "^0.31.4", - "tsd": "^0.19.1", - "xo": "^0.48.0" + "tsd": "^0.24.1", + "xo": "^0.52.4" }, "peerDependencies": { - "ky": ">=0.26.0", - "web-streams-polyfill": ">=3.0.1" + "ky": ">=0.31.4", + "web-streams-polyfill": ">=3.2.1" }, "peerDependenciesMeta": { "web-streams-polyfill": {