-
-
Notifications
You must be signed in to change notification settings - Fork 942
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
Got v10 beta feedback #876
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I tried got@10 and I stumbled upon this error What are cons of allowing leading slash when using prefixUrl? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fwiw I got this error with |
@arcanis A runkit example would be lovely. |
It doesn't repro on runkit. After investigating a bit it seems to be related to Jest, although I don't know if the bug comes from Jest or Got. Repro:
foo.js const got = require(`got`);
got.post(`https://httpbin.org`, {
responseType: `json`,
json: {}
}); foo.test.js test(`foo`, () => {
require(`./foo`);
}); Running with |
In all of the reported cases, it is safe to assume that something in your dependency chain is overriding |
v10 is a major version bump (AKA potential backwards incompatible) and @sindresorhus mentioned that it might be a good idea to document incomparable agents/libraries |
It is literally couple of lines of code to make it backwards compatible. The only reason it is not done, is because Got v10 intentionally drops < Node.js v10 support. |
Also we wanted to drop legacy Url support, hence the URL instance ( |
That's an explicit decision from the maintainers that has several clear advantages like less maintenance burden, as well as stability on got v10 for the foreseeable future (instead of being forced to release v11 when they eventually decide to drop support for node v8) |
Sure, it is just that this will result in one of the two scenarios:
|
That's their responsibility to be up to date with Got. |
The first alpha release was in September so there was plenty of time to adjust the code. |
@szmarczak Yeah you're right but I know what he want to say, it can be hard in a project with multiple dependencies to tell each author to update their codes |
You can fix this using a |
I don't see either of these as a bad thing, it's totally okay to rely on got v9 for few more months until dependencies have updated, and during that time it'd be great to open PRs against those dependencies making them compatible! |
Can you elaborate? Trying to use this with serverless and I've been banging my head |
Umm... It's plain English, but here's the same sentence in Node.js: |
Updated that runkit example (it was broken because I was working on the second solution and didn't notice that it was the first runkit sheet). Note that it doesn't pass |
@arcanis @djpate Here's the solution which should work, it uses |
@szmarczak Thanks for the code. |
You may be wondering why we don't do that: it's because we want to get rid of urlToOptions to remove legacy URL usage completely. |
…#876 (comment) Signed-off-by: Jaid <[email protected]>
This issue is for discussing the upcoming Got v10 version which is now in
alphabeta.Beta 1: https://github.com/sindresorhus/got/releases/tag/v10.0.0-beta.1
Let us know if you encounter any issues with upgrading or if anything is unclear in the release notes.
The text was updated successfully, but these errors were encountered: