extra-request 4.1.0 → 4.1.1
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/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +2 -9
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +2 -9
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +2 -9
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +2 -9
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/transformers/append-pathname.d.ts +1 -1
- package/lib/es2015/transformers/append-pathname.js +2 -9
- package/lib/es2015/transformers/append-pathname.js.map +1 -1
- package/lib/es2018/transformers/append-pathname.d.ts +1 -1
- package/lib/es2018/transformers/append-pathname.js +2 -9
- package/lib/es2018/transformers/append-pathname.js.map +1 -1
- package/package.json +1 -1
package/dist/es2018/index.umd.js
CHANGED
|
@@ -3942,18 +3942,11 @@
|
|
|
3942
3942
|
function appendPathname(pathname) {
|
|
3943
3943
|
return (options) => {
|
|
3944
3944
|
const base = es2018$c.go(() => {
|
|
3945
|
-
const directoryPathname = es2018$c.go(() => {
|
|
3946
|
-
let pathname = options.url.pathname;
|
|
3947
|
-
if (!options.url.pathname.endsWith('/')) {
|
|
3948
|
-
pathname += '/';
|
|
3949
|
-
}
|
|
3950
|
-
return pathname;
|
|
3951
|
-
});
|
|
3952
3945
|
const url = new URL(options.url.href);
|
|
3953
|
-
url.pathname =
|
|
3946
|
+
url.pathname = url.pathname.endsWith('/') ? url.pathname : `${url.pathname}/`;
|
|
3954
3947
|
return url;
|
|
3955
3948
|
});
|
|
3956
|
-
const url = new URL(pathname, base);
|
|
3949
|
+
const url = new URL(pathname.replace(/^\/*/, ''), base);
|
|
3957
3950
|
return {
|
|
3958
3951
|
...options,
|
|
3959
3952
|
url
|