fast-uri 2.3.0 → 2.4.0

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/.taprc ADDED
@@ -0,0 +1 @@
1
+ check-coverage: false
package/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  'use strict'
2
2
 
3
- const URL = require('node:url')
4
3
  const { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require('./lib/utils')
5
4
  const SCHEMES = require('./lib/schemes')
6
5
 
@@ -274,7 +273,7 @@ function parse (uri, opts) {
274
273
  parsed.host = unescape(parsed.host)
275
274
  }
276
275
  if (parsed.path !== undefined && parsed.path.length) {
277
- parsed.path = encodeURI(parsed.path)
276
+ parsed.path = escape(unescape(parsed.path))
278
277
  }
279
278
  if (parsed.fragment !== undefined && parsed.fragment.length) {
280
279
  parsed.fragment = encodeURI(decodeURI(parsed.fragment))
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": "2.3.0",
4
+ "version": "2.4.0",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "types": "types/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "author": "Vincent Le Goff <vince.legoff@gmail.com> (https://github.com/zekth)",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/fastify/fast-uri"
12
+ "url": "git+https://github.com/fastify/fast-uri.git"
13
13
  },
14
14
  "bugs": {
15
15
  "url": "https://github.com/fastify/fast-uri/issues"
@@ -31,11 +31,7 @@
31
31
  "snazzy": "^9.0.0",
32
32
  "standard": "^17.0.0",
33
33
  "tap": "^16.0.0",
34
- "tsd": "^0.29.0",
34
+ "tsd": "^0.31.0",
35
35
  "uri-js": "^4.4.1"
36
- },
37
- "dependencies": {},
38
- "tap": {
39
- "check-coverage": false
40
36
  }
41
37
  }
@@ -9,6 +9,7 @@ test('compatibility Parse', (t) => {
9
9
  const toParse = [
10
10
  '//www.g.com/error\n/bleh/bleh',
11
11
  'https://fastify.org',
12
+ '/definitions/Record%3Cstring%2CPerson%3E',
12
13
  '//10.10.10.10',
13
14
  '//10.10.000.10',
14
15
  '//[2001:db8::7%en0]',