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

fix(deps): update dependency got to v10 #1557

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

renovate-bot
Copy link
Contributor

@renovate-bot renovate-bot commented Dec 1, 2019

This PR contains the following updates:

Package Type Update Change
got dependencies major ^9.6.0 -> ^10.0.0
got devDependencies major ^9.6.0 -> ^10.0.0

Release Notes

sindresorhus/got

v10.6.0

Compare Source

v10.5.7

Compare Source

  • Fix Init hooks not being called if extended acefaa4

v10.5.6

Compare Source

v10.5.5

Compare Source

  • Fix merging pagination options 1f363b9

v10.5.4

Compare Source

  • Fix _pagination not falling back to defaults ff1dba1

v10.5.3

Compare Source

  • Fix unhandled errors if throwing in an async handler 518d95a

v10.5.2

Compare Source

  • Forgot to include required p-event dependency 8373112

v10.5.1

Compare Source

v10.5.0

Compare Source

v10.4.0

Compare Source

  • Update @szmarczak/cacheable-lookup dependency d527dae
  • Include invalid JSON body in ParseErrors (#​1044) 2813b73
  • Fix got.stream(...) not throwing ReadErrors 1f6ca6b

v10.3.0

Compare Source

v10.2.2

Compare Source

  • Do not include a request option in normalized http options 61009b3

v10.2.1

Compare Source

  • Ensure got.mergeOptions(...) can be assigned to defaults (#​1008) 1360a1b
  • The url option is mutually exclusive with the url input argument e0f8aab
  • Update RetryObject['error'] TypeScript types 5008bf7
  • Upgrade @szmarczak/http-timer dependency a1b8ffc

v10.2.0

Compare Source

  • Soft-deprecate electron.net support (#​995) b2f8ace
    - See #​899 (comment). When the support is removed, you'll still be able to use Got in the Electron main process and in the renderer process through the electron.remote module or if you use Node.js shims.
  • Do not throw if hostname is not present dc53747
  • Fix unhandled Premature close errors fa60b5f

v10.1.0

Compare Source

Enhancements
Fixes
  • Fix content-length header not being set when using custom content-type 3149340
  • Emit timeout errors as soon as possible 912c2e5 7bf92f4

v10.0.4

Compare Source

v10.0.3

Compare Source

  • Fix the responseType option (071bf5e)
  • Fix unhandled Premature close and Request timed out errors (7b2ccb0)
  • Make options.path backwards-compatible (b3f1ac9)

v10.0.2

Compare Source

  • Fix TypeScript type problem with URL and URLSearchParams globals (#​969) 2d5e28d
  • Fix got.mergeOptions(...) TypeScript type (#​953) b962d08
  • Fix unhandled timeout errors when connection drops 5a8f461

v10.0.1

Compare Source

  • Fix using the json option with got.stream.post 2ec5c4d

v10.0.0

Compare Source

We're excited to announce Got 10! 🎉 This release has been in the works for almost a year and has been a major undertaking. Got was fully rewritten in TypeScript, which helped us catch many bugs and will give us more confidence in the codebase going forward. Got is now faster and much more stable. We also fixed a huge amount of bugs. Big thanks to everyone that helped make this release possible. 🙌


If you find Got useful, you might want to sponsor the Got maintainers.

Note: Some HTTP agents like https-proxy-agent and agentkeepalive are not compatible with Node.js 10 and hence not compatible with Got as Got takes advantage of some Node.js 10-only APIs.

Breaking
  • Require Node.js 10 633651f
    - Why: This is so that we can use stream.pipeline for more reliable stream handling. Node.js 8 will be out of LTS at the end of this month anyway.
  • Remove support for protocol-less URLs in the url argument 92bc808
    - Why: To reduce ambiguity. It was not clear from just reading the code what it would default to.
    - Migrate:
- got('sindresorhus.com');
+ got('https://sindresorhus.com');
  • Rename the query option to searchParams and make it stricter b223663 5376216 518f0f5
    - Why: To get closer to the window.fetch naming in the browser.
    - Migrate:
- got(…, {query: …});
+ got(…, {searchParams: …});
  • Replace the baseUrl option with prefixUrl (#​829) 0d534ed
    - Note: We also made it stricter to reduce ambiguity. The Got url argument now cannot be prefixed with a slash when this option is used.
    - Why: We renamed it to make it clear that it doesn't do any URL resolution.
    - Migrate:
- got('/foo', {baseUrl: 'https://x.com'});
+ got('foo', {prefixUrl: 'https://x.com'});
  • Change the json option to accept an object instead of a boolean and to only be responsible for the request, not the response (#​704) a6a7d5a
    - Note: You now set the request body in this option instead of the body option when you want to send JSON. This option also no longer sets the response type to JSON. You either call the .json() method or specify the responseType option for that.
    - Why: Many people were confused how {json: true} worked and they also complained that they could not set the request/response type individually.
    - Migrate:
- got(url, {body: {x: true}, json: true});
+ got.post(url, {json: {x: true}}).json();
  • Use the responseType option instead of encoding to get a Buffer (#​940) 6cc3d9f
    - Why: Previously, you would pass {encoding: null} to get a Buffer, but this was confusing. You now use {responseType: 'buffer'} instead.
    - Tip: You can also use got(…).buffer();.
    - Migrate:
- got(…, {encoding: null});
+ got(…, {responseType: 'buffer'});
  • Don't infer POST automatically when specifying body (#​756) e367bdb
    - Why: We're trying to reduce the amount of magic behavior.
    - Migrate:
- got(…, {body: 'foo'});
+ got.post(…, {body: 'foo'});
  • The retries.retry option was split into retries.limit and retries.calculateDelay b15ce1d
    - Migrate:
 got(…, {
 	retry: {
-		retries: 2
+		limit: 2
 	}
 });
 got(…, {
 	retry: {
-		retries: iteration => iteration < 2
+		calculateDelay: ({attemptCount}) => attemptCount < 2
 	}
 });
 got(…, {
 	headers: {
-		'user-agent': null
+		'user-agent': undefined
 	}
 });
  • Rename the Promise API property .fromCache to .isFromCache (#​768) b5e443b
  • Rename the stream option to isStream 518f0f5
    - Why: To make it clearer that it's a boolean and that it doesn't expect a stream to be passed in.
    - Migrate:
- got(…, {stream: true});
+ got(…, {isStream: true});
  • Don't include the Got version in the default user-agent header (#​911) 95bed1e
    - got/9.6.0 (https://github.com/sindresorhus/got)got (https://github.com/sindresorhus/got)
    - Why: Importing package.json to get the version caused a lot of problems. And you should ideally set your own user-agent header anyway.
  • Remove got.create() 518f0f5
    - You can achieve the same thing with got.extend() now.
  • Remove got.mergeInstances() 518f0f5
    - Use gotInstance.extend(...gotInstances) instead.
  • Move top-level error properties into an .options and .response property (#​773) 6eaa81b
    - Migrate:
- error.gotOptions
+ error.options

- error.headers
+ error.response.headers

- error.statusCode
+ error.response.statusCode

- error.statusMessage
+ error.response.statusMessage

- error.body
+ error.response.body

- error.redirectUrls
+ error.response.redirectUrls

- error.host
+ error.options.host

- error.hostname
+ error.options.hostname

- error.method
+ error.options.method

- error.protocol
+ error.options.protocol

- error.url
+ error.options.url

- error.path
+ error.options.path
  • Custom instance creation was simplified (#​707) 8eaef94
    - Note: got.mergeInstances(...instances) is deprecated. Use instanceA.extend(instanceB) instead.
    - Migrate:
### Merging instances
- got.mergeInstances(instanceA, instanceB, instanceC, …);
+ instanceA.extend(instanceB, instanceC, …);
### Merging options
- instanceA.extend(optionsB).extend(optionsC).extend(…);
+ instanceA.extend(optionsB, optionsC, …);
### Merging instances and options
- got.mergeInstances(instanceA.extend(optionsB), instanceC);
+ instanceA.extend(optionsB, instanceC, …);
### Extending handlers
- got.mergeInstances(instanceA, got.create({handler: handlerB}));
+ instanceA.extend({handlers: [handlerB]});
Enhancements
Fixes
  • Fix parsing response when using afterResponse hook (#​775) e2054cd
  • Fix port not being reset on redirect (#​729) ada5861
  • Fix the retry functionality (#​787) 0501e00
  • Fix default retry option value when specifying a number (#​809) 9c04a7c
  • Correctly handle promise- and stream-specific errors in the beforeError hook 134c9b7
  • Don't throw on early lookups 4faf5c7
  • Fix Node.js 13 compatibility (#​915) b0dfc95
  • Fix memory leak when using cache feature (#​792) 518f0f5
  • Don't throw on 204 No Content when parsing response (#​925) 518f0f5
  • When redirect fails, don't retry from scratch (#​930) 518f0f5
  • Retrying inside afterResponse hook should trigger beforeRetry hook (#​918) 518f0f5
  • Fix a bug that sometimes caused the Node.js process to hang 518f0f5
  • Fix a bug where cookies weren't reset on redirect between two different sites 518f0f5
  • Make the progress events not be based on internal Node.js properties cd11a50
Docs
  • Clarify retry behavior 5e6782a
  • Clarify prefixUrl behavior (#​943) f008bc9
  • Document that retry option doesn't work with streams 9088866
  • Encourage using Stream.pipeline() when using the stream API 06afb27
  • Add instructions for global-agent (#​822) ca8c560
  • Mention the TimeoutError.timings property 8fa18f4
  • Mention how to abort the request using hooks 96ea75f
All commits

Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 1, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 1, 2019
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 1, 2019
@fhinkel
Copy link
Contributor

fhinkel commented Dec 3, 2019

@michaelawyu Could you check why this update breaks appengine/analytics. Thanks

@renovate-bot renovate-bot force-pushed the renovate/got-10.x branch 2 times, most recently from 2273bfa to ff09d19 Compare December 10, 2019 00:45
@renovate-bot renovate-bot changed the title fix(deps): update dependency got to v10 Update dependency got to v10 Dec 10, 2019
@fhinkel
Copy link
Contributor

fhinkel commented Dec 16, 2019

ping @michaelawyu

@renovate-bot renovate-bot force-pushed the renovate/got-10.x branch 3 times, most recently from 16d3df4 to de1d6af Compare December 16, 2019 21:37
@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 20, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 20, 2019
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 1, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 2, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 8, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 8, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 10, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 10, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 10, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 10, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 11, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 26, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 26, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 26, 2020
@renovate-bot renovate-bot changed the title fix(deps): update dependency got to v10 Update dependency got to v10 Mar 10, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 10, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 10, 2020
@michaelawyu michaelawyu added the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 10, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 10, 2020
@michaelawyu
Copy link
Contributor

michaelawyu commented Mar 10, 2020

The new version of got is no longer compatible with node.js 8. Since the node.js 8 runtime has been deprecated in App Engine, I will remove the associated node.js 8 tests of this sample.

@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 11, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 11, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 11, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 11, 2020
@renovate-bot renovate-bot changed the title Update dependency got to v10 fix(deps): update dependency got to v10 Mar 24, 2020
@trusted-contributions-gcf trusted-contributions-gcf bot added the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 24, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Mar 24, 2020
@fhinkel fhinkel merged commit a12d324 into GoogleCloudPlatform:master Mar 24, 2020
@renovate-bot renovate-bot deleted the renovate/got-10.x branch March 24, 2020 16:39
gcf-merge-on-green bot pushed a commit that referenced this pull request Mar 31, 2020
Fixes #1637

run/logging-manual tests started failing due to a compatibility break in upgrading to `got v10` #1557. This was not caught because the broken `got` feature is only used in system tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants