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.
@@ -9,5 +9,5 @@ updates:
9
9
  - package-ecosystem: "npm"
10
10
  directory: "/"
11
11
  schedule:
12
- interval: "weekly"
12
+ interval: "monthly"
13
13
  open-pull-requests-limit: 10
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 && !parsed.path && parsed.query === 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 && parsed.path.length) {
273
+ if (parsed.path) {
274
274
  parsed.path = escape(unescape(parsed.path))
275
275
  }
276
- if (parsed.fragment && parsed.fragment.length) {
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}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu
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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fast-uri",
3
3
  "description": "Dependency-free RFC 3986 URI toolbox",
4
- "version": "3.0.5",
4
+ "version": "3.0.6",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "types": "types/index.d.ts",