fast-uri 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +1 -1
- package/index.js +3 -3
- package/lib/schemes.js +1 -1
- package/package.json +1 -1
package/.github/dependabot.yml
CHANGED
package/index.js
CHANGED
|
@@ -231,7 +231,7 @@ function parse (uri, opts) {
|
|
|
231
231
|
isIP = true
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined &&
|
|
234
|
+
if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {
|
|
235
235
|
parsed.reference = 'same-document'
|
|
236
236
|
} else if (parsed.scheme === undefined) {
|
|
237
237
|
parsed.reference = 'relative'
|
|
@@ -270,10 +270,10 @@ function parse (uri, opts) {
|
|
|
270
270
|
if (gotEncoding && parsed.host !== undefined) {
|
|
271
271
|
parsed.host = unescape(parsed.host)
|
|
272
272
|
}
|
|
273
|
-
if (parsed.path
|
|
273
|
+
if (parsed.path) {
|
|
274
274
|
parsed.path = escape(unescape(parsed.path))
|
|
275
275
|
}
|
|
276
|
-
if (parsed.fragment
|
|
276
|
+
if (parsed.fragment) {
|
|
277
277
|
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))
|
|
278
278
|
}
|
|
279
279
|
}
|
package/lib/schemes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const UUID_REG = /^[\da-f]{8}
|
|
3
|
+
const UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu
|
|
4
4
|
const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu
|
|
5
5
|
|
|
6
6
|
function isSecure (wsComponents) {
|