doc: remove port from example in url.hostname#45927
doc: remove port from example in url.hostname#45927nodejs-github-bot merged 1 commit intonodejs:mainfrom
url.hostname#45927Conversation
doc/api/url.md
Outdated
| // Prints example.org | ||
|
|
||
| // Setting the hostname does not change the port | ||
| // Setting an invalid hostname is ignored: |
There was a problem hiding this comment.
| // Setting an invalid hostname is ignored: | |
| // Setting the hostname does not change the port |
The sentence on line 265 already clarifies that invalid host name values are ignored.
doc/api/url.md
Outdated
|
|
||
| // Setting the hostname does not change the port | ||
| // Setting an invalid hostname is ignored: | ||
| myURL.hostname = 'example.com:82'; |
There was a problem hiding this comment.
| myURL.hostname = 'example.com:82'; | |
| myURL.hostname = 'example.com'; |
doc/api/url.md
Outdated
| myURL.hostname = 'example.com:82'; | ||
| console.log(myURL.href); | ||
| // Prints https://example.com:81/foo | ||
| // Prints https://example.org:81/foo |
There was a problem hiding this comment.
| // Prints https://example.org:81/foo | |
| // Prints https://example.com:81/foo |
doc/api/url.md
Outdated
|
|
||
| // Use myURL.host to change the hostname and port | ||
| myURL.host = 'example.org:82'; | ||
| myURL.host = 'example.com:82'; |
There was a problem hiding this comment.
| myURL.host = 'example.com:82'; | |
| myURL.host = 'example.org:82'; |
doc/api/url.md
Outdated
| myURL.host = 'example.com:82'; | ||
| console.log(myURL.href); | ||
| // Prints https://example.org:82/foo | ||
| // Prints https://example.com:82/foo |
There was a problem hiding this comment.
| // Prints https://example.com:82/foo | |
| // Prints https://example.org:82/foo |
|
@lpinca I understand your intention. Then how about adding |
|
@deokjinkim why? It's already written on line 265
The only change required is |
@lpinca I thought wrong use-case can help user. But applied your suggestion because your suggestion is reasonable. |
Commit Queue failed- Loading data for nodejs/node/pull/45927 ✔ Done loading data for nodejs/node/pull/45927 ----------------------------------- PR info ------------------------------------ Title doc: fix wrong output of example in `url.hostname` (#45927) Author Deokjin Kim (@deokjinkim) Branch deokjinkim:221221_fix_wrong_output_url -> nodejs:main Labels doc, url, author ready, commit-queue-squash Commits 4 - doc: fix wrong output of example in `url.hostname` - Update doc/api/url.md - Change hostname using host - Address reviewer's comment Committers 2 - Deokjin Kim - GitHub PR-URL: https://github.com/nodejs/node/pull/45927 Reviewed-By: Antoine du Hamel Reviewed-By: Mohammed Keyvanzadeh ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/45927 Reviewed-By: Antoine du Hamel Reviewed-By: Mohammed Keyvanzadeh -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - Address reviewer's comment ℹ This PR was created on Wed, 21 Dec 2022 02:11:53 GMT ✔ Approvals: 2 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/45927#pullrequestreview-1225856058 ✔ - Mohammed Keyvanzadeh (@VoltrexKeyva): https://github.com/nodejs/node/pull/45927#pullrequestreview-1226411171 ✔ Last GitHub CI successful ℹ Green GitHub CI is sufficient -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/3762762798 |
|
@deokjinkim would you be so kind to squash the commits and update the final commit message to be consistent with the change? Thank you. |
If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`.
3c5ae76 to
6ece8fd
Compare
url.hostnameurl.hostname
@lpinca I squashed commits. Thank your for your review and guide. :) |
Commit Queue failed- Loading data for nodejs/node/pull/45927 ✔ Done loading data for nodejs/node/pull/45927 ----------------------------------- PR info ------------------------------------ Title doc: remove port from example in `url.hostname` (#45927) Author Deokjin Kim (@deokjinkim) Branch deokjinkim:221221_fix_wrong_output_url -> nodejs:main Labels doc, url, author ready, commit-queue-failed Commits 1 - doc: remove port from example in `url.hostname` Committers 1 - Deokjin Kim PR-URL: https://github.com/nodejs/node/pull/45927 Reviewed-By: Antoine du Hamel Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Luigi Pinca ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/45927 Reviewed-By: Antoine du Hamel Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Luigi Pinca -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - doc: remove port from example in `url.hostname` ℹ This PR was created on Wed, 21 Dec 2022 02:11:53 GMT ✔ Approvals: 3 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/45927#pullrequestreview-1225856058 ✔ - Mohammed Keyvanzadeh (@VoltrexKeyva): https://github.com/nodejs/node/pull/45927#pullrequestreview-1226411171 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/45927#pullrequestreview-1228759740 ✔ Last GitHub CI successful ℹ Green GitHub CI is sufficient -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/3770111597 |
|
Landed in 2ad3b02 |
If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`. PR-URL: #45927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`. PR-URL: #45927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`. PR-URL: #45927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`. PR-URL: #45927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`. PR-URL: #45927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
If port is used for
url.hostname,url.hostnameis not working. So remove port from example inurl.hostname.