Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### ⚠️ BREAKING CHANGES

* the strict RFC 8909 mode has been removed
* the strict RFC 8089 mode has been removed
* support for node 14 has been removed

### Bug Fixes
Expand Down
6 changes: 3 additions & 3 deletions lib/npa.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function fromFile (res, where) {
resolvedUrl = new url.URL(rawWithPrefix, `file://${path.resolve(where)}/`)
specUrl = new url.URL(rawWithPrefix)
} catch (originalError) {
const er = new Error('Invalid file: URL, must comply with RFC 8909')
const er = new Error('Invalid file: URL, must comply with RFC 8089')
throw Object.assign(er, {
raw: res.rawSpec,
spec: res,
Expand All @@ -257,7 +257,7 @@ function fromFile (res, where) {
})
}

// XXX backwards compatibility lack of compliance with RFC 8909
// XXX backwards compatibility lack of compliance with RFC 8089
if (resolvedUrl.host && resolvedUrl.host !== 'localhost') {
const rawSpec = res.rawSpec.replace(/^file:\/\//, 'file:///')
resolvedUrl = new url.URL(rawSpec, `file://${path.resolve(where)}/`)
Expand All @@ -273,7 +273,7 @@ function fromFile (res, where) {
specUrl = new url.URL(rawSpec)
rawNoPrefix = rawSpec.replace(/^file:/, '')
}
// XXX end RFC 8909 violation backwards compatibility section
// XXX end RFC 8089 violation backwards compatibility section

// turn /C:/blah into just C:/blah on windows
let specPath = decodeURIComponent(specUrl.pathname)
Expand Down