Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
url: support LF, CR and TAB in pathToFileURL#23720
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
Conversation
devsnek commented Oct 17, 2018
this should wait on the resolution of the whatwg issue right? |
demurgos commented Oct 17, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@devsnek Resolving the WHATWG issue would allow to have the fix out-of-the box, but I am not sure how long it will take to fix this issue and have it land on Node. Once resolved, my changes wouldn't be necessary anymore and can be reverted in a future commit to simplify the code. |
guybedford left a comment
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.
Ideally we could tackle the root cause here, so please lets continue to track that, but the temporary fix looks good.
BridgeAR commented Oct 19, 2018
demurgos commented Oct 19, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
CI is failing on windows because it internally uses Is there a way to get the drive letter for the tests? I think it depends on cwd. |
Trott commented Nov 6, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Something like this maybe? path.parse(process.cwd()).rootIf you find you actually want path.parse(__dirname).rootThat will return process.cwd().split(path.sep)[0]// ...or..__dirname.split(path.sep)[0] |
Trott commented Nov 20, 2018
Old CI results have been wiped, so a new CI although I still expect Windows to fail: https://ci.nodejs.org/job/node-test-pull-request/18797/ @demurgos Are you still intending to finish this up? Or would you prefer someone else take on the test adjustments? |
Trott commented Nov 21, 2018
No surprise, but still failing on Windows: 23:57:43 not ok 487 parallel/test-url-pathtofileurl23:57:43 ---23:57:43 duration_ms: 0.22123:57:43 severity: fail23:57:43 exitcode: 123:57:43 stack: |-23:57:43 assert.js:8623:57:43 throw new AssertionError(obj);23:57:43 ^23:57:43 23:57:43 AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:23:57:43 + actual - expected23:57:43 23:57:43 + 'file:///c:/foobar.mjs'23:57:43 - 'file:///foobar.mjs'23:57:43 ^23:57:43 at Object.<anonymous> (c:\workspace\node-test-binary-windows\test\parallel\test-url-pathtofileurl.js:68:12)23:57:43 at Module._compile (internal/modules/cjs/loader.js:722:30)23:57:43 at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)23:57:43 at Module.load (internal/modules/cjs/loader.js:620:32)23:57:43 at tryModuleLoad (internal/modules/cjs/loader.js:560:12)23:57:43 at Function.Module._load (internal/modules/cjs/loader.js:552:3)23:57:43 at Function.Module.runMain (internal/modules/cjs/loader.js:775:12)23:57:43 at startup (internal/bootstrap/node.js:300:19)23:57:43 at bootstrapNodeJSCore (internal/bootstrap/node.js:826:3)23:57:43 ... |
guybedford commented Nov 21, 2018
Agreed it would be good to get this in regardless of which way the WhatWG decision goes. |
demurgos commented Nov 22, 2018
I was away for some time. I'll rebase the PR and fix the Windows issue. I'll use separate test-cases for windows because the resolution logic differs a lot. |
demurgos commented Nov 22, 2018
@Trott The following error is thrown: Could you also start a full CI? |
demurgos commented Nov 26, 2018
Trott commented Nov 28, 2018
CI: https://ci.nodejs.org/job/node-test-pull-request/18993/ (Currently backlogged so if you get a 404 and it's been less than an hour since I posted this here, please be patient. It should appear once another job somewhere finishes.) |
Trott commented Nov 28, 2018
CI is green and all other requirements are met, but there were some changes pushed (to accommodate Windows) since the last review. Can one or two folks re-review/reaffirm that this still looks good to them? @BridgeAR@guybedford@TimothyGu@jasnell |
demurgos commented Dec 4, 2018
@Trott |
Fixes: nodejs#23696 PR-URL: nodejs#23720 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Trott commented Dec 5, 2018
Landed in ef0c178. Thanks for the contribution! 🎉 |
MylesBorins commented Dec 6, 2018
added the semver-minor label. Feel free to remove if inaccurate |
Fixes: #23696 PR-URL: #23720 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Notable Changes: * console,util: * `console` functions now handle symbols as defined in the spec. #23708 * The inspection `depth` default is now back at 2. #24326 * dgram,net: * Added ipv6Only option for `net` and `dgram`. #23798 * http: * Chosing between the http parser is now possible per runtime flag. #24739 * readline: * The `readline` module now supports async iterators. #23916 * repl: * The multiline history feature is removed. #24804 * tls: * Added min/max protocol version options. #24405 * The X.509 public key info now includes the RSA bit size and the elliptic curve. #24358 * url: * `pathToFileURL()` now supports LF, CR and TAB. #23720 * Windows: * Tools are not installed using Boxstarter anymore. #24677 * The install-tools scripts or now included in the dist. #24233 * Added new collaborator: * [antsmartian](https://github.com/antsmartian) - Anto Aravinth. #24655 PR-URL: #24854
Fixes: #23696 PR-URL: #23720 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Fixes: #23696 PR-URL: #23720 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Notable Changes: * console,util: * `console` functions now handle symbols as defined in the spec. #23708 * The inspection `depth` default is now back at 2. #24326 * dgram,net: * Added ipv6Only option for `net` and `dgram`. #23798 * http: * Chosing between the http parser is now possible per runtime flag. #24739 * readline: * The `readline` module now supports async iterators. #23916 * repl: * The multiline history feature is removed. #24804 * tls: * Added min/max protocol version options. #24405 * The X.509 public key info now includes the RSA bit size and the elliptic curve. #24358 * url: * `pathToFileURL()` now supports LF, CR and TAB. #23720 * Windows: * Tools are not installed using Boxstarter anymore. #24677 * The install-tools scripts or now included in the dist. #24233 * Added new collaborator: * [antsmartian](https://github.com/antsmartian) - Anto Aravinth. #24655 PR-URL: #24854
Notable Changes: * console,util: * `console` functions now handle symbols as defined in the spec. #23708 * The inspection `depth` default is now back at 2. #24326 * dgram,net: * Added ipv6Only option for `net` and `dgram`. #23798 * http: * Chosing between the http parser is now possible per runtime flag. #24739 * readline: * The `readline` module now supports async iterators. #23916 * repl: * The multiline history feature is removed. #24804 * tls: * Added min/max protocol version options. #24405 * The X.509 public key info now includes the RSA bit size and the elliptic curve. #24358 * url: * `pathToFileURL()` now supports LF, CR and TAB. #23720 * Windows: * Tools are not installed using Boxstarter anymore. #24677 * The install-tools scripts or now included in the dist. #24233 * Added new collaborator: * [antsmartian](https://github.com/antsmartian) - Anto Aravinth. #24655 PR-URL: #24854
Fixes: nodejs#23696 PR-URL: nodejs#23720 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Notable Changes: * console,util: * `console` functions now handle symbols as defined in the spec. nodejs#23708 * The inspection `depth` default is now back at 2. nodejs#24326 * dgram,net: * Added ipv6Only option for `net` and `dgram`. nodejs#23798 * http: * Chosing between the http parser is now possible per runtime flag. nodejs#24739 * readline: * The `readline` module now supports async iterators. nodejs#23916 * repl: * The multiline history feature is removed. nodejs#24804 * tls: * Added min/max protocol version options. nodejs#24405 * The X.509 public key info now includes the RSA bit size and the elliptic curve. nodejs#24358 * url: * `pathToFileURL()` now supports LF, CR and TAB. nodejs#23720 * Windows: * Tools are not installed using Boxstarter anymore. nodejs#24677 * The install-tools scripts or now included in the dist. nodejs#24233 * Added new collaborator: * [antsmartian](https://github.com/antsmartian) - Anto Aravinth. nodejs#24655 PR-URL: nodejs#24854
Fixes: #23696 PR-URL: #23720 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Fixes: #23696
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes