@wordpress/url 4.43.0 → 4.43.1-next.v.202604091042.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/build/get-filename.cjs +1 -1
- package/build/get-filename.cjs.map +2 -2
- package/build/get-query-string.cjs +1 -1
- package/build/get-query-string.cjs.map +2 -2
- package/build/safe-decode-uri-component.cjs +1 -1
- package/build/safe-decode-uri-component.cjs.map +2 -2
- package/build/safe-decode-uri.cjs +1 -1
- package/build/safe-decode-uri.cjs.map +2 -2
- package/build-module/get-filename.mjs +1 -1
- package/build-module/get-filename.mjs.map +2 -2
- package/build-module/get-query-string.mjs +1 -1
- package/build-module/get-query-string.mjs.map +2 -2
- package/build-module/safe-decode-uri-component.mjs +1 -1
- package/build-module/safe-decode-uri-component.mjs.map +2 -2
- package/build-module/safe-decode-uri.mjs +1 -1
- package/build-module/safe-decode-uri.mjs.map +2 -2
- package/package.json +2 -2
- package/src/get-filename.ts +1 -1
- package/src/get-query-string.ts +1 -1
- package/src/safe-decode-uri-component.ts +1 -1
- package/src/safe-decode-uri.ts +1 -1
package/build/get-filename.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/get-filename.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns the filename part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg'\n * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png'\n * ```\n *\n * @return The filename part of the URL.\n */\nexport function getFilename( url: string ): string | void {\n\tlet filename;\n\n\tif ( ! url ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tfilename = new URL( url, 'http://example.com' ).pathname\n\t\t\t.split( '/' )\n\t\t\t.pop();\n\t} catch
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,YAAa,KAA6B;AACzD,MAAI;AAEJ,MAAK,CAAE,KAAM;AACZ;AAAA,EACD;AAEA,MAAI;AACH,eAAW,IAAI,IAAK,KAAK,oBAAqB,EAAE,SAC9C,MAAO,GAAI,EACX,IAAI;AAAA,EACP,
|
|
4
|
+
"sourcesContent": ["/**\n * Returns the filename part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg'\n * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png'\n * ```\n *\n * @return The filename part of the URL.\n */\nexport function getFilename( url: string ): string | void {\n\tlet filename;\n\n\tif ( ! url ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tfilename = new URL( url, 'http://example.com' ).pathname\n\t\t\t.split( '/' )\n\t\t\t.pop();\n\t} catch {}\n\n\tif ( filename ) {\n\t\treturn filename;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,YAAa,KAA6B;AACzD,MAAI;AAEJ,MAAK,CAAE,KAAM;AACZ;AAAA,EACD;AAEA,MAAI;AACH,eAAW,IAAI,IAAK,KAAK,oBAAqB,EAAE,SAC9C,MAAO,GAAI,EACX,IAAI;AAAA,EACP,QAAQ;AAAA,EAAC;AAET,MAAK,UAAW;AACf,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/get-query-string.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns the query string part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'\n * ```\n *\n * @return The query string part of the URL.\n */\nexport function getQueryString( url: string ): string | void {\n\tlet query;\n\ttry {\n\t\tquery = new URL( url, 'http://example.com' ).search.substring( 1 );\n\t} catch
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,eAAgB,KAA6B;AAC5D,MAAI;AACJ,MAAI;AACH,YAAQ,IAAI,IAAK,KAAK,oBAAqB,EAAE,OAAO,UAAW,CAAE;AAAA,EAClE,
|
|
4
|
+
"sourcesContent": ["/**\n * Returns the query string part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'\n * ```\n *\n * @return The query string part of the URL.\n */\nexport function getQueryString( url: string ): string | void {\n\tlet query;\n\ttry {\n\t\tquery = new URL( url, 'http://example.com' ).search.substring( 1 );\n\t} catch {}\n\n\tif ( query ) {\n\t\treturn query;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,eAAgB,KAA6B;AAC5D,MAAI;AACJ,MAAI;AACH,YAAQ,IAAI,IAAK,KAAK,oBAAqB,EAAE,OAAO,UAAW,CAAE;AAAA,EAClE,QAAQ;AAAA,EAAC;AAET,MAAK,OAAQ;AACZ,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/safe-decode-uri-component.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if\n * `decodeURIComponent` throws an error.\n *\n * @param uriComponent URI component to decode.\n *\n * @return Decoded URI component if possible.\n */\nexport function safeDecodeURIComponent( uriComponent: string ): string {\n\ttry {\n\t\treturn decodeURIComponent( uriComponent );\n\t} catch
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,uBAAwB,cAA+B;AACtE,MAAI;AACH,WAAO,mBAAoB,YAAa;AAAA,EACzC,
|
|
4
|
+
"sourcesContent": ["/**\n * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if\n * `decodeURIComponent` throws an error.\n *\n * @param uriComponent URI component to decode.\n *\n * @return Decoded URI component if possible.\n */\nexport function safeDecodeURIComponent( uriComponent: string ): string {\n\ttry {\n\t\treturn decodeURIComponent( uriComponent );\n\t} catch {\n\t\treturn uriComponent;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,uBAAwB,cAA+B;AACtE,MAAI;AACH,WAAO,mBAAoB,YAAa;AAAA,EACzC,QAAQ;AACP,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/safe-decode-uri.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if\n * `decodeURI` throws an error.\n *\n * @param uri URI to decode.\n *\n * @example\n * ```js\n * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'\n * ```\n *\n * @return Decoded URI if possible.\n */\nexport function safeDecodeURI( uri: string ): string {\n\ttry {\n\t\treturn decodeURI( uri );\n\t} catch
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,cAAe,KAAsB;AACpD,MAAI;AACH,WAAO,UAAW,GAAI;AAAA,EACvB,
|
|
4
|
+
"sourcesContent": ["/**\n * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if\n * `decodeURI` throws an error.\n *\n * @param uri URI to decode.\n *\n * @example\n * ```js\n * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'\n * ```\n *\n * @return Decoded URI if possible.\n */\nexport function safeDecodeURI( uri: string ): string {\n\ttry {\n\t\treturn decodeURI( uri );\n\t} catch {\n\t\treturn uri;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,cAAe,KAAsB;AACpD,MAAI;AACH,WAAO,UAAW,GAAI;AAAA,EACvB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/get-filename.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns the filename part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg'\n * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png'\n * ```\n *\n * @return The filename part of the URL.\n */\nexport function getFilename( url: string ): string | void {\n\tlet filename;\n\n\tif ( ! url ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tfilename = new URL( url, 'http://example.com' ).pathname\n\t\t\t.split( '/' )\n\t\t\t.pop();\n\t} catch
|
|
5
|
-
"mappings": ";AAaO,SAAS,YAAa,KAA6B;AACzD,MAAI;AAEJ,MAAK,CAAE,KAAM;AACZ;AAAA,EACD;AAEA,MAAI;AACH,eAAW,IAAI,IAAK,KAAK,oBAAqB,EAAE,SAC9C,MAAO,GAAI,EACX,IAAI;AAAA,EACP,
|
|
4
|
+
"sourcesContent": ["/**\n * Returns the filename part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg'\n * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png'\n * ```\n *\n * @return The filename part of the URL.\n */\nexport function getFilename( url: string ): string | void {\n\tlet filename;\n\n\tif ( ! url ) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tfilename = new URL( url, 'http://example.com' ).pathname\n\t\t\t.split( '/' )\n\t\t\t.pop();\n\t} catch {}\n\n\tif ( filename ) {\n\t\treturn filename;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";AAaO,SAAS,YAAa,KAA6B;AACzD,MAAI;AAEJ,MAAK,CAAE,KAAM;AACZ;AAAA,EACD;AAEA,MAAI;AACH,eAAW,IAAI,IAAK,KAAK,oBAAqB,EAAE,SAC9C,MAAO,GAAI,EACX,IAAI;AAAA,EACP,QAAQ;AAAA,EAAC;AAET,MAAK,UAAW;AACf,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/get-query-string.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns the query string part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'\n * ```\n *\n * @return The query string part of the URL.\n */\nexport function getQueryString( url: string ): string | void {\n\tlet query;\n\ttry {\n\t\tquery = new URL( url, 'http://example.com' ).search.substring( 1 );\n\t} catch
|
|
5
|
-
"mappings": ";AAYO,SAAS,eAAgB,KAA6B;AAC5D,MAAI;AACJ,MAAI;AACH,YAAQ,IAAI,IAAK,KAAK,oBAAqB,EAAE,OAAO,UAAW,CAAE;AAAA,EAClE,
|
|
4
|
+
"sourcesContent": ["/**\n * Returns the query string part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'\n * ```\n *\n * @return The query string part of the URL.\n */\nexport function getQueryString( url: string ): string | void {\n\tlet query;\n\ttry {\n\t\tquery = new URL( url, 'http://example.com' ).search.substring( 1 );\n\t} catch {}\n\n\tif ( query ) {\n\t\treturn query;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";AAYO,SAAS,eAAgB,KAA6B;AAC5D,MAAI;AACJ,MAAI;AACH,YAAQ,IAAI,IAAK,KAAK,oBAAqB,EAAE,OAAO,UAAW,CAAE;AAAA,EAClE,QAAQ;AAAA,EAAC;AAET,MAAK,OAAQ;AACZ,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/safe-decode-uri-component.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if\n * `decodeURIComponent` throws an error.\n *\n * @param uriComponent URI component to decode.\n *\n * @return Decoded URI component if possible.\n */\nexport function safeDecodeURIComponent( uriComponent: string ): string {\n\ttry {\n\t\treturn decodeURIComponent( uriComponent );\n\t} catch
|
|
5
|
-
"mappings": ";AAQO,SAAS,uBAAwB,cAA+B;AACtE,MAAI;AACH,WAAO,mBAAoB,YAAa;AAAA,EACzC,
|
|
4
|
+
"sourcesContent": ["/**\n * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if\n * `decodeURIComponent` throws an error.\n *\n * @param uriComponent URI component to decode.\n *\n * @return Decoded URI component if possible.\n */\nexport function safeDecodeURIComponent( uriComponent: string ): string {\n\ttry {\n\t\treturn decodeURIComponent( uriComponent );\n\t} catch {\n\t\treturn uriComponent;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";AAQO,SAAS,uBAAwB,cAA+B;AACtE,MAAI;AACH,WAAO,mBAAoB,YAAa;AAAA,EACzC,QAAQ;AACP,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/safe-decode-uri.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if\n * `decodeURI` throws an error.\n *\n * @param uri URI to decode.\n *\n * @example\n * ```js\n * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'\n * ```\n *\n * @return Decoded URI if possible.\n */\nexport function safeDecodeURI( uri: string ): string {\n\ttry {\n\t\treturn decodeURI( uri );\n\t} catch
|
|
5
|
-
"mappings": ";AAaO,SAAS,cAAe,KAAsB;AACpD,MAAI;AACH,WAAO,UAAW,GAAI;AAAA,EACvB,
|
|
4
|
+
"sourcesContent": ["/**\n * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if\n * `decodeURI` throws an error.\n *\n * @param uri URI to decode.\n *\n * @example\n * ```js\n * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'\n * ```\n *\n * @return Decoded URI if possible.\n */\nexport function safeDecodeURI( uri: string ): string {\n\ttry {\n\t\treturn decodeURI( uri );\n\t} catch {\n\t\treturn uri;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";AAaO,SAAS,cAAe,KAAsB;AACpD,MAAI;AACH,WAAO,UAAW,GAAI;AAAA,EACvB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/url",
|
|
3
|
-
"version": "4.43.0",
|
|
3
|
+
"version": "4.43.1-next.v.202604091042.0+668146787",
|
|
4
4
|
"description": "WordPress URL utilities.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "73606df74f1c38a084bfa5db97205259ef817593"
|
|
53
53
|
}
|
package/src/get-filename.ts
CHANGED
package/src/get-query-string.ts
CHANGED