-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
[v18.x] Revert "url: drop ICU requirement for parsing hostnames" #48869
Changes from 2 commits
0560f54
f3d70d4
b3b5367
474979e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
'use strict'; | ||
|
||
const { domainToASCII, domainToUnicode } = require('internal/url'); | ||
module.exports = { toASCII: domainToASCII, toUnicode: domainToUnicode }; | ||
if (internalBinding('config').hasIntl) { | ||
const { toASCII, toUnicode } = internalBinding('icu'); | ||
module.exports = { toASCII, toUnicode }; | ||
} else { | ||
const { domainToASCII, domainToUnicode } = require('internal/url'); | ||
module.exports = { toASCII: domainToASCII, toUnicode: domainToUnicode }; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const common = require('../common'); | ||
|
||
// TODO(@anonrig): Remove this check when Ada removes ICU requirement. | ||
if (!common.hasIntl) { | ||
// A handful of the benchmarks fail when ICU is not included. | ||
// ICU is responsible for ignoring certain inputs from the hostname | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file shouldn’t be reverted as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should be, |
||
// and without it, it is not possible to validate the correctness of the input. | ||
// DomainToASCII method in Unicode specification states which characters are | ||
// ignored and/or remapped. Doing this outside of the scope of DomainToASCII, | ||
// would be a violation of the WHATWG URL specification. | ||
// Please look into: https://unicode.org/reports/tr46/#ProcessingStepMap | ||
common.skip('missing Intl'); | ||
} | ||
|
||
const runBenchmark = require('../common/benchmark'); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,40 @@ | ||
{ | ||
"toascii.window.js": { | ||
"requires": ["small-icu"] | ||
}, | ||
"percent-encoding.window.js": { | ||
"requires": ["small-icu"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should not be reverted. |
||
"skip": "TODO: port from .window.js" | ||
}, | ||
"historical.any.js": { | ||
"requires": ["small-icu"], | ||
"fail": { | ||
"expected": [ | ||
"URL: no structured serialize/deserialize support", | ||
"URLSearchParams: no structured serialize/deserialize support" | ||
] | ||
} | ||
}, | ||
"urlencoded-parser.any.js": { | ||
"requires": ["small-icu"] | ||
}, | ||
"url-constructor.any.js": { | ||
"requires": ["small-icu"] | ||
}, | ||
"url-origin.any.js": { | ||
"requires": ["small-icu"] | ||
}, | ||
"url-setters.any.js": { | ||
"requires": ["small-icu"] | ||
}, | ||
"url-setters-a-area.window.js": { | ||
"skip": "already tested in url-setters.any.js" | ||
}, | ||
"IdnaTestV2.window.js": { | ||
"requires": ["small-icu"] | ||
}, | ||
"javascript-urls.window.js": { | ||
"required": ["small-icu"], | ||
"skip": "requires document.body reference" | ||
} | ||
} |
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.
This file shouldn’t be reverted. This configurations are for Ada v1.
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 think it makes sense to land a clean revert of the commit causing the issue, and then we have all the time we need to land a follow up commit that tidy things up, wdyt?