-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
url: docs deprecate legacy url API #22715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions should be marked as deprecated in url.md
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 on process
@targos ... done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully upgraded to Runtime-deprecation in Node.js 12
That time frame seems off by a few years?
Would it be to early to add this to the pending deprecations? That would allow people who actively opt in to know that it's deprecated even without looking at the docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I see #12682 as a blocker for the deprecation of the legacy URL API. We need to have a story for Express and other modules that still heavily use the legacy API (Express does so through the parseurl wrapper), whether that be a userland module or a Core API, preferably before we start the deprecation proceedings and definitely before we runtime-deprecate the API. Sorry about blocking this.
@TimothyGu, that's precisely why this is a documentation only deprecation. |
In other words, I don't think we can actually start moving people through the migration until we start the deprecation because there won't be pressure to actually change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the commitment to address #12682 before runtime deprecation, LGTM.
doc/api/deprecations.md
Outdated
Type: Documentation | ||
|
||
The [Legacy URL API][] is deprecated in favor of the newer standardized | ||
[WHATWG URL][] implementation. This includes uses of `url.format()`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url.format()
should be qualified to not include the overload that takes URL
objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it should. I added that strictly as a convenience. The intent here is to move people away from the non-standard API and keeping that one variant un-deprecated would not make sense. Folks really should be using the href
property on the URL
object instead.
doc/api/deprecations.md
Outdated
|
||
The [Legacy URL API][] is deprecated in favor of the newer standardized | ||
[WHATWG URL][] implementation. This includes uses of `url.format()`, | ||
`url.parse()`, `url.resolve()`, and the legacy `urlObject`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links for the functions and "legacy urlObject
" would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added :-)
66e8a36
to
3a04026
Compare
doc/api/deprecations.md
Outdated
|
||
The [Legacy URL API][] is deprecated in favor of the newer standardized | ||
[WHATWG URL][] implementation. This includes uses of [`url.format()`][], | ||
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasnell Is it OK with you if I change the text to this?:
The [Legacy URL API][] is deprecated. This includes [`url.format()`][],
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
use the [WHATWG URL API][] instead.
(This will also require updating the link reference currently on line 1158 to say WHATWG URL API
rather than WHATWG URL
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever you'd like
PR-URL: #22715 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 922a1b0 |
PR-URL: nodejs#22765 Refs: nodejs#22715 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
I do not agree with deprecating |
Please define "suitable replacement" as that is quite subjective. The |
It's time to start the deprecation process for the legacy URL API.
Documentation-only deprecation for Node.js 11
Hopefully upgraded to Runtime-deprecation in Node.js 12
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes