@wordpress/url 3.28.0 → 3.30.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.30.0 (2023-03-15)
6
+
7
+ ## 3.29.0 (2023-03-01)
8
+
5
9
  ## 3.28.0 (2023-02-15)
6
10
 
7
11
  ## 3.27.0 (2023-02-01)
package/README.md CHANGED
@@ -481,6 +481,26 @@ _Returns_
481
481
 
482
482
  - `string`: The updated URL.
483
483
 
484
+ ### prependHTTPS
485
+
486
+ Prepends "https\://" to a url, if it looks like something that is meant to be a TLD.
487
+
488
+ Note: this will not replace "http\://" with "<https://">.
489
+
490
+ _Usage_
491
+
492
+ ```js
493
+ const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org
494
+ ```
495
+
496
+ _Parameters_
497
+
498
+ - _url_ `string`: The URL to test.
499
+
500
+ _Returns_
501
+
502
+ - `string`: The updated URL.
503
+
484
504
  ### removeQueryArgs
485
505
 
486
506
  Removes arguments from the query string of the url
package/build/index.js CHANGED
@@ -141,6 +141,12 @@ Object.defineProperty(exports, "prependHTTP", {
141
141
  return _prependHttp.prependHTTP;
142
142
  }
143
143
  });
144
+ Object.defineProperty(exports, "prependHTTPS", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _prependHttps.prependHTTPS;
148
+ }
149
+ });
144
150
  Object.defineProperty(exports, "removeQueryArgs", {
145
151
  enumerable: true,
146
152
  get: function () {
@@ -211,4 +217,6 @@ var _cleanForSlug = require("./clean-for-slug");
211
217
  var _getFilename = require("./get-filename");
212
218
 
213
219
  var _normalizePath = require("./normalize-path");
220
+
221
+ var _prependHttps = require("./prepend-https");
214
222
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/url/src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { isURL } from './is-url';\nexport { isEmail } from './is-email';\nexport { getProtocol } from './get-protocol';\nexport { isValidProtocol } from './is-valid-protocol';\nexport { getAuthority } from './get-authority';\nexport { isValidAuthority } from './is-valid-authority';\nexport { getPath } from './get-path';\nexport { isValidPath } from './is-valid-path';\nexport { getQueryString } from './get-query-string';\nexport { buildQueryString } from './build-query-string';\nexport { isValidQueryString } from './is-valid-query-string';\nexport { getPathAndQueryString } from './get-path-and-query-string';\nexport { getFragment } from './get-fragment';\nexport { isValidFragment } from './is-valid-fragment';\nexport { addQueryArgs } from './add-query-args';\nexport { getQueryArg } from './get-query-arg';\nexport { getQueryArgs } from './get-query-args';\nexport { hasQueryArg } from './has-query-arg';\nexport { removeQueryArgs } from './remove-query-args';\nexport { prependHTTP } from './prepend-http';\nexport { safeDecodeURI } from './safe-decode-uri';\nexport { safeDecodeURIComponent } from './safe-decode-uri-component';\nexport { filterURLForDisplay } from './filter-url-for-display';\nexport { cleanForSlug } from './clean-for-slug';\nexport { getFilename } from './get-filename';\nexport { normalizePath } from './normalize-path';\n"]}
1
+ {"version":3,"sources":["@wordpress/url/src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { isURL } from './is-url';\nexport { isEmail } from './is-email';\nexport { getProtocol } from './get-protocol';\nexport { isValidProtocol } from './is-valid-protocol';\nexport { getAuthority } from './get-authority';\nexport { isValidAuthority } from './is-valid-authority';\nexport { getPath } from './get-path';\nexport { isValidPath } from './is-valid-path';\nexport { getQueryString } from './get-query-string';\nexport { buildQueryString } from './build-query-string';\nexport { isValidQueryString } from './is-valid-query-string';\nexport { getPathAndQueryString } from './get-path-and-query-string';\nexport { getFragment } from './get-fragment';\nexport { isValidFragment } from './is-valid-fragment';\nexport { addQueryArgs } from './add-query-args';\nexport { getQueryArg } from './get-query-arg';\nexport { getQueryArgs } from './get-query-args';\nexport { hasQueryArg } from './has-query-arg';\nexport { removeQueryArgs } from './remove-query-args';\nexport { prependHTTP } from './prepend-http';\nexport { safeDecodeURI } from './safe-decode-uri';\nexport { safeDecodeURIComponent } from './safe-decode-uri-component';\nexport { filterURLForDisplay } from './filter-url-for-display';\nexport { cleanForSlug } from './clean-for-slug';\nexport { getFilename } from './get-filename';\nexport { normalizePath } from './normalize-path';\nexport { prependHTTPS } from './prepend-https';\n"]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.prependHTTPS = prependHTTPS;
7
+
8
+ var _prependHttp = require("./prepend-http");
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+
14
+ /**
15
+ * Prepends "https://" to a url, if it looks like something that is meant to be a TLD.
16
+ *
17
+ * Note: this will not replace "http://" with "https://".
18
+ *
19
+ * @param {string} url The URL to test.
20
+ *
21
+ * @example
22
+ * ```js
23
+ * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org
24
+ * ```
25
+ *
26
+ * @return {string} The updated URL.
27
+ */
28
+ function prependHTTPS(url) {
29
+ if (!url) {
30
+ return url;
31
+ } // If url starts with http://, return it as is.
32
+
33
+
34
+ if (url.startsWith('http://')) {
35
+ return url;
36
+ }
37
+
38
+ url = (0, _prependHttp.prependHTTP)(url);
39
+ return url.replace(/^http:/, 'https:');
40
+ }
41
+ //# sourceMappingURL=prepend-https.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/url/src/prepend-https.js"],"names":["prependHTTPS","url","startsWith","replace"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAT,CAAuBC,GAAvB,EAA6B;AACnC,MAAK,CAAEA,GAAP,EAAa;AACZ,WAAOA,GAAP;AACA,GAHkC,CAKnC;;;AACA,MAAKA,GAAG,CAACC,UAAJ,CAAgB,SAAhB,CAAL,EAAmC;AAClC,WAAOD,GAAP;AACA;;AAEDA,EAAAA,GAAG,GAAG,8BAAaA,GAAb,CAAN;AAEA,SAAOA,GAAG,CAACE,OAAJ,CAAa,QAAb,EAAuB,QAAvB,CAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { prependHTTP } from './prepend-http';\n\n/**\n * Prepends \"https://\" to a url, if it looks like something that is meant to be a TLD.\n *\n * Note: this will not replace \"http://\" with \"https://\".\n *\n * @param {string} url The URL to test.\n *\n * @example\n * ```js\n * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org\n * ```\n *\n * @return {string} The updated URL.\n */\nexport function prependHTTPS( url ) {\n\tif ( ! url ) {\n\t\treturn url;\n\t}\n\n\t// If url starts with http://, return it as is.\n\tif ( url.startsWith( 'http://' ) ) {\n\t\treturn url;\n\t}\n\n\turl = prependHTTP( url );\n\n\treturn url.replace( /^http:/, 'https:' );\n}\n"]}
@@ -24,4 +24,5 @@ export { filterURLForDisplay } from './filter-url-for-display';
24
24
  export { cleanForSlug } from './clean-for-slug';
25
25
  export { getFilename } from './get-filename';
26
26
  export { normalizePath } from './normalize-path';
27
+ export { prependHTTPS } from './prepend-https';
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/url/src/index.js"],"names":["isURL","isEmail","getProtocol","isValidProtocol","getAuthority","isValidAuthority","getPath","isValidPath","getQueryString","buildQueryString","isValidQueryString","getPathAndQueryString","getFragment","isValidFragment","addQueryArgs","getQueryArg","getQueryArgs","hasQueryArg","removeQueryArgs","prependHTTP","safeDecodeURI","safeDecodeURIComponent","filterURLForDisplay","cleanForSlug","getFilename","normalizePath"],"mappings":"AAAA,SAASA,KAAT,QAAsB,UAAtB;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,gBAAT,QAAiC,sBAAjC;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,gBAAT,QAAiC,sBAAjC;AACA,SAASC,kBAAT,QAAmC,yBAAnC;AACA,SAASC,qBAAT,QAAsC,6BAAtC;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,aAAT,QAA8B,mBAA9B;AACA,SAASC,sBAAT,QAAuC,6BAAvC;AACA,SAASC,mBAAT,QAAoC,0BAApC;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,aAAT,QAA8B,kBAA9B","sourcesContent":["export { isURL } from './is-url';\nexport { isEmail } from './is-email';\nexport { getProtocol } from './get-protocol';\nexport { isValidProtocol } from './is-valid-protocol';\nexport { getAuthority } from './get-authority';\nexport { isValidAuthority } from './is-valid-authority';\nexport { getPath } from './get-path';\nexport { isValidPath } from './is-valid-path';\nexport { getQueryString } from './get-query-string';\nexport { buildQueryString } from './build-query-string';\nexport { isValidQueryString } from './is-valid-query-string';\nexport { getPathAndQueryString } from './get-path-and-query-string';\nexport { getFragment } from './get-fragment';\nexport { isValidFragment } from './is-valid-fragment';\nexport { addQueryArgs } from './add-query-args';\nexport { getQueryArg } from './get-query-arg';\nexport { getQueryArgs } from './get-query-args';\nexport { hasQueryArg } from './has-query-arg';\nexport { removeQueryArgs } from './remove-query-args';\nexport { prependHTTP } from './prepend-http';\nexport { safeDecodeURI } from './safe-decode-uri';\nexport { safeDecodeURIComponent } from './safe-decode-uri-component';\nexport { filterURLForDisplay } from './filter-url-for-display';\nexport { cleanForSlug } from './clean-for-slug';\nexport { getFilename } from './get-filename';\nexport { normalizePath } from './normalize-path';\n"]}
1
+ {"version":3,"sources":["@wordpress/url/src/index.js"],"names":["isURL","isEmail","getProtocol","isValidProtocol","getAuthority","isValidAuthority","getPath","isValidPath","getQueryString","buildQueryString","isValidQueryString","getPathAndQueryString","getFragment","isValidFragment","addQueryArgs","getQueryArg","getQueryArgs","hasQueryArg","removeQueryArgs","prependHTTP","safeDecodeURI","safeDecodeURIComponent","filterURLForDisplay","cleanForSlug","getFilename","normalizePath","prependHTTPS"],"mappings":"AAAA,SAASA,KAAT,QAAsB,UAAtB;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,gBAAT,QAAiC,sBAAjC;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,gBAAT,QAAiC,sBAAjC;AACA,SAASC,kBAAT,QAAmC,yBAAnC;AACA,SAASC,qBAAT,QAAsC,6BAAtC;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,aAAT,QAA8B,mBAA9B;AACA,SAASC,sBAAT,QAAuC,6BAAvC;AACA,SAASC,mBAAT,QAAoC,0BAApC;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,aAAT,QAA8B,kBAA9B;AACA,SAASC,YAAT,QAA6B,iBAA7B","sourcesContent":["export { isURL } from './is-url';\nexport { isEmail } from './is-email';\nexport { getProtocol } from './get-protocol';\nexport { isValidProtocol } from './is-valid-protocol';\nexport { getAuthority } from './get-authority';\nexport { isValidAuthority } from './is-valid-authority';\nexport { getPath } from './get-path';\nexport { isValidPath } from './is-valid-path';\nexport { getQueryString } from './get-query-string';\nexport { buildQueryString } from './build-query-string';\nexport { isValidQueryString } from './is-valid-query-string';\nexport { getPathAndQueryString } from './get-path-and-query-string';\nexport { getFragment } from './get-fragment';\nexport { isValidFragment } from './is-valid-fragment';\nexport { addQueryArgs } from './add-query-args';\nexport { getQueryArg } from './get-query-arg';\nexport { getQueryArgs } from './get-query-args';\nexport { hasQueryArg } from './has-query-arg';\nexport { removeQueryArgs } from './remove-query-args';\nexport { prependHTTP } from './prepend-http';\nexport { safeDecodeURI } from './safe-decode-uri';\nexport { safeDecodeURIComponent } from './safe-decode-uri-component';\nexport { filterURLForDisplay } from './filter-url-for-display';\nexport { cleanForSlug } from './clean-for-slug';\nexport { getFilename } from './get-filename';\nexport { normalizePath } from './normalize-path';\nexport { prependHTTPS } from './prepend-https';\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { prependHTTP } from './prepend-http';
5
+ /**
6
+ * Prepends "https://" to a url, if it looks like something that is meant to be a TLD.
7
+ *
8
+ * Note: this will not replace "http://" with "https://".
9
+ *
10
+ * @param {string} url The URL to test.
11
+ *
12
+ * @example
13
+ * ```js
14
+ * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org
15
+ * ```
16
+ *
17
+ * @return {string} The updated URL.
18
+ */
19
+
20
+ export function prependHTTPS(url) {
21
+ if (!url) {
22
+ return url;
23
+ } // If url starts with http://, return it as is.
24
+
25
+
26
+ if (url.startsWith('http://')) {
27
+ return url;
28
+ }
29
+
30
+ url = prependHTTP(url);
31
+ return url.replace(/^http:/, 'https:');
32
+ }
33
+ //# sourceMappingURL=prepend-https.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/url/src/prepend-https.js"],"names":["prependHTTP","prependHTTPS","url","startsWith","replace"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,gBAA5B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,GAAvB,EAA6B;AACnC,MAAK,CAAEA,GAAP,EAAa;AACZ,WAAOA,GAAP;AACA,GAHkC,CAKnC;;;AACA,MAAKA,GAAG,CAACC,UAAJ,CAAgB,SAAhB,CAAL,EAAmC;AAClC,WAAOD,GAAP;AACA;;AAEDA,EAAAA,GAAG,GAAGF,WAAW,CAAEE,GAAF,CAAjB;AAEA,SAAOA,GAAG,CAACE,OAAJ,CAAa,QAAb,EAAuB,QAAvB,CAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { prependHTTP } from './prepend-http';\n\n/**\n * Prepends \"https://\" to a url, if it looks like something that is meant to be a TLD.\n *\n * Note: this will not replace \"http://\" with \"https://\".\n *\n * @param {string} url The URL to test.\n *\n * @example\n * ```js\n * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org\n * ```\n *\n * @return {string} The updated URL.\n */\nexport function prependHTTPS( url ) {\n\tif ( ! url ) {\n\t\treturn url;\n\t}\n\n\t// If url starts with http://, return it as is.\n\tif ( url.startsWith( 'http://' ) ) {\n\t\treturn url;\n\t}\n\n\turl = prependHTTP( url );\n\n\treturn url.replace( /^http:/, 'https:' );\n}\n"]}
@@ -24,4 +24,5 @@ export { filterURLForDisplay } from "./filter-url-for-display";
24
24
  export { cleanForSlug } from "./clean-for-slug";
25
25
  export { getFilename } from "./get-filename";
26
26
  export { normalizePath } from "./normalize-path";
27
+ export { prependHTTPS } from "./prepend-https";
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Prepends "https://" to a url, if it looks like something that is meant to be a TLD.
3
+ *
4
+ * Note: this will not replace "http://" with "https://".
5
+ *
6
+ * @param {string} url The URL to test.
7
+ *
8
+ * @example
9
+ * ```js
10
+ * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org
11
+ * ```
12
+ *
13
+ * @return {string} The updated URL.
14
+ */
15
+ export function prependHTTPS(url: string): string;
16
+ //# sourceMappingURL=prepend-https.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepend-https.d.ts","sourceRoot":"","sources":["../src/prepend-https.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,kCATW,MAAM,GAOL,MAAM,CAejB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/url",
3
- "version": "3.28.0",
3
+ "version": "3.30.0",
4
4
  "description": "WordPress URL utilities.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "c25ff895413bad4354c55c0c2d732552618b0d56"
36
+ "gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
37
37
  }
package/src/index.js CHANGED
@@ -24,3 +24,4 @@ export { filterURLForDisplay } from './filter-url-for-display';
24
24
  export { cleanForSlug } from './clean-for-slug';
25
25
  export { getFilename } from './get-filename';
26
26
  export { normalizePath } from './normalize-path';
27
+ export { prependHTTPS } from './prepend-https';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { prependHTTP } from './prepend-http';
5
+
6
+ /**
7
+ * Prepends "https://" to a url, if it looks like something that is meant to be a TLD.
8
+ *
9
+ * Note: this will not replace "http://" with "https://".
10
+ *
11
+ * @param {string} url The URL to test.
12
+ *
13
+ * @example
14
+ * ```js
15
+ * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org
16
+ * ```
17
+ *
18
+ * @return {string} The updated URL.
19
+ */
20
+ export function prependHTTPS( url ) {
21
+ if ( ! url ) {
22
+ return url;
23
+ }
24
+
25
+ // If url starts with http://, return it as is.
26
+ if ( url.startsWith( 'http://' ) ) {
27
+ return url;
28
+ }
29
+
30
+ url = prependHTTP( url );
31
+
32
+ return url.replace( /^http:/, 'https:' );
33
+ }
@@ -1 +1 @@
1
- [{"input":"https://test:@test"},{"input":"https://:@test"},{"input":"non-special://test:@test/x"},{"input":"non-special://:@test/x"},{"input":"lolscheme:x x#x x"},{"input":"file://example:1/","failure":true},{"input":"file://example:test/","failure":true},{"input":"file://example%/","failure":true},{"input":"file://[example]/","failure":true},{"input":"http://example.com/././foo"},{"input":"http://example.com/./.foo"},{"input":"http://example.com/foo/."},{"input":"http://example.com/foo/./"},{"input":"http://example.com/foo/bar/.."},{"input":"http://example.com/foo/bar/../"},{"input":"http://example.com/foo/..bar"},{"input":"http://example.com/foo/bar/../ton"},{"input":"http://example.com/foo/bar/../ton/../../a"},{"input":"http://example.com/foo/../../.."},{"input":"http://example.com/foo/../../../ton"},{"input":"http://example.com/foo/%2e"},{"input":"http://example.com/foo/%2e%2"},{"input":"http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"},{"input":"http://example.com////../.."},{"input":"http://example.com/foo/bar//../.."},{"input":"http://example.com/foo/bar//.."},{"input":"http://example.com/foo"},{"input":"http://example.com/%20foo"},{"input":"http://example.com/foo%"},{"input":"http://example.com/foo%2"},{"input":"http://example.com/foo%2zbar"},{"input":"http://example.com/foo%2©zbar"},{"input":"http://example.com/foo%41%7a"},{"input":"http://example.com/foo\t‘%91"},{"input":"http://example.com/foo%00%51"},{"input":"http://example.com/(%28:%3A%29)"},{"input":"http://example.com/%3A%3a%3C%3c"},{"input":"http://example.com/foo\tbar"},{"input":"http://example.com\\\\foo\\\\bar"},{"input":"http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd"},{"input":"http://example.com/@asdf%40"},{"input":"http://example.com/你好你好"},{"input":"http://example.com/‥/foo"},{"input":"http://example.com//foo"},{"input":"http://example.com/‮/foo/‭/bar"},{"input":"http://www.google.com/foo?bar=baz#"},{"input":"http://www.google.com/foo?bar=baz# »"},{"input":"data:test# »"},{"input":"http://www.google.com"},{"input":"http://192.0x00A80001"},{"input":"http://www/foo%2Ehtml"},{"input":"http://www/foo/%2E/html"},{"input":"http://user:pass@/","failure":true},{"input":"http://%25DOMAIN:foobar@foodomain.com/"},{"input":"http:\\\\www.google.com\\foo"},{"input":"http://foo:80/"},{"input":"http://foo:81/"},{"input":"httpa://foo:80/"},{"input":"http://foo:-80/","failure":true},{"input":"https://foo:443/"},{"input":"https://foo:80/"},{"input":"ftp://foo:21/"},{"input":"ftp://foo:80/"},{"input":"gopher://foo:70/"},{"input":"gopher://foo:443/"},{"input":"ws://foo:80/"},{"input":"ws://foo:81/"},{"input":"ws://foo:443/"},{"input":"ws://foo:815/"},{"input":"wss://foo:80/"},{"input":"wss://foo:81/"},{"input":"wss://foo:443/"},{"input":"wss://foo:815/"},{"input":"http:/example.com/"},{"input":"ftp:/example.com/"},{"input":"https:/example.com/"},{"input":"madeupscheme:/example.com/"},{"input":"file:/example.com/"},{"input":"ftps:/example.com/"},{"input":"gopher:/example.com/"},{"input":"ws:/example.com/"},{"input":"wss:/example.com/"},{"input":"data:/example.com/"},{"input":"javascript:/example.com/"},{"input":"mailto:/example.com/"},{"input":"http:example.com/"},{"input":"ftp:example.com/"},{"input":"https:example.com/"},{"input":"madeupscheme:example.com/"},{"input":"ftps:example.com/"},{"input":"gopher:example.com/"},{"input":"ws:example.com/"},{"input":"wss:example.com/"},{"input":"data:example.com/"},{"input":"javascript:example.com/"},{"input":"mailto:example.com/"},{"input":"http:@www.example.com"},{"input":"http:/@www.example.com"},{"input":"http://@www.example.com"},{"input":"http:a:b@www.example.com"},{"input":"http:/a:b@www.example.com"},{"input":"http://a:b@www.example.com"},{"input":"http://@pple.com"},{"input":"http::b@www.example.com"},{"input":"http:/:b@www.example.com"},{"input":"http://:b@www.example.com"},{"input":"http:/:@/www.example.com","failure":true},{"input":"http://user@/www.example.com","failure":true},{"input":"http:@/www.example.com","failure":true},{"input":"http:/@/www.example.com","failure":true},{"input":"http://@/www.example.com","failure":true},{"input":"https:@/www.example.com","failure":true},{"input":"http:a:b@/www.example.com","failure":true},{"input":"http:/a:b@/www.example.com","failure":true},{"input":"http://a:b@/www.example.com","failure":true},{"input":"http::@/www.example.com","failure":true},{"input":"http:a:@www.example.com"},{"input":"http:/a:@www.example.com"},{"input":"http://a:@www.example.com"},{"input":"http://www.@pple.com"},{"input":"http:@:www.example.com","failure":true},{"input":"http:/@:www.example.com","failure":true},{"input":"http://@:www.example.com","failure":true},{"input":"http://:@www.example.com"},{"input":"\u0000\u001b\u0004\u0012 http://example.com/\u001f \r "},{"input":"https://�","failure":true},{"input":"https://%EF%BF%BD","failure":true},{"input":"https://x/�?�#�"},{"input":"http://a.b.c.xn--pokxncvks","failure":true},{"input":"http://10.0.0.xn--pokxncvks","failure":true},{"input":"https://faß.ExAmPlE/"},{"input":"sc://faß.ExAmPlE/"},{"input":"https://x x:12","failure":true},{"input":"http://./"},{"input":"http://../"},{"input":"http://0..0x300/"},{"input":"http://[www.google.com]/","failure":true},{"input":"http://host/?'"},{"input":"notspecial://host/?'"},{"input":"about:/../"},{"input":"data:/../"},{"input":"javascript:/../"},{"input":"mailto:/../"},{"input":"sc://ñ.test/"},{"input":"sc://\u0000/","failure":true},{"input":"sc:// /","failure":true},{"input":"sc://%/"},{"input":"sc://@/","failure":true},{"input":"sc://te@s:t@/","failure":true},{"input":"sc://:/","failure":true},{"input":"sc://:12/","failure":true},{"input":"sc://[/","failure":true},{"input":"sc://\\/","failure":true},{"input":"sc://]/","failure":true},{"input":"sc:\\../"},{"input":"sc::a@example.net"},{"input":"wow:%NBD"},{"input":"wow:%1G"},{"input":"wow:￿"},{"input":"http://example.com/\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿?\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿"},{"input":"http://a<b","failure":true},{"input":"http://a>b","failure":true},{"input":"http://a^b","failure":true},{"input":"non-special://a<b","failure":true},{"input":"non-special://a>b","failure":true},{"input":"non-special://a^b","failure":true},{"input":"foo://ho\u0000st/","failure":true},{"input":"foo://ho|st/","failure":true},{"input":"foo://ho\tst/"},{"input":"foo://ho\nst/"},{"input":"foo://ho\rst/"},{"input":"http://ho%00st/","failure":true},{"input":"http://ho%09st/","failure":true},{"input":"http://ho%0Ast/","failure":true},{"input":"http://ho%0Dst/","failure":true},{"input":"http://ho%20st/","failure":true},{"input":"http://ho%23st/","failure":true},{"input":"http://ho%2Fst/","failure":true},{"input":"http://ho%3Ast/","failure":true},{"input":"http://ho%3Cst/","failure":true},{"input":"http://ho%3Est/","failure":true},{"input":"http://ho%3Fst/","failure":true},{"input":"http://ho%40st/","failure":true},{"input":"http://ho%5Bst/","failure":true},{"input":"http://ho%5Cst/","failure":true},{"input":"http://ho%5Dst/","failure":true},{"input":"http://ho%7Cst/","failure":true},{"input":"http://\u001f!\"$&'()*+,-.;=_`{}~/"},{"input":"sc://\u001f!\"$&'()*+,-.;=_`{}~/"},{"input":"ftp://example.com%80/","failure":true},{"input":"ftp://example.com%A0/","failure":true},{"input":"https://example.com%80/","failure":true},{"input":"https://example.com%A0/","failure":true},{"input":"ftp://%e2%98%83"},{"input":"https://%e2%98%83"},{"input":"http://127.0.0.1:10100/relative_import.html"},{"input":"http://facebook.com/?foo=%7B%22abc%22"},{"input":"https://localhost:3000/jqueryui@1.2.3"},{"input":"h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg"},{"input":"http://foo.bar/baz?qux#foo\bbar"},{"input":"http://foo.bar/baz?qux#foo\"bar"},{"input":"http://foo.bar/baz?qux#foo<bar"},{"input":"http://foo.bar/baz?qux#foo>bar"},{"input":"http://foo.bar/baz?qux#foo`bar"},{"input":"https://0x.0x.0"},{"input":"https://0x100000000/test","failure":true},{"input":"https://256.0.0.1/test","failure":true},{"input":"file:///C%3A/"},{"input":"file:///C%7C/"},{"input":"file://%43%3A","failure":true},{"input":"file://%43%7C","failure":true},{"input":"file://%43|","failure":true},{"input":"file://C%7C","failure":true},{"input":"file://%43%7C/","failure":true},{"input":"https://%43%7C/","failure":true},{"input":"asdf://%43|/","failure":true},{"input":"asdf://%43%7C/"},{"input":"file:\\\\//"},{"input":"file:\\\\\\\\"},{"input":"file:\\\\\\\\?fox"},{"input":"file:\\\\\\\\#guppy"},{"input":"file://spider///"},{"input":"file:\\\\localhost//"},{"input":"file:///localhost//cat"},{"input":"file://\\/localhost//cat"},{"input":"file://localhost//a//../..//"},{"input":"file://example.net/C:/"},{"input":"file://1.2.3.4/C:/"},{"input":"file://[1::8]/C:/"},{"input":"file:/C|/"},{"input":"file://C|/"},{"input":"file:"},{"input":"file:?q=v"},{"input":"file:#frag"},{"input":"file:///Y:"},{"input":"file:///Y:/"},{"input":"file:///./Y"},{"input":"file:///./Y:"},{"input":"\\\\\\.\\Y:","failure":true},{"input":"file:///y:"},{"input":"file:///y:/"},{"input":"file:///./y"},{"input":"file:///./y:"},{"input":"\\\\\\.\\y:","failure":true},{"input":"file://localhost//a//../..//foo"},{"input":"file://localhost////foo"},{"input":"file:////foo"},{"input":"file:.//p"},{"input":"file:/.//p"},{"input":"https://[0::0::0]","failure":true},{"input":"https://[0:.0]","failure":true},{"input":"https://[0:0:]","failure":true},{"input":"https://[0:1:2:3:4:5:6:7.0.0.0.1]","failure":true},{"input":"https://[0:1.00.0.0.0]","failure":true},{"input":"https://[0:1.290.0.0.0]","failure":true},{"input":"https://[0:1.23.23]","failure":true},{"input":"http://?","failure":true},{"input":"http://#","failure":true},{"input":"sc://ñ"},{"input":"sc://ñ?x"},{"input":"sc://ñ#x"},{"input":"sc://?"},{"input":"sc://#"},{"input":"tftp://foobar.com/someconfig;mode=netascii"},{"input":"telnet://user:pass@foobar.com:23/"},{"input":"ut2004://10.10.10.10:7777/Index.ut2"},{"input":"redis://foo:bar@somehost:6379/0?baz=bam&qux=baz"},{"input":"rsync://foo@host:911/sup"},{"input":"git://github.com/foo/bar.git"},{"input":"irc://myserver.com:6999/channel?passwd"},{"input":"dns://fw.example.org:9999/foo.bar.org?type=TXT"},{"input":"ldap://localhost:389/ou=People,o=JNDITutorial"},{"input":"git+https://github.com/foo/bar"},{"input":"urn:ietf:rfc:2648"},{"input":"tag:joe@example.org,2001:foo/bar"},{"input":"non-spec:/.//"},{"input":"non-spec:/..//"},{"input":"non-spec:/a/..//"},{"input":"non-spec:/.//path"},{"input":"non-spec:/..//path"},{"input":"non-spec:/a/..//path"},{"input":"non-special://%E2%80%A0/"},{"input":"non-special://H%4fSt/path"},{"input":"non-special://[1:2:0:0:5:0:0:0]/"},{"input":"non-special://[1:2:0:0:0:0:0:3]/"},{"input":"non-special://[1:2::3]:80/"},{"input":"non-special://[:80/","failure":true},{"input":"blob:https://example.com:443/"},{"input":"blob:d3958f5c-0777-0845-9dcf-2cb28783acaf"},{"input":"http://0177.0.0.0189"},{"input":"http://0x7f.0.0.0x7g"},{"input":"http://0X7F.0.0.0X7G"},{"input":"http://[::127.0.0.0.1]","failure":true},{"input":"http://[0:1:0:1:0:1:0:1]"},{"input":"http://[1:0:1:0:1:0:1:0]"},{"input":"http://example.org/test?\""},{"input":"http://example.org/test?#"},{"input":"http://example.org/test?<"},{"input":"http://example.org/test?>"},{"input":"http://example.org/test?⌣"},{"input":"http://example.org/test?%23%23"},{"input":"http://example.org/test?%GH"},{"input":"http://example.org/test?a#%EF"},{"input":"http://example.org/test?a#%GH"},{"input":"a","failure":true},{"input":"a/","failure":true},{"input":"a//","failure":true},{"input":"http://example.org/test?a#b\u0000c"},{"input":"non-spec://example.org/test?a#b\u0000c"},{"input":"non-spec:/test?a#b\u0000c"},{"input":"file://a­b/p"},{"input":"file://a%C2%ADb/p"},{"input":"file://­/p","failure":true},{"input":"file://%C2%AD/p","failure":true},{"input":"file://xn--/p","failure":true},{"input":"non-special:cannot-be-a-base-url-\u0000\u0001\u001f\u001e~€"},{"input":"https://www.example.com/path{path.html?query'=query#fragment<fragment"},{"input":"foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/"},{"input":"wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/"},{"input":"foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/"},{"input":"wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/"},{"input":"foo://!\"$%&'()*+,-.;=_`{}~/"},{"input":"wss://!\"$&'()*+,-.;=_`{}~/"},{"input":"foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~"},{"input":"wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~"},{"input":"foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},{"input":"wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},{"input":"foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},{"input":"wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"}]
1
+ [{"input":"https://test:@test"},{"input":"https://:@test"},{"input":"non-special://test:@test/x"},{"input":"non-special://:@test/x"},{"input":"lolscheme:x x#x x"},{"input":"file://example:1/","failure":true},{"input":"file://example:test/","failure":true},{"input":"file://example%/","failure":true},{"input":"file://[example]/","failure":true},{"input":"http://example.com/././foo"},{"input":"http://example.com/./.foo"},{"input":"http://example.com/foo/."},{"input":"http://example.com/foo/./"},{"input":"http://example.com/foo/bar/.."},{"input":"http://example.com/foo/bar/../"},{"input":"http://example.com/foo/..bar"},{"input":"http://example.com/foo/bar/../ton"},{"input":"http://example.com/foo/bar/../ton/../../a"},{"input":"http://example.com/foo/../../.."},{"input":"http://example.com/foo/../../../ton"},{"input":"http://example.com/foo/%2e"},{"input":"http://example.com/foo/%2e%2"},{"input":"http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"},{"input":"http://example.com////../.."},{"input":"http://example.com/foo/bar//../.."},{"input":"http://example.com/foo/bar//.."},{"input":"http://example.com/foo"},{"input":"http://example.com/%20foo"},{"input":"http://example.com/foo%"},{"input":"http://example.com/foo%2"},{"input":"http://example.com/foo%2zbar"},{"input":"http://example.com/foo%2©zbar"},{"input":"http://example.com/foo%41%7a"},{"input":"http://example.com/foo\t‘%91"},{"input":"http://example.com/foo%00%51"},{"input":"http://example.com/(%28:%3A%29)"},{"input":"http://example.com/%3A%3a%3C%3c"},{"input":"http://example.com/foo\tbar"},{"input":"http://example.com\\\\foo\\\\bar"},{"input":"http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd"},{"input":"http://example.com/@asdf%40"},{"input":"http://example.com/你好你好"},{"input":"http://example.com/‥/foo"},{"input":"http://example.com//foo"},{"input":"http://example.com/‮/foo/‭/bar"},{"input":"http://www.google.com/foo?bar=baz#"},{"input":"http://www.google.com/foo?bar=baz# »"},{"input":"data:test# »"},{"input":"http://www.google.com"},{"input":"http://192.0x00A80001"},{"input":"http://www/foo%2Ehtml"},{"input":"http://www/foo/%2E/html"},{"input":"http://user:pass@/","failure":true},{"input":"http://%25DOMAIN:foobar@foodomain.com/"},{"input":"http:\\\\www.google.com\\foo"},{"input":"http://foo:80/"},{"input":"http://foo:81/"},{"input":"httpa://foo:80/"},{"input":"http://foo:-80/","failure":true},{"input":"https://foo:443/"},{"input":"https://foo:80/"},{"input":"ftp://foo:21/"},{"input":"ftp://foo:80/"},{"input":"gopher://foo:70/"},{"input":"gopher://foo:443/"},{"input":"ws://foo:80/"},{"input":"ws://foo:81/"},{"input":"ws://foo:443/"},{"input":"ws://foo:815/"},{"input":"wss://foo:80/"},{"input":"wss://foo:81/"},{"input":"wss://foo:443/"},{"input":"wss://foo:815/"},{"input":"http:/example.com/"},{"input":"ftp:/example.com/"},{"input":"https:/example.com/"},{"input":"madeupscheme:/example.com/"},{"input":"file:/example.com/"},{"input":"ftps:/example.com/"},{"input":"gopher:/example.com/"},{"input":"ws:/example.com/"},{"input":"wss:/example.com/"},{"input":"data:/example.com/"},{"input":"javascript:/example.com/"},{"input":"mailto:/example.com/"},{"input":"http:example.com/"},{"input":"ftp:example.com/"},{"input":"https:example.com/"},{"input":"madeupscheme:example.com/"},{"input":"ftps:example.com/"},{"input":"gopher:example.com/"},{"input":"ws:example.com/"},{"input":"wss:example.com/"},{"input":"data:example.com/"},{"input":"javascript:example.com/"},{"input":"mailto:example.com/"},{"input":"http:@www.example.com"},{"input":"http:/@www.example.com"},{"input":"http://@www.example.com"},{"input":"http:a:b@www.example.com"},{"input":"http:/a:b@www.example.com"},{"input":"http://a:b@www.example.com"},{"input":"http://@pple.com"},{"input":"http::b@www.example.com"},{"input":"http:/:b@www.example.com"},{"input":"http://:b@www.example.com"},{"input":"http:/:@/www.example.com","failure":true},{"input":"http://user@/www.example.com","failure":true},{"input":"http:@/www.example.com","failure":true},{"input":"http:/@/www.example.com","failure":true},{"input":"http://@/www.example.com","failure":true},{"input":"https:@/www.example.com","failure":true},{"input":"http:a:b@/www.example.com","failure":true},{"input":"http:/a:b@/www.example.com","failure":true},{"input":"http://a:b@/www.example.com","failure":true},{"input":"http::@/www.example.com","failure":true},{"input":"http:a:@www.example.com"},{"input":"http:/a:@www.example.com"},{"input":"http://a:@www.example.com"},{"input":"http://www.@pple.com"},{"input":"http:@:www.example.com","failure":true},{"input":"http:/@:www.example.com","failure":true},{"input":"http://@:www.example.com","failure":true},{"input":"http://:@www.example.com"},{"input":"\u0000\u001b\u0004\u0012 http://example.com/\u001f \r "},{"input":"https://�","failure":true},{"input":"https://%EF%BF%BD","failure":true},{"input":"https://x/�?�#�"},{"input":"http://a.b.c.xn--pokxncvks","failure":true},{"input":"http://10.0.0.xn--pokxncvks","failure":true},{"input":"https://faß.ExAmPlE/"},{"input":"sc://faß.ExAmPlE/"},{"input":"https://x x:12","failure":true},{"input":"http://./"},{"input":"http://../"},{"input":"http://[www.google.com]/","failure":true},{"input":"http://host/?'"},{"input":"notspecial://host/?'"},{"input":"about:/../"},{"input":"data:/../"},{"input":"javascript:/../"},{"input":"mailto:/../"},{"input":"sc://ñ.test/"},{"input":"sc://\u0000/","failure":true},{"input":"sc:// /","failure":true},{"input":"sc://%/"},{"input":"sc://@/","failure":true},{"input":"sc://te@s:t@/","failure":true},{"input":"sc://:/","failure":true},{"input":"sc://:12/","failure":true},{"input":"sc://[/","failure":true},{"input":"sc://\\/","failure":true},{"input":"sc://]/","failure":true},{"input":"sc:\\../"},{"input":"sc::a@example.net"},{"input":"wow:%NBD"},{"input":"wow:%1G"},{"input":"wow:￿"},{"input":"http://example.com/\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿?\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿"},{"input":"http://a<b","failure":true},{"input":"http://a>b","failure":true},{"input":"http://a^b","failure":true},{"input":"non-special://a<b","failure":true},{"input":"non-special://a>b","failure":true},{"input":"non-special://a^b","failure":true},{"input":"foo://ho\u0000st/","failure":true},{"input":"foo://ho|st/","failure":true},{"input":"foo://ho\tst/"},{"input":"foo://ho\nst/"},{"input":"foo://ho\rst/"},{"input":"http://ho%00st/","failure":true},{"input":"http://ho%09st/","failure":true},{"input":"http://ho%0Ast/","failure":true},{"input":"http://ho%0Dst/","failure":true},{"input":"http://ho%20st/","failure":true},{"input":"http://ho%23st/","failure":true},{"input":"http://ho%2Fst/","failure":true},{"input":"http://ho%3Ast/","failure":true},{"input":"http://ho%3Cst/","failure":true},{"input":"http://ho%3Est/","failure":true},{"input":"http://ho%3Fst/","failure":true},{"input":"http://ho%40st/","failure":true},{"input":"http://ho%5Bst/","failure":true},{"input":"http://ho%5Cst/","failure":true},{"input":"http://ho%5Dst/","failure":true},{"input":"http://ho%7Cst/","failure":true},{"input":"http://\u001f!\"$&'()*+,-.;=_`{}~/"},{"input":"sc://\u001f!\"$&'()*+,-.;=_`{}~/"},{"input":"ftp://example.com%80/","failure":true},{"input":"ftp://example.com%A0/","failure":true},{"input":"https://example.com%80/","failure":true},{"input":"https://example.com%A0/","failure":true},{"input":"ftp://%e2%98%83"},{"input":"https://%e2%98%83"},{"input":"http://127.0.0.1:10100/relative_import.html"},{"input":"http://facebook.com/?foo=%7B%22abc%22"},{"input":"https://localhost:3000/jqueryui@1.2.3"},{"input":"h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg"},{"input":"http://foo.bar/baz?qux#foo\bbar"},{"input":"http://foo.bar/baz?qux#foo\"bar"},{"input":"http://foo.bar/baz?qux#foo<bar"},{"input":"http://foo.bar/baz?qux#foo>bar"},{"input":"http://foo.bar/baz?qux#foo`bar"},{"input":"https://0x.0x.0"},{"input":"https://0x100000000/test","failure":true},{"input":"https://256.0.0.1/test","failure":true},{"input":"file:///C%3A/"},{"input":"file:///C%7C/"},{"input":"file://%43%3A","failure":true},{"input":"file://%43%7C","failure":true},{"input":"file://%43|","failure":true},{"input":"file://C%7C","failure":true},{"input":"file://%43%7C/","failure":true},{"input":"https://%43%7C/","failure":true},{"input":"asdf://%43|/","failure":true},{"input":"asdf://%43%7C/"},{"input":"file:\\\\//"},{"input":"file:\\\\\\\\"},{"input":"file:\\\\\\\\?fox"},{"input":"file:\\\\\\\\#guppy"},{"input":"file://spider///"},{"input":"file:\\\\localhost//"},{"input":"file:///localhost//cat"},{"input":"file://\\/localhost//cat"},{"input":"file://localhost//a//../..//"},{"input":"file://example.net/C:/"},{"input":"file://1.2.3.4/C:/"},{"input":"file://[1::8]/C:/"},{"input":"file:/C|/"},{"input":"file://C|/"},{"input":"file:"},{"input":"file:?q=v"},{"input":"file:#frag"},{"input":"file:///Y:"},{"input":"file:///Y:/"},{"input":"file:///./Y"},{"input":"file:///./Y:"},{"input":"\\\\\\.\\Y:","failure":true},{"input":"file:///y:"},{"input":"file:///y:/"},{"input":"file:///./y"},{"input":"file:///./y:"},{"input":"\\\\\\.\\y:","failure":true},{"input":"file://localhost//a//../..//foo"},{"input":"file://localhost////foo"},{"input":"file:////foo"},{"input":"file:.//p"},{"input":"file:/.//p"},{"input":"https://[0::0::0]","failure":true},{"input":"https://[0:.0]","failure":true},{"input":"https://[0:0:]","failure":true},{"input":"https://[0:1:2:3:4:5:6:7.0.0.0.1]","failure":true},{"input":"https://[0:1.00.0.0.0]","failure":true},{"input":"https://[0:1.290.0.0.0]","failure":true},{"input":"https://[0:1.23.23]","failure":true},{"input":"http://?","failure":true},{"input":"http://#","failure":true},{"input":"sc://ñ"},{"input":"sc://ñ?x"},{"input":"sc://ñ#x"},{"input":"sc://?"},{"input":"sc://#"},{"input":"tftp://foobar.com/someconfig;mode=netascii"},{"input":"telnet://user:pass@foobar.com:23/"},{"input":"ut2004://10.10.10.10:7777/Index.ut2"},{"input":"redis://foo:bar@somehost:6379/0?baz=bam&qux=baz"},{"input":"rsync://foo@host:911/sup"},{"input":"git://github.com/foo/bar.git"},{"input":"irc://myserver.com:6999/channel?passwd"},{"input":"dns://fw.example.org:9999/foo.bar.org?type=TXT"},{"input":"ldap://localhost:389/ou=People,o=JNDITutorial"},{"input":"git+https://github.com/foo/bar"},{"input":"urn:ietf:rfc:2648"},{"input":"tag:joe@example.org,2001:foo/bar"},{"input":"non-spec:/.//"},{"input":"non-spec:/..//"},{"input":"non-spec:/a/..//"},{"input":"non-spec:/.//path"},{"input":"non-spec:/..//path"},{"input":"non-spec:/a/..//path"},{"input":"non-special://%E2%80%A0/"},{"input":"non-special://H%4fSt/path"},{"input":"non-special://[1:2:0:0:5:0:0:0]/"},{"input":"non-special://[1:2:0:0:0:0:0:3]/"},{"input":"non-special://[1:2::3]:80/"},{"input":"non-special://[:80/","failure":true},{"input":"blob:https://example.com:443/"},{"input":"blob:d3958f5c-0777-0845-9dcf-2cb28783acaf"},{"input":"http://0x7f.0.0.0x7g"},{"input":"http://0X7F.0.0.0X7G"},{"input":"http://[::127.0.0.0.1]","failure":true},{"input":"http://[0:1:0:1:0:1:0:1]"},{"input":"http://[1:0:1:0:1:0:1:0]"},{"input":"http://example.org/test?\""},{"input":"http://example.org/test?#"},{"input":"http://example.org/test?<"},{"input":"http://example.org/test?>"},{"input":"http://example.org/test?⌣"},{"input":"http://example.org/test?%23%23"},{"input":"http://example.org/test?%GH"},{"input":"http://example.org/test?a#%EF"},{"input":"http://example.org/test?a#%GH"},{"input":"a","failure":true},{"input":"a/","failure":true},{"input":"a//","failure":true},{"input":"http://example.org/test?a#b\u0000c"},{"input":"non-spec://example.org/test?a#b\u0000c"},{"input":"non-spec:/test?a#b\u0000c"},{"input":"file://a­b/p"},{"input":"file://a%C2%ADb/p"},{"input":"file://­/p","failure":true},{"input":"file://%C2%AD/p","failure":true},{"input":"file://xn--/p","failure":true},{"input":"non-special:cannot-be-a-base-url-\u0000\u0001\u001f\u001e~€"},{"input":"https://www.example.com/path{path.html?query'=query#fragment<fragment"},{"input":"foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/"},{"input":"wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/"},{"input":"foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/"},{"input":"wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/"},{"input":"foo://!\"$%&'()*+,-.;=_`{}~/"},{"input":"wss://!\"$&'()*+,-.;=_`{}~/"},{"input":"foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~"},{"input":"wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~"},{"input":"foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},{"input":"wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},{"input":"foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},{"input":"wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"}]
package/src/test/index.js CHANGED
@@ -2,30 +2,31 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import {
5
- isURL,
6
- isEmail,
7
- getProtocol,
8
- isValidProtocol,
9
- getAuthority,
10
- isValidAuthority,
11
- getPath,
12
- isValidPath,
13
- getQueryString,
5
+ addQueryArgs,
14
6
  buildQueryString,
15
- isValidQueryString,
7
+ cleanForSlug,
8
+ filterURLForDisplay,
9
+ getAuthority,
10
+ getFilename,
16
11
  getFragment,
17
- isValidFragment,
18
- addQueryArgs,
12
+ getPath,
13
+ getProtocol,
19
14
  getQueryArg,
15
+ getQueryArgs,
16
+ getQueryString,
20
17
  hasQueryArg,
21
- removeQueryArgs,
18
+ isEmail,
19
+ isURL,
20
+ isValidAuthority,
21
+ isValidFragment,
22
+ isValidPath,
23
+ isValidProtocol,
24
+ isValidQueryString,
25
+ normalizePath,
22
26
  prependHTTP,
27
+ prependHTTPS,
28
+ removeQueryArgs,
23
29
  safeDecodeURI,
24
- filterURLForDisplay,
25
- cleanForSlug,
26
- getQueryArgs,
27
- getFilename,
28
- normalizePath,
29
30
  } from '../';
30
31
  import wptData from './fixtures/wpt-data';
31
32
 
@@ -890,6 +891,92 @@ describe( 'prependHTTP', () => {
890
891
  } );
891
892
  } );
892
893
 
894
+ describe( 'prependHTTPS', () => {
895
+ it( 'should prepend https to a domain', () => {
896
+ const url = 'wordpress.org';
897
+
898
+ expect( prependHTTPS( url ) ).toBe( 'https://' + url );
899
+ } );
900
+
901
+ it( 'should not prepend https to an email', () => {
902
+ const url = 'foo@wordpress.org';
903
+
904
+ expect( prependHTTPS( url ) ).toBe( url );
905
+ } );
906
+
907
+ it( 'should not prepend https to an absolute URL', () => {
908
+ const url = '/wordpress';
909
+
910
+ expect( prependHTTPS( url ) ).toBe( url );
911
+ } );
912
+
913
+ it( 'should not prepend https to a relative URL', () => {
914
+ const url = './wordpress';
915
+
916
+ expect( prependHTTPS( url ) ).toBe( url );
917
+ } );
918
+
919
+ it( 'should not prepend https to an anchor URL', () => {
920
+ const url = '#wordpress';
921
+
922
+ expect( prependHTTPS( url ) ).toBe( url );
923
+ } );
924
+
925
+ it( 'should not prepend https to a URL that already has https', () => {
926
+ const url = 'https://wordpress.org';
927
+
928
+ expect( prependHTTPS( url ) ).toBe( url );
929
+ } );
930
+
931
+ it( 'should not prepend https to a URL that already has http', () => {
932
+ const url = 'http://wordpress.org';
933
+
934
+ expect( prependHTTPS( url ) ).toBe( url );
935
+ } );
936
+
937
+ it( 'should not prepend https to a URL that already has ftp', () => {
938
+ const url = 'ftp://wordpress.org';
939
+
940
+ expect( prependHTTPS( url ) ).toBe( url );
941
+ } );
942
+
943
+ it( 'should not prepend https to a URL that already has mailto', () => {
944
+ const url = 'mailto:foo@wordpress.org';
945
+
946
+ expect( prependHTTPS( url ) ).toBe( url );
947
+ } );
948
+
949
+ it( 'should remove leading whitespace before prepending HTTPs', () => {
950
+ const url = ' wordpress.org';
951
+
952
+ expect( prependHTTPS( url ) ).toBe( 'https://wordpress.org' );
953
+ } );
954
+
955
+ it( 'should not have trailing whitespaces', () => {
956
+ const url = 'wordpress.org ';
957
+
958
+ expect( prependHTTPS( url ) ).toBe( 'https://wordpress.org' );
959
+ } );
960
+ } );
961
+
962
+ it( 'should prepend https to a domain with an anchor', () => {
963
+ const url = 'wordpress.org#something';
964
+
965
+ expect( prependHTTPS( url ) ).toBe( 'https://' + url );
966
+ } );
967
+
968
+ it( 'should prepend https to a domain with path', () => {
969
+ const url = 'wordpress.org/some/thing';
970
+
971
+ expect( prependHTTPS( url ) ).toBe( 'https://' + url );
972
+ } );
973
+
974
+ it( 'should prepend https to a domain with query arguments', () => {
975
+ const url = 'wordpress.org?foo=bar';
976
+
977
+ expect( prependHTTPS( url ) ).toBe( 'https://' + url );
978
+ } );
979
+
893
980
  describe( 'safeDecodeURI', () => {
894
981
  it( 'should decode URI if formed well', () => {
895
982
  const encoded = 'https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B';
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/safe-decode-uri-component.js","./src/get-query-string.js","./src/get-query-arg.js","./src/get-query-args.js","./src/build-query-string.js","./src/add-query-args.js","../../node_modules/remove-accents/index.d.ts","./src/clean-for-slug.js","./src/filter-url-for-display.js","./src/get-authority.js","./src/get-filename.js","./src/get-fragment.js","./src/is-url.js","./src/is-email.js","./src/get-protocol.js","./src/is-valid-protocol.js","./src/is-valid-authority.js","./src/get-path.js","./src/is-valid-path.js","./src/is-valid-query-string.js","./src/is-valid-fragment.js","./src/has-query-arg.js","./src/remove-query-args.js","./src/prepend-http.js","./src/safe-decode-uri.js","./src/normalize-path.js","./src/index.js","./src/get-path-and-query-string.js"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"7adb044d7fb892c86a142b1ecf264086e6c49593f31c72d1cb88d5541b14c362","3d13e8d35928df6913cc508baea9212eeaf77ac6b8bcdeea6ef81417bd1ab796","93c18f1428bac34102b0df1c2b41dc3d12ce391e03c8a46d38c417479575a20e","b60bd6d8540a5a96a69fdadea70025291e62155d4b7c474a2fa7ff268096732b","7661a5ede28fb0d92e17e5336aba72b46117d6fa195dffe472a7a6c2bb63a882","d6918668a7ce2b5035cfc82a08fad8112030f7215046051d92777dd394428398","f5df6d22ed478b75d910faefcecde790cbc9e2a328ffe22bf6d1c8c3a89c4932","7238d72526e69bba6cd2d016422c8eced80a339b89675720b24f90d935be2434","96f041f6981479953955c224fcfc85fc3d7498b28f76259c62070cdc715d1fab","e17e8f3a2d2b70b82111a7caba0bd0469c15d54b7f5182249c11e86ec91d48c4","3b87fc45c25693533e915e1fedbfd81d1df691590507d34f1c0bfdb1fb8fdb4f","934bb323f6db147579270f1814fefb892cd740b41b3a502f0fc1fdea89c8bbdf","2e53b021189ff0a38763fa8b475e9e52b2f8ad5afb824b1bdd0ac4e75c672915","3573449a7b11478382da67ca0247cd72aa4bd55c3faf16eaac50fc4d6e31a73f","45cf018e474510e7c5d1609f31f26aee0c8313123c667eebe6274a70359ac61b","63f54074d98d3460d320df957eb1a81370309dc146f4e75db5c41af8eaafb6f3","e21699f5f16e21f013325d7c2e3055e51a0ffd3905f70f2c9943146c537740c7","922ea6a76eb75e5fcfc43667fe268bd33ba5febb7906413ee1a6df63495d198f","675f074197cc4af2fec6fdd2d402c4b79796bac84be27abe4a2fdf83f178bdfc","50445b9c70447cc93ebe21e8e84041687b477771bebc3335a437684d25e714fa","af42fd7aa201d45b2366759c7f5ef74df0be5a9175b29ae28eea3823c1726e4c","334aeb1ce0fc76ca31b758e041e232c0554278de6a3d84540822bab39d07b5e6","b4ff7cd115b5f5e1ed08311d65e8e8816c0ec3a71260ed2ddc5bddfc08c59f38","f73f85026d30aaa6d4c348ba9e4458482016ebe29956c99195e6434f8e81f5a4","7854cef32e2726edf5332d119686c31940e6ee63369f6e3fbb6add61a112f51b","362de2254f6b4708bd92561356427e2d4b6ab81a2310a500de2b898875b9b214","ee18fcd416bb49a7f03891a21290308ba54dae7895ab2b9837f29b4ff1d1c59f","5addef1234c8ad001752aa6d2ebb3008a5d2dd98635a82e9df171788b0203996"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[48,49],[51],[71],[48],[45,46,47],[47],[45,46,47,48,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72],[58]],"referencedMap":[[50,1],[52,2],[72,3],[47,4],[48,5],[66,6],[71,7],[68,8],[67,1]],"exportedModulesMap":[[50,1],[52,2],[72,3],[47,4],[48,5],[66,6],[71,7],[68,8],[67,1]],"semanticDiagnosticsPerFile":[51,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,50,49,52,53,54,55,56,72,62,59,47,48,46,66,71,58,57,61,65,63,60,64,70,68,67,45,69]},"version":"4.4.2"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/safe-decode-uri-component.js","./src/get-query-string.js","./src/get-query-arg.js","./src/get-query-args.js","./src/build-query-string.js","./src/add-query-args.js","../../node_modules/remove-accents/index.d.ts","./src/clean-for-slug.js","./src/filter-url-for-display.js","./src/get-authority.js","./src/get-filename.js","./src/get-fragment.js","./src/is-url.js","./src/is-email.js","./src/get-protocol.js","./src/is-valid-protocol.js","./src/is-valid-authority.js","./src/get-path.js","./src/is-valid-path.js","./src/is-valid-query-string.js","./src/is-valid-fragment.js","./src/has-query-arg.js","./src/remove-query-args.js","./src/prepend-http.js","./src/safe-decode-uri.js","./src/normalize-path.js","./src/prepend-https.js","./src/index.js","./src/get-path-and-query-string.js"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"7adb044d7fb892c86a142b1ecf264086e6c49593f31c72d1cb88d5541b14c362","signature":"e68f0a22290ea66539378ff08315a85fd75b778fe0ac69d10fefa1947ec5d6d2"},{"version":"3d13e8d35928df6913cc508baea9212eeaf77ac6b8bcdeea6ef81417bd1ab796","signature":"73f5f1468cf6fa9be4addede3604d134bb76004ceac46b8215b9c8bf17599cbb"},{"version":"93c18f1428bac34102b0df1c2b41dc3d12ce391e03c8a46d38c417479575a20e","signature":"edcf8b0f0aa5e3fad814da17002f1cacd4197c24f1b6e063938ed2d987780adf"},{"version":"b60bd6d8540a5a96a69fdadea70025291e62155d4b7c474a2fa7ff268096732b","signature":"d88e5a64daf6a44e94206bed8f5ef6095ae783f99db744c44b67a93b3fbc22fd"},{"version":"7661a5ede28fb0d92e17e5336aba72b46117d6fa195dffe472a7a6c2bb63a882","signature":"a2c68bf95abbcdb88e32ebf9088307217c98c2aa66b5bd8efe879602bea33b1d"},{"version":"d6918668a7ce2b5035cfc82a08fad8112030f7215046051d92777dd394428398","signature":"7850ed91ff0c4506cf854737fea035dfc8069c44355355e737b640620ae572dc"},"f5df6d22ed478b75d910faefcecde790cbc9e2a328ffe22bf6d1c8c3a89c4932",{"version":"7238d72526e69bba6cd2d016422c8eced80a339b89675720b24f90d935be2434","signature":"5274dd1c7c251133eaf67d2caa7dd856fa5239908c7c0b61ac4d472f8e4539de"},{"version":"96f041f6981479953955c224fcfc85fc3d7498b28f76259c62070cdc715d1fab","signature":"fc739ba246e64fa62e2549c1085c718488e988909511f6697118d80469ea5e63"},{"version":"e17e8f3a2d2b70b82111a7caba0bd0469c15d54b7f5182249c11e86ec91d48c4","signature":"eae2672d9233cff7dddcf8fb9a7442ba79b1a9216cc087ace0d9137a501bbf8a"},{"version":"3b87fc45c25693533e915e1fedbfd81d1df691590507d34f1c0bfdb1fb8fdb4f","signature":"b3ab3d7638e24e13193b390b06e20341de0f17794a9da53c867d428deef0e10d"},{"version":"934bb323f6db147579270f1814fefb892cd740b41b3a502f0fc1fdea89c8bbdf","signature":"6f7383250ac7b41864893198e9bad95a44c2348b9edede578bfabb3203841263"},{"version":"2e53b021189ff0a38763fa8b475e9e52b2f8ad5afb824b1bdd0ac4e75c672915","signature":"e8bbe21ff748a993920eee2a1cd315c5fa650e4b0fa8e62c8740ee47ac39d313"},{"version":"3573449a7b11478382da67ca0247cd72aa4bd55c3faf16eaac50fc4d6e31a73f","signature":"dd39ce0fe1d8f53f79a85ab0fcc4b031a8a3fe98ad30ba655875d93ca8e9d6a6"},{"version":"45cf018e474510e7c5d1609f31f26aee0c8313123c667eebe6274a70359ac61b","signature":"d99fafce42f167cb2d8d0c8e66078ae98d16a044cf78b09777ff55b3ef5f80f4"},{"version":"63f54074d98d3460d320df957eb1a81370309dc146f4e75db5c41af8eaafb6f3","signature":"c5eabd668e2a6c46cf51519448b9dee0370060b36843c9edb52d9517ca2378db"},{"version":"e21699f5f16e21f013325d7c2e3055e51a0ffd3905f70f2c9943146c537740c7","signature":"03d71ae680636aa8dcc0bc393f55f62a2fc2d486ef065f065909c760f839493a"},{"version":"922ea6a76eb75e5fcfc43667fe268bd33ba5febb7906413ee1a6df63495d198f","signature":"83a75790507bc4ac1a68af99745f96a0cb1ce89203cd48daad303e95fab23103"},{"version":"675f074197cc4af2fec6fdd2d402c4b79796bac84be27abe4a2fdf83f178bdfc","signature":"516411af2792238aeb02d8dd077cbf9bbdaa261dd87ef34fd3781b6734f1096d"},{"version":"50445b9c70447cc93ebe21e8e84041687b477771bebc3335a437684d25e714fa","signature":"1cf19b11895b447100eea30892c4c7186c084692f76ba58e8ae18ef81791f91a"},{"version":"af42fd7aa201d45b2366759c7f5ef74df0be5a9175b29ae28eea3823c1726e4c","signature":"f283a335488feb8ab9770f535ddd2f504228cf8ae5ea601c9cf5f418080d61dc"},{"version":"334aeb1ce0fc76ca31b758e041e232c0554278de6a3d84540822bab39d07b5e6","signature":"4045e2a71f2e2b600c9e3ec3b11191c7010e85594a543632dd044f3a4aadfefd"},{"version":"b4ff7cd115b5f5e1ed08311d65e8e8816c0ec3a71260ed2ddc5bddfc08c59f38","signature":"f402aa9d7f85f20f72da9356d7e02476258bcdeb2aa72d9959f542b59a4e0491"},{"version":"f73f85026d30aaa6d4c348ba9e4458482016ebe29956c99195e6434f8e81f5a4","signature":"d263ba9ce4a38ffa22361dd7d213af653f69d0962c833cfb6612a69f664ce59b"},{"version":"7854cef32e2726edf5332d119686c31940e6ee63369f6e3fbb6add61a112f51b","signature":"ace6d6fe1c8df74a13ce7ddb5af7f0e7ee6ac1781ccbdc6b0e5d68aa68180d10"},{"version":"362de2254f6b4708bd92561356427e2d4b6ab81a2310a500de2b898875b9b214","signature":"bd7d8d3e83988c4a12046a5c4189094eccd869c1e4da54d6adf346df6266fa4d"},{"version":"31f78288b8d0c85db211d4322b4a69f55222f1c83ae9f70acb69c983774532ea","signature":"b96dcb17ffca43039ad48fd8ce35959cc13503dce9abe371322e533b65150313"},{"version":"3c112b287d0357433c6b19a9866f3abbd9f77863e19311923dc99ea5d913550e","signature":"8a13edfe33d9bfa6468b5c0475fa05d8ec302203535afdc66395690badf4d1b3"},{"version":"5addef1234c8ad001752aa6d2ebb3008a5d2dd98635a82e9df171788b0203996","signature":"12c71d91ff0a42607b7f0c82b3181abb595052548cbd88cdb52079c9c102fd66"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[59,60],[62],[83],[59],[56,57,58],[58],[56,57,58,59,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,84],[69],[79]],"referencedMap":[[61,1],[63,2],[84,3],[58,4],[59,5],[77,6],[83,7],[79,8],[82,9],[78,1]],"exportedModulesMap":[[59,6]],"semanticDiagnosticsPerFile":[62,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,61,60,63,64,65,66,67,84,73,70,58,59,57,77,83,69,68,72,76,74,71,75,81,79,82,78,56,80],"latestChangedDtsFile":"./build-types/get-path-and-query-string.d.ts"},"version":"4.9.5"}