GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — url: adding WHATWG URL support by jasnell · Pull Request #7448 · nodejs/node Conversation
|
|
Related: #7355 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mscdex @bnoordhuis @indutny ... would appreciate you all taking a look. The emphasis here currently is on spec compliance but the performance definitely needs to improve. It's functionally operational but obviously can use some performance improvements. The one bit currently missing is the host parsing which is why this currently fails 26 of the standard tests (all the failures deal with host edge cases). The WHATWG URL parsing is intentionally liberal and lenient so there are some bits we can't easily work around -- such as ignoring whitespace. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
note: this is in anticipation of my other PR that switches to ICU's punycode impl landing. If/when that moves forward, we'll be able to take advantage of some other performance improvements from that.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm curious, why implement part in javascript and part in c++? Also, I probably wouldn't worry much about performance until it passes all tests first. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I implemented it in pure js first and the performance was fairly abysmal.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Not sure how widespread breakage would be, but I'm generally for this, so long as it doesn't introduce a new module or global. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Breakage would be minimal at this point because there is absolutely zero change to the existing URL implementation. Existing code should be entirely unaffected. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is not a good implementation of the IDL. input and base do not need to be strings (or URLs).
Instead, the first few lines of this should be something like
if (input === undefined) { throw new TypeError("first argument is required"); } input = String(input); if (base !== undefined) { base = String(base); }
(Actually those String(input)s should actually be toUSVString(input)... but that's a separate discussion.)
The same applies to all the setters, which should just do scheme = String(scheme), not throw a TypeError.
These aspects of the API will not be tested in the web platform tests since they are, in typical implementations, auto-generated from Web IDL.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the js side of this is somewhat temporary at the moment while I focus on the parsing bits. Currently this is a close-enough-to-be-somewhat-functional impl of the IDL bits ;-). This is definitely helpful tho and I've added it to my list of todo's.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ah OK cool :). Sorry for the premature review then; the JS part is easier for me to review so I just dived in.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No worries at all! I definitely appreciate the eyes on it and I'm hoping t sort out all of the js/IDL bits this week so this is helpful.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ok well, I definitely don't think we should add a new, competitive implementation. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As I've said previously, the idea is to introduce the standard API in
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will it contain also URLSearchParams? It will be quite usefull, and future possible replacement for standart querystring module. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, though it likely would not replace the querystring module entirely.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok, updated with a rough implementation of the host parsing. Currently only failing 11 of the standard parsing tests... most of which deal with punycode handling. Once #7355 lands, that'll be easier to handle. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
8e480ee to
6b0e8a0
Compare
There was an error while loading. Please reload this page.
|
@nodejs/collaborators @domenic ... this is now passing 100% of the parsing tests and all but two of the setter tests (those two are currently skipped, chrome fails those two also it appears). I have added the At this point, this has the appropriate test coverage but the performance is still lacking. The next step after this is to begin working on improving performance without sacrificing correctness. It's likely to not perform as well as |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
First CI: https://ci.nodejs.org/job/node-test-pull-request/3145/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Implements WHATWG URL support. Example:
```
var u = new url.URL('http://example.org');
```
Many, many other commits improving the implementation have been squashed
into this backport PR. They are not listed separately here for brevity.
PR-URL: nodejs#7448
Reviewed-By: Ilkka Myller <[email protected]>
Implements WHATWG URL support. Example:
```
var u = new url.URL('http://example.org');
```
Many, many other commits improving the implementation have been squashed
into this backport PR. They are not listed separately here for brevity.
Backport-PR-URL: #17365
PR-URL: #7448
Reviewed-By: Ilkka Myller <[email protected]>
Implements WHATWG URL support. Example:
```
var u = new url.URL('http://example.org');
```
Many, many other commits improving the implementation have been squashed
into this backport PR. They are not listed separately here for brevity.
Backport-PR-URL: #17365
PR-URL: #7448
Reviewed-By: Ilkka Myller <[email protected]>
This LTS release comes with 109 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 29 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.
Notable Changes:
* console:
- added console.count() and console.clear() (James M Snell)
#12678
* crypto:
- expose ECDH class (Bryan English)
#8188
- added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
#10209
- warn on invalid authentication tag length (Tobias Nießen)
#17566
* deps:
- upgrade libuv to 1.16.1 (cjihrig)
#16835
* dgram:
- added socket.setMulticastInterface() (Will Young)
#7855
* http:
- add agent.keepSocketAlive and agent.reuseSocket as to allow
overridable keep-alive behavior of `Agent` (Fedor Indutny)
#13005
* lib:
- return this from net.Socket.end() (Sam Roberts)
#13481
* module:
- add builtinModules api that provides list of all builtin modules in
Node (Jon Moss)
#16386
* net:
- return this from getConnections() (Sam Roberts)
#13553
* promises:
- more robust stringification for unhandled rejections (Timothy Gu)
#13784
* repl:
- improve require() autocompletion (Alexey Orlenko)
#14409
* src:
- add openssl-system-ca-path configure option (Daniel Bevenius)
#16790
- add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
#12087
- add process.ppid (cjihrig)
#16839
* tls:
- accept `lookup` option for `tls.connect()` (Fedor Indutny)
#12839
* tools, build:
- a new macOS installer! (JP Wesselink)
#15179
* url:
- WHATWG URL api support (James M Snell)
#7448
* util:
- add %i and %f formatting specifiers (Roman Reiss)
#10308
PR-URL: #18342
Implements WHATWG URL support. Example:
```
var u = new url.URL('http://example.org');
```
Many, many other commits improving the implementation have been squashed
into this backport PR. They are not listed separately here for brevity.
Backport-PR-URL: #17365
PR-URL: #7448
Reviewed-By: Ilkka Myller <[email protected]>
This LTS release comes with 109 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 29 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.
Notable Changes:
* console:
- added console.count() and console.clear() (James M Snell)
#12678
* crypto:
- expose ECDH class (Bryan English)
#8188
- added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
#10209
- warn on invalid authentication tag length (Tobias Nießen)
#17566
* deps:
- upgrade libuv to 1.16.1 (cjihrig)
#16835
* dgram:
- added socket.setMulticastInterface() (Will Young)
#7855
* http:
- add agent.keepSocketAlive and agent.reuseSocket as to allow
overridable keep-alive behavior of `Agent` (Fedor Indutny)
#13005
* lib:
- return this from net.Socket.end() (Sam Roberts)
#13481
* module:
- add builtinModules api that provides list of all builtin modules in
Node (Jon Moss)
#16386
* net:
- return this from getConnections() (Sam Roberts)
#13553
* promises:
- more robust stringification for unhandled rejections (Timothy Gu)
#13784
* repl:
- improve require() autocompletion (Alexey Orlenko)
#14409
* src:
- add openssl-system-ca-path configure option (Daniel Bevenius)
#16790
- add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
#12087
- add process.ppid (cjihrig)
#16839
* tls:
- accept `lookup` option for `tls.connect()` (Fedor Indutny)
#12839
* tools, build:
- a new macOS installer! (JP Wesselink)
#15179
* url:
- WHATWG URL api support (James M Snell)
#7448
* util:
- add %i and %f formatting specifiers (Roman Reiss)
#10308
PR-URL: #18342
Implements WHATWG URL support. Example:
```
var u = new url.URL('http://example.org');
```
Many, many other commits improving the implementation have been squashed
into this backport PR. They are not listed separately here for brevity.
Backport-PR-URL: #17365
PR-URL: #7448
Reviewed-By: Ilkka Myller <[email protected]>
This LTS release comes with 109 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 29 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.
Notable Changes:
* console:
- added console.count() and console.clear() (James M Snell)
#12678
* crypto:
- expose ECDH class (Bryan English)
#8188
- added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
#10209
- warn on invalid authentication tag length (Tobias Nießen)
#17566
* deps:
- upgrade libuv to 1.16.1 (cjihrig)
#16835
* dgram:
- added socket.setMulticastInterface() (Will Young)
#7855
* http:
- add agent.keepSocketAlive and agent.reuseSocket as to allow
overridable keep-alive behavior of `Agent` (Fedor Indutny)
#13005
* lib:
- return this from net.Socket.end() (Sam Roberts)
#13481
* module:
- add builtinModules api that provides list of all builtin modules in
Node (Jon Moss)
#16386
* net:
- return this from getConnections() (Sam Roberts)
#13553
* promises:
- more robust stringification for unhandled rejections (Timothy Gu)
#13784
* repl:
- improve require() autocompletion (Alexey Orlenko)
#14409
* src:
- add openssl-system-ca-path configure option (Daniel Bevenius)
#16790
- add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
#12087
- add process.ppid (cjihrig)
#16839
* tls:
- accept `lookup` option for `tls.connect()` (Fedor Indutny)
#12839
* tools, build:
- a new macOS installer! (JP Wesselink)
#15179
* url:
- WHATWG URL api support (James M Snell)
#7448
* util:
- add %i and %f formatting specifiers (Roman Reiss)
#10308
PR-URL: #18342
This LTS release comes with 112 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 30 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.
Notable Changes:
* console:
- added console.count() and console.clear() (James M Snell)
#12678
* crypto:
- expose ECDH class (Bryan English)
#8188
- added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
#10209
- warn on invalid authentication tag length (Tobias Nießen)
#17566
* deps:
- upgrade libuv to 1.16.1 (cjihrig)
#16835
* dgram:
- added socket.setMulticastInterface() (Will Young)
#7855
* http:
- add agent.keepSocketAlive and agent.reuseSocket as to allow
overridable keep-alive behavior of `Agent` (Fedor Indutny)
#13005
* lib:
- return this from net.Socket.end() (Sam Roberts)
#13481
* module:
- add builtinModules api that provides list of all builtin modules in
Node (Jon Moss)
#16386
* net:
- return this from getConnections() (Sam Roberts)
#13553
* promises:
- more robust stringification for unhandled rejections (Timothy Gu)
#13784
* repl:
- improve require() autocompletion (Alexey Orlenko)
#14409
* src:
- add openssl-system-ca-path configure option (Daniel Bevenius)
#16790
- add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
#12087
- add process.ppid (cjihrig)
#16839
* tls:
- accept `lookup` option for `tls.connect()` (Fedor Indutny)
#12839
* tools, build:
- a new macOS installer! (JP Wesselink)
#15179
* url:
- WHATWG URL api support (James M Snell)
#7448
* util:
- add %i and %f formatting specifiers (Roman Reiss)
#10308
PR-URL: #18342
This LTS release comes with 112 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 30 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.
Notable Changes:
* console:
- added console.count() and console.clear() (James M Snell)
#12678
* crypto:
- expose ECDH class (Bryan English)
#8188
- added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
#10209
- warn on invalid authentication tag length (Tobias Nießen)
#17566
* deps:
- upgrade libuv to 1.16.1 (cjihrig)
#16835
* dgram:
- added socket.setMulticastInterface() (Will Young)
#7855
* http:
- add agent.keepSocketAlive and agent.reuseSocket as to allow
overridable keep-alive behavior of `Agent` (Fedor Indutny)
#13005
* lib:
- return this from net.Socket.end() (Sam Roberts)
#13481
* module:
- add builtinModules api that provides list of all builtin modules in
Node (Jon Moss)
#16386
* net:
- return this from getConnections() (Sam Roberts)
#13553
* promises:
- more robust stringification for unhandled rejections (Timothy Gu)
#13784
* repl:
- improve require() autocompletion (Alexey Orlenko)
#14409
* src:
- add openssl-system-ca-path configure option (Daniel Bevenius)
#16790
- add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
#12087
- add process.ppid (cjihrig)
#16839
* tls:
- accept `lookup` option for `tls.connect()` (Fedor Indutny)
#12839
* tools, build:
- a new macOS installer! (JP Wesselink)
#15179
* url:
- WHATWG URL api support (James M Snell)
#7448
* util:
- add %i and %f formatting specifiers (Roman Reiss)
#10308
PR-URL: #18342
This LTS release comes with 112 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 30 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.
Notable Changes:
* console:
- added console.count() and console.clear() (James M Snell)
nodejs#12678
* crypto:
- expose ECDH class (Bryan English)
nodejs#8188
- added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
nodejs#10209
- warn on invalid authentication tag length (Tobias Nießen)
nodejs#17566
* deps:
- upgrade libuv to 1.16.1 (cjihrig)
nodejs#16835
* dgram:
- added socket.setMulticastInterface() (Will Young)
nodejs#7855
* http:
- add agent.keepSocketAlive and agent.reuseSocket as to allow
overridable keep-alive behavior of `Agent` (Fedor Indutny)
nodejs#13005
* lib:
- return this from net.Socket.end() (Sam Roberts)
nodejs#13481
* module:
- add builtinModules api that provides list of all builtin modules in
Node (Jon Moss)
nodejs#16386
* net:
- return this from getConnections() (Sam Roberts)
nodejs#13553
* promises:
- more robust stringification for unhandled rejections (Timothy Gu)
nodejs#13784
* repl:
- improve require() autocompletion (Alexey Orlenko)
nodejs#14409
* src:
- add openssl-system-ca-path configure option (Daniel Bevenius)
nodejs#16790
- add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
nodejs#12087
- add process.ppid (cjihrig)
nodejs#16839
* tls:
- accept `lookup` option for `tls.connect()` (Fedor Indutny)
nodejs#12839
* tools, build:
- a new macOS installer! (JP Wesselink)
nodejs#15179
* url:
- WHATWG URL api support (James M Snell)
nodejs#7448
* util:
- add %i and %f formatting specifiers (Roman Reiss)
nodejs#10308
PR-URL: nodejs#18342
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.