Skip to content

url: errounous hash appended on url.format #1588

Closed
@silverwind

Description

@silverwind

This is breaking npm installs and should be fixed before 2.0.0.

Encountered in https://github.com/npm/normalize-git-url/blob/master/normalize-git-url.js

1.8.1

> parsed = url.parse("git+ssh://git@github.com:organization/repo.git#hashbrowns")
> parsed.hash = ''
> url.format(parsed)
'git+ssh://git@github.com/:organization/repo.git'

2.0.0

> parsed = url.parse("git+ssh://git@github.com:organization/repo.git#hashbrowns")
> parsed.hash = ''
> url.format(parsed)
> 'git+ssh://git@github.com/:organization/repo.git#'

cc: @petkaantonov @domenic @rvagg

Metadata

Metadata

Assignees

Labels

confirmed-bugIssues with confirmed bugs.urlIssues and PRs related to the legacy built-in url module.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions