Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from got to ky #76

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Conversation

tommy-mitchell
Copy link
Contributor

@tommy-mitchell tommy-mitchell commented Feb 20, 2024

Per #75. Supersedes #74 and re-enables tsd tests.

How should proxy support work? Seeing as ky doesn't support proxies: sindresorhus/ky#526

package-json/index.js

Lines 55 to 65 in 7238462

const gotOptions = {
headers,
agent: {
http: httpAgent,
https: httpsAgent,
},
};
if (options.agent) {
gotOptions.agent = options.agent;
}

@sindresorhus
Copy link
Owner

sindresorhus commented Feb 20, 2024

How should proxy support work? Seeing as ky doesn't support proxies:

I don't think there's a way to make it work. Users could set up a global proxy though, which may be a better solution. Not really something I care much about.

Comment on lines -8 to -13
// These agent options are chosen to match the npm client defaults and help with performance
// See: `npm config get maxsockets` and #50
const agentOptions = {
keepAlive: true,
maxSockets: 50,
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is maxSockets relevant to ky? I added the keepalive option.

@sindresorhus sindresorhus merged commit b4ee1c7 into sindresorhus:main Feb 20, 2024
2 checks passed
@tommy-mitchell
Copy link
Contributor Author

@sindresorhus I think #74 can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants