@wordpress/url 3.4.1-next.f435e9e01b.0 → 3.5.0-next.e230fbab09.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.
@@ -32,6 +32,6 @@ function cleanForSlug(string) {
32
32
  return '';
33
33
  }
34
34
 
35
- return (0, _lodash.trim)((0, _lodash.deburr)(string).replace(/[\s\./]+/g, '-').replace(/[^\w-]+/g, '').toLowerCase(), '-');
35
+ return (0, _lodash.trim)((0, _lodash.deburr)(string).replace(/[\s\./]+/g, '-').replace(/[^\p{L}\p{N}_-]+/gu, '').toLowerCase(), '-');
36
36
  }
37
37
  //# sourceMappingURL=clean-for-slug.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/url/src/clean-for-slug.js"],"names":["cleanForSlug","string","replace","toLowerCase"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAT,CAAuBC,MAAvB,EAAgC;AACtC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAO,EAAP;AACA;;AACD,SAAO,kBACN,oBAAQA,MAAR,EACEC,OADF,CACW,WADX,EACwB,GADxB,EAEEA,OAFF,CAEW,UAFX,EAEuB,EAFvB,EAGEC,WAHF,EADM,EAKN,GALM,CAAP;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport { deburr, trim } from 'lodash';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug.\n *\n * This replicates some of what `sanitize_title()` does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin\n * letters. Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens. Converts remaining string to lowercase. It does not account\n * for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed.\n *\n * @return {string} Processed string.\n */\nexport function cleanForSlug( string ) {\n\tif ( ! string ) {\n\t\treturn '';\n\t}\n\treturn trim(\n\t\tdeburr( string )\n\t\t\t.replace( /[\\s\\./]+/g, '-' )\n\t\t\t.replace( /[^\\w-]+/g, '' )\n\t\t\t.toLowerCase(),\n\t\t'-'\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/url/src/clean-for-slug.js"],"names":["cleanForSlug","string","replace","toLowerCase"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAT,CAAuBC,MAAvB,EAAgC;AACtC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAO,EAAP;AACA;;AACD,SAAO,kBACN,oBAAQA,MAAR,EACEC,OADF,CACW,WADX,EACwB,GADxB,EAEEA,OAFF,CAEW,oBAFX,EAEiC,EAFjC,EAGEC,WAHF,EADM,EAKN,GALM,CAAP;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport { deburr, trim } from 'lodash';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug.\n *\n * This replicates some of what `sanitize_title()` does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin\n * letters. Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens. Converts remaining string to lowercase. It does not account\n * for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed.\n *\n * @return {string} Processed string.\n */\nexport function cleanForSlug( string ) {\n\tif ( ! string ) {\n\t\treturn '';\n\t}\n\treturn trim(\n\t\tdeburr( string )\n\t\t\t.replace( /[\\s\\./]+/g, '-' )\n\t\t\t.replace( /[^\\p{L}\\p{N}_-]+/gu, '' )\n\t\t\t.toLowerCase(),\n\t\t'-'\n\t);\n}\n"]}
@@ -21,14 +21,16 @@ function normalizePath(path) {
21
21
 
22
22
  if (!query) {
23
23
  return base;
24
- } // 'b=1&c=2&a=5'
24
+ } // 'b=1%2C2&c=2&a=5'
25
25
 
26
26
 
27
- return base + '?' + query // [ 'b=1', 'c=2', 'a=5' ]
28
- .split('&') // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]
29
- .map(entry => entry.split('=')) // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]
30
- .sort((a, b) => a[0].localeCompare(b[0])) // [ 'a=5', 'b=1', 'c=2' ]
31
- .map(pair => pair.join('=')) // 'a=5&b=1&c=2'
27
+ return base + '?' + query // [ 'b=1%2C2', 'c=2', 'a=5' ]
28
+ .split('&') // [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]
29
+ .map(entry => entry.split('=')) // [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]
30
+ .map(pair => pair.map(decodeURIComponent)) // [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]
31
+ .sort((a, b) => a[0].localeCompare(b[0])) // [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]
32
+ .map(pair => pair.map(encodeURIComponent)) // [ 'a=5', 'b=1%2C2', 'c=2' ]
33
+ .map(pair => pair.join('=')) // 'a=5&b=1%2C2&c=2'
32
34
  .join('&');
33
35
  }
34
36
  //# sourceMappingURL=normalize-path.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/url/src/normalize-path.js"],"names":["normalizePath","path","splitted","split","query","base","map","entry","sort","a","b","localeCompare","pair","join"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAT,CAAwBC,IAAxB,EAA+B;AACrC,QAAMC,QAAQ,GAAGD,IAAI,CAACE,KAAL,CAAY,GAAZ,CAAjB;AACA,QAAMC,KAAK,GAAGF,QAAQ,CAAE,CAAF,CAAtB;AACA,QAAMG,IAAI,GAAGH,QAAQ,CAAE,CAAF,CAArB;;AACA,MAAK,CAAEE,KAAP,EAAe;AACd,WAAOC,IAAP;AACA,GANoC,CAQrC;;;AACA,SACCA,IAAI,GACJ,GADA,GAEAD,KAAK,CACJ;AADI,GAEHD,KAFF,CAES,GAFT,EAGC;AAHD,GAIEG,GAJF,CAISC,KAAF,IAAaA,KAAK,CAACJ,KAAN,CAAa,GAAb,CAJpB,EAKC;AALD,GAMEK,IANF,CAMQ,CAAEC,CAAF,EAAKC,CAAL,KAAYD,CAAC,CAAE,CAAF,CAAD,CAAOE,aAAP,CAAsBD,CAAC,CAAE,CAAF,CAAvB,CANpB,EAOC;AAPD,GAQEJ,GARF,CAQSM,IAAF,IAAYA,IAAI,CAACC,IAAL,CAAW,GAAX,CARnB,EASC;AATD,GAUEA,IAVF,CAUQ,GAVR,CAHD;AAeA","sourcesContent":["/**\n * Given a path, returns a normalized path where equal query parameter values\n * will be treated as identical, regardless of order they appear in the original\n * text.\n *\n * @param {string} path Original path.\n *\n * @return {string} Normalized path.\n */\nexport function normalizePath( path ) {\n\tconst splitted = path.split( '?' );\n\tconst query = splitted[ 1 ];\n\tconst base = splitted[ 0 ];\n\tif ( ! query ) {\n\t\treturn base;\n\t}\n\n\t// 'b=1&c=2&a=5'\n\treturn (\n\t\tbase +\n\t\t'?' +\n\t\tquery\n\t\t\t// [ 'b=1', 'c=2', 'a=5' ]\n\t\t\t.split( '&' )\n\t\t\t// [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( ( entry ) => entry.split( '=' ) )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]\n\t\t\t.sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) )\n\t\t\t// [ 'a=5', 'b=1', 'c=2' ]\n\t\t\t.map( ( pair ) => pair.join( '=' ) )\n\t\t\t// 'a=5&b=1&c=2'\n\t\t\t.join( '&' )\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/url/src/normalize-path.js"],"names":["normalizePath","path","splitted","split","query","base","map","entry","pair","decodeURIComponent","sort","a","b","localeCompare","encodeURIComponent","join"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAT,CAAwBC,IAAxB,EAA+B;AACrC,QAAMC,QAAQ,GAAGD,IAAI,CAACE,KAAL,CAAY,GAAZ,CAAjB;AACA,QAAMC,KAAK,GAAGF,QAAQ,CAAE,CAAF,CAAtB;AACA,QAAMG,IAAI,GAAGH,QAAQ,CAAE,CAAF,CAArB;;AACA,MAAK,CAAEE,KAAP,EAAe;AACd,WAAOC,IAAP;AACA,GANoC,CAQrC;;;AACA,SACCA,IAAI,GACJ,GADA,GAEAD,KAAK,CACJ;AADI,GAEHD,KAFF,CAES,GAFT,EAGC;AAHD,GAIEG,GAJF,CAISC,KAAF,IAAaA,KAAK,CAACJ,KAAN,CAAa,GAAb,CAJpB,EAKC;AALD,GAMEG,GANF,CAMSE,IAAF,IAAYA,IAAI,CAACF,GAAL,CAAUG,kBAAV,CANnB,EAOC;AAPD,GAQEC,IARF,CAQQ,CAAEC,CAAF,EAAKC,CAAL,KAAYD,CAAC,CAAE,CAAF,CAAD,CAAOE,aAAP,CAAsBD,CAAC,CAAE,CAAF,CAAvB,CARpB,EASC;AATD,GAUEN,GAVF,CAUSE,IAAF,IAAYA,IAAI,CAACF,GAAL,CAAUQ,kBAAV,CAVnB,EAWC;AAXD,GAYER,GAZF,CAYSE,IAAF,IAAYA,IAAI,CAACO,IAAL,CAAW,GAAX,CAZnB,EAaC;AAbD,GAcEA,IAdF,CAcQ,GAdR,CAHD;AAmBA","sourcesContent":["/**\n * Given a path, returns a normalized path where equal query parameter values\n * will be treated as identical, regardless of order they appear in the original\n * text.\n *\n * @param {string} path Original path.\n *\n * @return {string} Normalized path.\n */\nexport function normalizePath( path ) {\n\tconst splitted = path.split( '?' );\n\tconst query = splitted[ 1 ];\n\tconst base = splitted[ 0 ];\n\tif ( ! query ) {\n\t\treturn base;\n\t}\n\n\t// 'b=1%2C2&c=2&a=5'\n\treturn (\n\t\tbase +\n\t\t'?' +\n\t\tquery\n\t\t\t// [ 'b=1%2C2', 'c=2', 'a=5' ]\n\t\t\t.split( '&' )\n\t\t\t// [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( ( entry ) => entry.split( '=' ) )\n\t\t\t// [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( ( pair ) => pair.map( decodeURIComponent ) )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]\n\t\t\t.sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]\n\t\t\t.map( ( pair ) => pair.map( encodeURIComponent ) )\n\t\t\t// [ 'a=5', 'b=1%2C2', 'c=2' ]\n\t\t\t.map( ( pair ) => pair.join( '=' ) )\n\t\t\t// 'a=5&b=1%2C2&c=2'\n\t\t\t.join( '&' )\n\t);\n}\n"]}
@@ -24,6 +24,6 @@ export function cleanForSlug(string) {
24
24
  return '';
25
25
  }
26
26
 
27
- return trim(deburr(string).replace(/[\s\./]+/g, '-').replace(/[^\w-]+/g, '').toLowerCase(), '-');
27
+ return trim(deburr(string).replace(/[\s\./]+/g, '-').replace(/[^\p{L}\p{N}_-]+/gu, '').toLowerCase(), '-');
28
28
  }
29
29
  //# sourceMappingURL=clean-for-slug.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/url/src/clean-for-slug.js"],"names":["deburr","trim","cleanForSlug","string","replace","toLowerCase"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAT,EAAiBC,IAAjB,QAA6B,QAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,MAAvB,EAAgC;AACtC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAO,EAAP;AACA;;AACD,SAAOF,IAAI,CACVD,MAAM,CAAEG,MAAF,CAAN,CACEC,OADF,CACW,WADX,EACwB,GADxB,EAEEA,OAFF,CAEW,UAFX,EAEuB,EAFvB,EAGEC,WAHF,EADU,EAKV,GALU,CAAX;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport { deburr, trim } from 'lodash';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug.\n *\n * This replicates some of what `sanitize_title()` does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin\n * letters. Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens. Converts remaining string to lowercase. It does not account\n * for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed.\n *\n * @return {string} Processed string.\n */\nexport function cleanForSlug( string ) {\n\tif ( ! string ) {\n\t\treturn '';\n\t}\n\treturn trim(\n\t\tdeburr( string )\n\t\t\t.replace( /[\\s\\./]+/g, '-' )\n\t\t\t.replace( /[^\\w-]+/g, '' )\n\t\t\t.toLowerCase(),\n\t\t'-'\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/url/src/clean-for-slug.js"],"names":["deburr","trim","cleanForSlug","string","replace","toLowerCase"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAT,EAAiBC,IAAjB,QAA6B,QAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,MAAvB,EAAgC;AACtC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAO,EAAP;AACA;;AACD,SAAOF,IAAI,CACVD,MAAM,CAAEG,MAAF,CAAN,CACEC,OADF,CACW,WADX,EACwB,GADxB,EAEEA,OAFF,CAEW,oBAFX,EAEiC,EAFjC,EAGEC,WAHF,EADU,EAKV,GALU,CAAX;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport { deburr, trim } from 'lodash';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug.\n *\n * This replicates some of what `sanitize_title()` does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin\n * letters. Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens. Converts remaining string to lowercase. It does not account\n * for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed.\n *\n * @return {string} Processed string.\n */\nexport function cleanForSlug( string ) {\n\tif ( ! string ) {\n\t\treturn '';\n\t}\n\treturn trim(\n\t\tdeburr( string )\n\t\t\t.replace( /[\\s\\./]+/g, '-' )\n\t\t\t.replace( /[^\\p{L}\\p{N}_-]+/gu, '' )\n\t\t\t.toLowerCase(),\n\t\t'-'\n\t);\n}\n"]}
@@ -14,14 +14,16 @@ export function normalizePath(path) {
14
14
 
15
15
  if (!query) {
16
16
  return base;
17
- } // 'b=1&c=2&a=5'
17
+ } // 'b=1%2C2&c=2&a=5'
18
18
 
19
19
 
20
- return base + '?' + query // [ 'b=1', 'c=2', 'a=5' ]
21
- .split('&') // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]
22
- .map(entry => entry.split('=')) // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]
23
- .sort((a, b) => a[0].localeCompare(b[0])) // [ 'a=5', 'b=1', 'c=2' ]
24
- .map(pair => pair.join('=')) // 'a=5&b=1&c=2'
20
+ return base + '?' + query // [ 'b=1%2C2', 'c=2', 'a=5' ]
21
+ .split('&') // [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]
22
+ .map(entry => entry.split('=')) // [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]
23
+ .map(pair => pair.map(decodeURIComponent)) // [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]
24
+ .sort((a, b) => a[0].localeCompare(b[0])) // [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]
25
+ .map(pair => pair.map(encodeURIComponent)) // [ 'a=5', 'b=1%2C2', 'c=2' ]
26
+ .map(pair => pair.join('=')) // 'a=5&b=1%2C2&c=2'
25
27
  .join('&');
26
28
  }
27
29
  //# sourceMappingURL=normalize-path.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/url/src/normalize-path.js"],"names":["normalizePath","path","splitted","split","query","base","map","entry","sort","a","b","localeCompare","pair","join"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,aAAT,CAAwBC,IAAxB,EAA+B;AACrC,QAAMC,QAAQ,GAAGD,IAAI,CAACE,KAAL,CAAY,GAAZ,CAAjB;AACA,QAAMC,KAAK,GAAGF,QAAQ,CAAE,CAAF,CAAtB;AACA,QAAMG,IAAI,GAAGH,QAAQ,CAAE,CAAF,CAArB;;AACA,MAAK,CAAEE,KAAP,EAAe;AACd,WAAOC,IAAP;AACA,GANoC,CAQrC;;;AACA,SACCA,IAAI,GACJ,GADA,GAEAD,KAAK,CACJ;AADI,GAEHD,KAFF,CAES,GAFT,EAGC;AAHD,GAIEG,GAJF,CAISC,KAAF,IAAaA,KAAK,CAACJ,KAAN,CAAa,GAAb,CAJpB,EAKC;AALD,GAMEK,IANF,CAMQ,CAAEC,CAAF,EAAKC,CAAL,KAAYD,CAAC,CAAE,CAAF,CAAD,CAAOE,aAAP,CAAsBD,CAAC,CAAE,CAAF,CAAvB,CANpB,EAOC;AAPD,GAQEJ,GARF,CAQSM,IAAF,IAAYA,IAAI,CAACC,IAAL,CAAW,GAAX,CARnB,EASC;AATD,GAUEA,IAVF,CAUQ,GAVR,CAHD;AAeA","sourcesContent":["/**\n * Given a path, returns a normalized path where equal query parameter values\n * will be treated as identical, regardless of order they appear in the original\n * text.\n *\n * @param {string} path Original path.\n *\n * @return {string} Normalized path.\n */\nexport function normalizePath( path ) {\n\tconst splitted = path.split( '?' );\n\tconst query = splitted[ 1 ];\n\tconst base = splitted[ 0 ];\n\tif ( ! query ) {\n\t\treturn base;\n\t}\n\n\t// 'b=1&c=2&a=5'\n\treturn (\n\t\tbase +\n\t\t'?' +\n\t\tquery\n\t\t\t// [ 'b=1', 'c=2', 'a=5' ]\n\t\t\t.split( '&' )\n\t\t\t// [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( ( entry ) => entry.split( '=' ) )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]\n\t\t\t.sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) )\n\t\t\t// [ 'a=5', 'b=1', 'c=2' ]\n\t\t\t.map( ( pair ) => pair.join( '=' ) )\n\t\t\t// 'a=5&b=1&c=2'\n\t\t\t.join( '&' )\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/url/src/normalize-path.js"],"names":["normalizePath","path","splitted","split","query","base","map","entry","pair","decodeURIComponent","sort","a","b","localeCompare","encodeURIComponent","join"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,aAAT,CAAwBC,IAAxB,EAA+B;AACrC,QAAMC,QAAQ,GAAGD,IAAI,CAACE,KAAL,CAAY,GAAZ,CAAjB;AACA,QAAMC,KAAK,GAAGF,QAAQ,CAAE,CAAF,CAAtB;AACA,QAAMG,IAAI,GAAGH,QAAQ,CAAE,CAAF,CAArB;;AACA,MAAK,CAAEE,KAAP,EAAe;AACd,WAAOC,IAAP;AACA,GANoC,CAQrC;;;AACA,SACCA,IAAI,GACJ,GADA,GAEAD,KAAK,CACJ;AADI,GAEHD,KAFF,CAES,GAFT,EAGC;AAHD,GAIEG,GAJF,CAISC,KAAF,IAAaA,KAAK,CAACJ,KAAN,CAAa,GAAb,CAJpB,EAKC;AALD,GAMEG,GANF,CAMSE,IAAF,IAAYA,IAAI,CAACF,GAAL,CAAUG,kBAAV,CANnB,EAOC;AAPD,GAQEC,IARF,CAQQ,CAAEC,CAAF,EAAKC,CAAL,KAAYD,CAAC,CAAE,CAAF,CAAD,CAAOE,aAAP,CAAsBD,CAAC,CAAE,CAAF,CAAvB,CARpB,EASC;AATD,GAUEN,GAVF,CAUSE,IAAF,IAAYA,IAAI,CAACF,GAAL,CAAUQ,kBAAV,CAVnB,EAWC;AAXD,GAYER,GAZF,CAYSE,IAAF,IAAYA,IAAI,CAACO,IAAL,CAAW,GAAX,CAZnB,EAaC;AAbD,GAcEA,IAdF,CAcQ,GAdR,CAHD;AAmBA","sourcesContent":["/**\n * Given a path, returns a normalized path where equal query parameter values\n * will be treated as identical, regardless of order they appear in the original\n * text.\n *\n * @param {string} path Original path.\n *\n * @return {string} Normalized path.\n */\nexport function normalizePath( path ) {\n\tconst splitted = path.split( '?' );\n\tconst query = splitted[ 1 ];\n\tconst base = splitted[ 0 ];\n\tif ( ! query ) {\n\t\treturn base;\n\t}\n\n\t// 'b=1%2C2&c=2&a=5'\n\treturn (\n\t\tbase +\n\t\t'?' +\n\t\tquery\n\t\t\t// [ 'b=1%2C2', 'c=2', 'a=5' ]\n\t\t\t.split( '&' )\n\t\t\t// [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( ( entry ) => entry.split( '=' ) )\n\t\t\t// [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( ( pair ) => pair.map( decodeURIComponent ) )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]\n\t\t\t.sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]\n\t\t\t.map( ( pair ) => pair.map( encodeURIComponent ) )\n\t\t\t// [ 'a=5', 'b=1%2C2', 'c=2' ]\n\t\t\t.map( ( pair ) => pair.join( '=' ) )\n\t\t\t// 'a=5&b=1%2C2&c=2'\n\t\t\t.join( '&' )\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-path.d.ts","sourceRoot":"","sources":["../src/normalize-path.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oCAJW,MAAM,GAEL,MAAM,CA0BjB"}
1
+ {"version":3,"file":"normalize-path.d.ts","sourceRoot":"","sources":["../src/normalize-path.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oCAJW,MAAM,GAEL,MAAM,CA8BjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/url",
3
- "version": "3.4.1-next.f435e9e01b.0",
3
+ "version": "3.5.0-next.e230fbab09.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": "14b2846015dfb1b440ce93accdd03842ebe5f1cd"
36
+ "gitHead": "308df03e6a96ded732f9c4e32471b1b4f8dea54a"
37
37
  }
@@ -26,7 +26,7 @@ export function cleanForSlug( string ) {
26
26
  return trim(
27
27
  deburr( string )
28
28
  .replace( /[\s\./]+/g, '-' )
29
- .replace( /[^\w-]+/g, '' )
29
+ .replace( /[^\p{L}\p{N}_-]+/gu, '' )
30
30
  .toLowerCase(),
31
31
  '-'
32
32
  );
@@ -15,20 +15,24 @@ export function normalizePath( path ) {
15
15
  return base;
16
16
  }
17
17
 
18
- // 'b=1&c=2&a=5'
18
+ // 'b=1%2C2&c=2&a=5'
19
19
  return (
20
20
  base +
21
21
  '?' +
22
22
  query
23
- // [ 'b=1', 'c=2', 'a=5' ]
23
+ // [ 'b=1%2C2', 'c=2', 'a=5' ]
24
24
  .split( '&' )
25
- // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]
25
+ // [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]
26
26
  .map( ( entry ) => entry.split( '=' ) )
27
- // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]
27
+ // [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]
28
+ .map( ( pair ) => pair.map( decodeURIComponent ) )
29
+ // [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]
28
30
  .sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) )
29
- // [ 'a=5', 'b=1', 'c=2' ]
31
+ // [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]
32
+ .map( ( pair ) => pair.map( encodeURIComponent ) )
33
+ // [ 'a=5', 'b=1%2C2', 'c=2' ]
30
34
  .map( ( pair ) => pair.join( '=' ) )
31
- // 'a=5&b=1&c=2'
35
+ // 'a=5&b=1%2C2&c=2'
32
36
  .join( '&' )
33
37
  );
34
38
  }
package/src/test/index.js CHANGED
@@ -974,17 +974,33 @@ describe( 'filterURLForDisplay', () => {
974
974
  } );
975
975
 
976
976
  describe( 'cleanForSlug', () => {
977
- it( 'should return string prepared for use as url slug', () => {
977
+ it( 'Should return string prepared for use as url slug', () => {
978
978
  expect( cleanForSlug( '/Is th@t Déjà_vu? ' ) ).toBe( 'is-tht-deja_vu' );
979
979
  } );
980
980
 
981
- it( 'should return an empty string for missing argument', () => {
981
+ it( 'Should return an empty string for missing argument', () => {
982
982
  expect( cleanForSlug() ).toBe( '' );
983
983
  } );
984
984
 
985
- it( 'should return an empty string for falsy argument', () => {
985
+ it( 'Should return an empty string for falsy argument', () => {
986
986
  expect( cleanForSlug( null ) ).toBe( '' );
987
987
  } );
988
+
989
+ it( 'Should not allow characters used internally in rich-text', () => {
990
+ //The last space is an object replacement character
991
+ expect( cleanForSlug( 'the long cat' ) ).toBe( 'the-long-cat' );
992
+ } );
993
+
994
+ it( 'Creates a slug for languages that use multibyte encodings', () => {
995
+ expect( cleanForSlug( '新荣记 ' ) ).toBe( '新荣记' );
996
+ expect( cleanForSlug( '私のテンプレートパーツのテスト ' ) ).toBe(
997
+ '私のテンプレートパーツのテスト'
998
+ );
999
+ expect( cleanForSlug( 'ქართული ნაწილი' ) ).toBe( 'ქართული-ნაწილი' );
1000
+ expect( cleanForSlug( 'Καλημέρα Κόσμε' ) ).toBe( 'καλημέρα-κόσμε' );
1001
+ expect( cleanForSlug( '안녕하세요 ' ) ).toBe( '안녕하세요' );
1002
+ expect( cleanForSlug( '繁体字 ' ) ).toBe( '繁体字' );
1003
+ } );
988
1004
  } );
989
1005
 
990
1006
  describe( 'normalizePath', () => {
@@ -1008,4 +1024,9 @@ describe( 'normalizePath', () => {
1008
1024
  expect( acb ).toBe( cba );
1009
1025
  expect( cba ).toBe( cab );
1010
1026
  } );
1027
+
1028
+ it( 'sorts urldecoded values and returns property urlencoded query string', () => {
1029
+ const ab = normalizePath( '/foo/bar?a%2Ca=5,5&a,b=1,1' );
1030
+ expect( ab ).toBe( '/foo/bar?a%2Ca=5%2C5&a%2Cb=1%2C1' );
1031
+ } );
1011
1032
  } );
@@ -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/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/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/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/safe-decode-uri-component.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},"3d13e8d35928df6913cc508baea9212eeaf77ac6b8bcdeea6ef81417bd1ab796","93c18f1428bac34102b0df1c2b41dc3d12ce391e03c8a46d38c417479575a20e","c1707eb8fe5c7af9446740e91d599de82da8e8c5a478b20ad19e3a18a0691feb","7661a5ede28fb0d92e17e5336aba72b46117d6fa195dffe472a7a6c2bb63a882","d6918668a7ce2b5035cfc82a08fad8112030f7215046051d92777dd394428398","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"542de8a8716fbaecd313ee04aee251b94f4c4afe615c96ba84d3e138ae33a4df","96f041f6981479953955c224fcfc85fc3d7498b28f76259c62070cdc715d1fab","e17e8f3a2d2b70b82111a7caba0bd0469c15d54b7f5182249c11e86ec91d48c4","3b87fc45c25693533e915e1fedbfd81d1df691590507d34f1c0bfdb1fb8fdb4f","934bb323f6db147579270f1814fefb892cd740b41b3a502f0fc1fdea89c8bbdf","2e53b021189ff0a38763fa8b475e9e52b2f8ad5afb824b1bdd0ac4e75c672915","76c0f81779074a0f71553c9e64b24ed34a0eab70e2baeab19910924103714b29","45cf018e474510e7c5d1609f31f26aee0c8313123c667eebe6274a70359ac61b","63f54074d98d3460d320df957eb1a81370309dc146f4e75db5c41af8eaafb6f3","e21699f5f16e21f013325d7c2e3055e51a0ffd3905f70f2c9943146c537740c7","a3d241b40520c871a2abd8d1efa83a0ce5bada7c2cb8c2d47a0af5d6a01d7950","675f074197cc4af2fec6fdd2d402c4b79796bac84be27abe4a2fdf83f178bdfc","50445b9c70447cc93ebe21e8e84041687b477771bebc3335a437684d25e714fa","af42fd7aa201d45b2366759c7f5ef74df0be5a9175b29ae28eea3823c1726e4c","334aeb1ce0fc76ca31b758e041e232c0554278de6a3d84540822bab39d07b5e6","b4ff7cd115b5f5e1ed08311d65e8e8816c0ec3a71260ed2ddc5bddfc08c59f38","f73f85026d30aaa6d4c348ba9e4458482016ebe29956c99195e6434f8e81f5a4","7854cef32e2726edf5332d119686c31940e6ee63369f6e3fbb6add61a112f51b","7adb044d7fb892c86a142b1ecf264086e6c49593f31c72d1cb88d5541b14c362","e6b09c6c5b1738d2e5e9825e24891fe9805ddc6c1ac68c4318af6038c7ca8e67","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":[[50,52,53,54,55,56,57,58,59,60,61,62],[50,51,53,54,55,56,57,58,59,60,61,62],[51,52,53,54,55,56,57,58,59,60,61,62],[50,51,52,54,55,56,57,58,59,60,61,62],[50,51,52,53,55,56,57,58,59,60,61,62],[50,51,52,53,54,56,57,58,59,60,61,62],[50,51,52,53,54,55,57,58,59,60,61,62],[50,51,52,53,54,55,56,58,59,60,61,62],[50,51,52,53,54,55,56,57,59,60,61,62],[50,51,52,53,54,55,56,57,58,60,61,62],[50,51,52,53,54,55,56,57,58,59,61,62],[50,51,52,53,54,55,56,57,58,59,60,62],[50,51,52,53,54,55,56,57,58,59,60,61],[47,48],[62],[83],[47],[45,46],[46],[45,46,47,48,49,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,84],[69]],"referencedMap":[[51,1],[52,2],[50,3],[53,4],[54,5],[55,6],[56,7],[57,8],[58,9],[59,10],[60,11],[61,12],[62,13],[49,14],[63,15],[84,16],[46,17],[47,18],[77,19],[83,20],[79,21],[78,14]],"exportedModulesMap":[[51,1],[52,2],[50,3],[53,4],[54,5],[55,6],[56,7],[57,8],[58,9],[59,10],[60,11],[61,12],[62,13],[49,14],[63,15],[84,16],[46,17],[47,18],[77,19],[83,20],[79,21],[78,14]],"semanticDiagnosticsPerFile":[51,52,50,53,54,55,56,57,58,59,60,61,62,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,49,48,63,64,65,66,67,84,73,70,46,47,45,77,83,69,68,72,76,74,71,75,82,79,78,81,80]},"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.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/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/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/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/safe-decode-uri-component.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},"3d13e8d35928df6913cc508baea9212eeaf77ac6b8bcdeea6ef81417bd1ab796","93c18f1428bac34102b0df1c2b41dc3d12ce391e03c8a46d38c417479575a20e","c1707eb8fe5c7af9446740e91d599de82da8e8c5a478b20ad19e3a18a0691feb","7661a5ede28fb0d92e17e5336aba72b46117d6fa195dffe472a7a6c2bb63a882","d6918668a7ce2b5035cfc82a08fad8112030f7215046051d92777dd394428398","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"47f14b6c4f6665b10257010ac18115010ee1d8f5e759e9f0949985b06f9ccbba","96f041f6981479953955c224fcfc85fc3d7498b28f76259c62070cdc715d1fab","e17e8f3a2d2b70b82111a7caba0bd0469c15d54b7f5182249c11e86ec91d48c4","3b87fc45c25693533e915e1fedbfd81d1df691590507d34f1c0bfdb1fb8fdb4f","934bb323f6db147579270f1814fefb892cd740b41b3a502f0fc1fdea89c8bbdf","2e53b021189ff0a38763fa8b475e9e52b2f8ad5afb824b1bdd0ac4e75c672915","76c0f81779074a0f71553c9e64b24ed34a0eab70e2baeab19910924103714b29","45cf018e474510e7c5d1609f31f26aee0c8313123c667eebe6274a70359ac61b","63f54074d98d3460d320df957eb1a81370309dc146f4e75db5c41af8eaafb6f3","e21699f5f16e21f013325d7c2e3055e51a0ffd3905f70f2c9943146c537740c7","a3d241b40520c871a2abd8d1efa83a0ce5bada7c2cb8c2d47a0af5d6a01d7950","675f074197cc4af2fec6fdd2d402c4b79796bac84be27abe4a2fdf83f178bdfc","50445b9c70447cc93ebe21e8e84041687b477771bebc3335a437684d25e714fa","af42fd7aa201d45b2366759c7f5ef74df0be5a9175b29ae28eea3823c1726e4c","334aeb1ce0fc76ca31b758e041e232c0554278de6a3d84540822bab39d07b5e6","b4ff7cd115b5f5e1ed08311d65e8e8816c0ec3a71260ed2ddc5bddfc08c59f38","f73f85026d30aaa6d4c348ba9e4458482016ebe29956c99195e6434f8e81f5a4","7854cef32e2726edf5332d119686c31940e6ee63369f6e3fbb6add61a112f51b","7adb044d7fb892c86a142b1ecf264086e6c49593f31c72d1cb88d5541b14c362","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":[[50,52,53,54,55,56,57,58,59,60,61,62],[50,51,53,54,55,56,57,58,59,60,61,62],[51,52,53,54,55,56,57,58,59,60,61,62],[50,51,52,54,55,56,57,58,59,60,61,62],[50,51,52,53,55,56,57,58,59,60,61,62],[50,51,52,53,54,56,57,58,59,60,61,62],[50,51,52,53,54,55,57,58,59,60,61,62],[50,51,52,53,54,55,56,58,59,60,61,62],[50,51,52,53,54,55,56,57,59,60,61,62],[50,51,52,53,54,55,56,57,58,60,61,62],[50,51,52,53,54,55,56,57,58,59,61,62],[50,51,52,53,54,55,56,57,58,59,60,62],[50,51,52,53,54,55,56,57,58,59,60,61],[47,48],[62],[83],[47],[45,46],[46],[45,46,47,48,49,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,84],[69]],"referencedMap":[[51,1],[52,2],[50,3],[53,4],[54,5],[55,6],[56,7],[57,8],[58,9],[59,10],[60,11],[61,12],[62,13],[49,14],[63,15],[84,16],[46,17],[47,18],[77,19],[83,20],[79,21],[78,14]],"exportedModulesMap":[[51,1],[52,2],[50,3],[53,4],[54,5],[55,6],[56,7],[57,8],[58,9],[59,10],[60,11],[61,12],[62,13],[49,14],[63,15],[84,16],[46,17],[47,18],[77,19],[83,20],[79,21],[78,14]],"semanticDiagnosticsPerFile":[51,52,50,53,54,55,56,57,58,59,60,61,62,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,49,48,63,64,65,66,67,84,73,70,46,47,45,77,83,69,68,72,76,74,71,75,82,79,78,81,80]},"version":"4.4.2"}