Skip to content

Commit

Permalink
Require Ky 0.31.4 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 12, 2022
1 parent 507f00b commit d5e243c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions index.js
Expand Up @@ -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};
2 changes: 1 addition & 1 deletion index.test-d.ts
@@ -1,4 +1,4 @@
import {expectType} from 'tsd';
import ky, {ResponsePromise} from '.';
import ky, {type ResponsePromise} from './index.js';

expectType<ResponsePromise>(ky('https://sindresorhus.com'));
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -16,7 +16,7 @@
"default": "./browser.js"
},
"engines": {
"node": ">=14"
"node": ">=14.16"
},
"scripts": {
"test": "xo && ava && tsd"
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit d5e243c

Please sign in to comment.