GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http,https,net,tls: return this from setTimeout methods by evanlucas · Pull Request #1699 · nodejs/node

Conversation

@evanlucas

@evanlucas evanlucas commented May 14, 2015

Copy link
Copy Markdown
Contributor

Modifies the setTimeout methods for the following prototypes:

  • http.ClientRequest
  • http.IncomingMessage
  • http.OutgoingMessage
  • http.Server
  • https.Server
  • net.Socket
  • tls.TLSSocket

Previously, the above functions returned undefined. They now return
this. This is useful for chaining function calls.

Related: #1657

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@evanlucas evanlucas added http Issues and PRs related to the http subsystem. net Issues and PRs related to the net subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. labels May 14, 2015
@brendanashworth

brendanashworth commented May 14, 2015

Copy link
Copy Markdown
Contributor

Why is this semver-major?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented May 14, 2015

Copy link
Copy Markdown
Contributor

Going from undefined to something looks more like a semver-minor to me. Also, I think https needs the same treatment?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas evanlucas removed the semver-major PRs that contain breaking changes and should be released in the next major version. label May 14, 2015
@evanlucas

evanlucas commented May 14, 2015

Copy link
Copy Markdown
Contributor Author

Yea, I would think changing the return value of a function would be breaking regardless, but either way is fine by me.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind silverwind added the semver-minor PRs that contain new features and should be released in the next minor version. label May 14, 2015
@evanlucas
http,https,net,tls: return this from setTimeout methods
3f78268
Modifies the setTimeout methods for the following prototypes:

- http.ClientRequest
- http.IncomingMessage
- http.OutgoingMessage
- http.Server
- https.Server
- net.Socket
- tls.TLSSocket

Previously, the above functions returned undefined. They now return
`this`. This is useful for chaining function calls.
@evanlucas
evanlucas force-pushed the settimeout-returnthis branch from e914075 to 3f78268 Compare May 14, 2015 14:54
@evanlucas evanlucas changed the title http,net: return this from setTimeout methods http,https,net,tls: return this from setTimeout methods May 14, 2015
@evanlucas

evanlucas commented May 14, 2015

Copy link
Copy Markdown
Contributor Author

Ok, updated tests to verify for https.Server and tls.TLSSocket as well

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind silverwind mentioned this pull request May 14, 2015
Returning this in net and its inheriting prototype methods #1657
Closed
@silverwind

silverwind commented May 16, 2015

Copy link
Copy Markdown
Contributor

LGTM.

Let's land this one now, the other methods mentioned in #1657 can follow later. I think it's safe to say that we don't ever want to return anything else on the affected methods.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas

evanlucas commented May 16, 2015

Copy link
Copy Markdown
Contributor Author

CI: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/682/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented May 16, 2015

Copy link
Copy Markdown
Contributor

Looks like the usual unrelated windows and arm failures. I think it's good to merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

evanlucas added a commit that referenced this pull request May 16, 2015
@evanlucas @silverwind
http,net,tls: return this from setTimeout methods
d4726cd
Modifies the setTimeout methods for the following prototypes:

- http.ClientRequest
- http.IncomingMessage
- http.OutgoingMessage
- http.Server
- https.Server
- net.Socket
- tls.TLSSocket

Previously, the above functions returned undefined. They now return
`this`. This is useful for chaining function calls.

PR-URL: #1699
Reviewed-By: Roman Reiss <[email protected]>
@silverwind

silverwind commented May 16, 2015

Copy link
Copy Markdown
Contributor

Landed in d4726cd with a slightly shorter commit title (ommited https to fit)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind silverwind closed this May 16, 2015
This was referenced May 22, 2015
net,dgram: return this from ref and unref methods #1768
Closed
Release proposal v2.1.0 #1777
Closed
net: return this from setNoDelay and setKeepAlive #1779
Closed
rvagg added a commit to rvagg/io.js that referenced this pull request May 23, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
7c92f3a
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) nodejs#1699 nodejs#1768 nodejs#1779.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
rvagg added a commit to rvagg/io.js that referenced this pull request May 23, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
c71bad6
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) nodejs#1699 nodejs#1768 nodejs#1779.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
rvagg added a commit to rvagg/io.js that referenced this pull request May 24, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
eac634a
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) nodejs#1699 nodejs#1768 nodejs#1779.
* npm: Upgraded to v2.10.1, release notes can be found in
  https://github.com/npm/npm/releases/tag/v2.10.1 and
  https://github.com/npm/npm/releases/tag/v2.10.0.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
rvagg added a commit that referenced this pull request May 24, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
4d8f4d5
PR-URL: #1777

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) #1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) #1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) #1699 #1768 #1779.
* npm: Upgraded to v2.10.1, release notes can be found in
  https://github.com/npm/npm/releases/tag/v2.10.1 and
  https://github.com/npm/npm/releases/tag/v2.10.0.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) #1749.
andrewdeandrade pushed a commit to andrewdeandrade/node that referenced this pull request Jun 3, 2015
@evanlucas @andrewdeandrade
http,net,tls: return this from setTimeout methods
6f987df
Modifies the setTimeout methods for the following prototypes:

- http.ClientRequest
- http.IncomingMessage
- http.OutgoingMessage
- http.Server
- https.Server
- net.Socket
- tls.TLSSocket

Previously, the above functions returned undefined. They now return
`this`. This is useful for chaining function calls.

PR-URL: nodejs/node#1699
Reviewed-By: Roman Reiss <[email protected]>
MikeRalphson added a commit to MikeRalphson/node that referenced this pull request Aug 31, 2016
@MikeRalphson
Define return type of clientRequest.setTimeout
5dde410
nodejs#1699 did not update documentation
MikeRalphson added a commit to MikeRalphson/node that referenced this pull request Aug 31, 2016
@MikeRalphson
Update return type of clientRequest.setTimeout
e17f070
nodejs#1699 did not update documentation
@MikeRalphson MikeRalphson mentioned this pull request Aug 31, 2016
Document return type of clientRequest.setTimeout MikeRalphson/node#1
Merged
2 tasks done
@MikeRalphson MikeRalphson mentioned this pull request Aug 31, 2016
doc: add return type of clientRequest.setTimeout #8356
Closed
2 tasks done
MikeRalphson added a commit to MikeRalphson/node that referenced this pull request Aug 31, 2016
@MikeRalphson
doc: add return type of clientRequest.setTimeout
ccb0b3d
Refs: nodejs#1699
lpinca pushed a commit to lpinca/node that referenced this pull request Sep 3, 2016
@MikeRalphson @lpinca
doc: add return type of clientRequest.setTimeout
7e8d994
Refs: nodejs#1699
PR-URL: nodejs#8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Sep 8, 2016
@MikeRalphson @Fishrock123
doc: add return type of clientRequest.setTimeout
8a38353
Refs: nodejs#1699
PR-URL: nodejs#8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Fishrock123 pushed a commit that referenced this pull request Sep 9, 2016
@MikeRalphson @Fishrock123
doc: add return type of clientRequest.setTimeout
ee83f5d
Refs: #1699
PR-URL: #8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 30, 2016
@MikeRalphson Myles Borins
doc: add return type of clientRequest.setTimeout
06e3f7f
Refs: #1699
PR-URL: #8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 10, 2016
@MikeRalphson Myles Borins
doc: add return type of clientRequest.setTimeout
9c05528
Refs: #1699
PR-URL: #8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
rvagg pushed a commit that referenced this pull request Oct 18, 2016
@MikeRalphson @rvagg
doc: add return type of clientRequest.setTimeout
62ccc7a
Refs: #1699
PR-URL: #8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 26, 2016
@MikeRalphson @MylesBorins
doc: add return type of clientRequest.setTimeout
c529bf5
Refs: #1699
PR-URL: #8356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
@aliscco aliscco mentioned this pull request Dec 2, 2023
[Snyk] Fix for 6 vulnerabilities aliscco/alisco-node#1050
Open
@leonardoadame leonardoadame mentioned this pull request Dec 3, 2023
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#477
Open
@aliscco aliscco mentioned this pull request Dec 3, 2023
[Snyk] Security upgrade @commitlint/cli from 8.2.0 to 9.0.0 aliscco/alisco-node#1104
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

http Issues and PRs related to the http subsystem. net Issues and PRs related to the net subsystem. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@evanlucas @brendanashworth @silverwind
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.