Skip to content
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

v17.7.1 release proposal #42285

Merged
merged 2 commits into from Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -33,7 +33,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V17.md#17.7.0">17.7.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V17.md#17.7.1">17.7.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V17.md#17.7.0">17.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V17.md#17.6.0">17.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V17.md#17.5.0">17.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V17.md#17.4.0">17.4.0</a><br/>
Expand Down
17 changes: 17 additions & 0 deletions doc/changelogs/CHANGELOG_V17.md
Expand Up @@ -8,6 +8,7 @@
</tr>
<tr>
<td>
<a href="#17.7.1">17.7.1</a><br/>
<a href="#17.7.0">17.7.0</a><br/>
<a href="#17.6.0">17.6.0</a><br/>
<a href="#17.5.0">17.5.0</a><br/>
Expand Down Expand Up @@ -41,6 +42,22 @@
* [io.js](CHANGELOG_IOJS.md)
* [Archive](CHANGELOG_ARCHIVE.md)

<a id="17.7.1"></a>

## 2022-03-10, Version 17.7.1 (Current), @BethGriggs prepared by @sxa

### Notable Changes

#### Fixed regression in url.resolve()

This release fixes an issue introduced in Node.js v17.7.0 with some URLs
that contain `@`. This issue affected yarn 1. This version reverts the
change that introduced the regression.

### Commits

* \[[`96a9e00fb3`](https://github.com/nodejs/node/commit/96a9e00fb3)] - **url**: revert fix url.parse() for `@hostname` (Antoine du Hamel) [#42280](https://github.com/nodejs/node/pull/42280)

<a id="17.7.0"></a>

## 2022-03-09, Version 17.7.0 (Current), @BethGriggs prepared by @sxa
Expand Down
23 changes: 8 additions & 15 deletions lib/url.js
Expand Up @@ -294,29 +294,22 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
rest = rest.slice(proto.length);
}

// Figure out if it's got a host.
// user@server is *always* interpreted as a hostname, and URL
// Figure out if it's got a host
// user@server is *always* interpreted as a hostname, and url
// resolution will treat //foo/bar as host=foo,path=bar because that's
// how the browser resolves relative URLs. http:@example.com is treated
// the same as http://example.com.
// how the browser resolves relative URLs.
let slashes;
let at;
if (slashesDenoteHost || proto || hostPattern.test(rest)) {
slashes = rest.charCodeAt(0) === CHAR_FORWARD_SLASH &&
rest.charCodeAt(1) === CHAR_FORWARD_SLASH;
at = rest.charCodeAt(0) === CHAR_AT;
if (!(proto && hostlessProtocol.has(lowerProto))) {
if (slashes) {
rest = rest.slice(2);
this.slashes = true;
} else if (at) {
rest = rest.slice(1);
}
rest.charCodeAt(1) === CHAR_FORWARD_SLASH;
if (slashes && !(proto && hostlessProtocol.has(lowerProto))) {
rest = rest.slice(2);
this.slashes = true;
}
}

if (!hostlessProtocol.has(lowerProto) &&
(slashes || at || (proto && !slashedProtocol.has(proto)))) {
(slashes || (proto && !slashedProtocol.has(proto)))) {

// there's a hostname.
// the first instance of /, ?, ;, or # ends the host.
Expand Down
2 changes: 1 addition & 1 deletion src/node_version.h
Expand Up @@ -29,7 +29,7 @@
#define NODE_VERSION_IS_LTS 0
#define NODE_VERSION_LTS_CODENAME ""

#define NODE_VERSION_IS_RELEASE 0
#define NODE_VERSION_IS_RELEASE 1

#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
Expand Down
17 changes: 1 addition & 16 deletions test/parallel/test-url-parse-format.js
Expand Up @@ -975,22 +975,7 @@ const parseTests = {
query: null,
pathname: '/everybody',
path: '/everybody',
href: '//fhqwhgads@example.com/everybody#to-the-limit',
},

'http:@localhost': {
protocol: 'http:',
slashes: null,
auth: null,
host: 'localhost',
port: null,
hostname: 'localhost',
hash: null,
search: null,
query: null,
pathname: '/',
path: '/',
href: 'http://localhost/',
href: '//fhqwhgads@example.com/everybody#to-the-limit'
},
};

Expand Down