@uploadcare/upload-client 4.3.1-alpha.0 → 4.3.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.
@@ -33,8 +33,9 @@ const request = ({ method, url, data, headers = {}, signal, onProgress }) => new
33
33
  let aborted = false;
34
34
  /**
35
35
  * Force synchronous flag to be off
36
- * Some users get `InvalidAccessError` error when we set `responseType`
36
+ * Some chrome versions gets `InvalidAccessError` error when we set `responseType`
37
37
  * See https://xhr.spec.whatwg.org/#synchronous-flag
38
+ * and https://bugs.chromium.org/p/chromium/issues/detail?id=1346628
38
39
  */
39
40
  xhr.open(requestMethod, url, true);
40
41
  if (headers) {
@@ -226,7 +227,7 @@ const buildSearchParams = (query) => {
226
227
  };
227
228
  const getUrl = (base, path, query) => {
228
229
  const url = new URL(base);
229
- url.pathname = path;
230
+ url.pathname = (url.pathname + path).replace('//', '/');
230
231
  if (query) {
231
232
  url.search = buildSearchParams(query);
232
233
  }
@@ -253,7 +254,7 @@ const defaultSettings = {
253
254
  const defaultContentType = 'application/octet-stream';
254
255
  const defaultFilename = 'original';
255
256
 
256
- var version = '4.3.1-alpha.0';
257
+ var version = '4.3.1';
257
258
 
258
259
  function isObject(o) {
259
260
  return Object.prototype.toString.call(o) === '[object Object]';
@@ -255,7 +255,7 @@ const buildSearchParams = (query) => {
255
255
  };
256
256
  const getUrl = (base, path, query) => {
257
257
  const url = new URL(base);
258
- url.pathname = path;
258
+ url.pathname = (url.pathname + path).replace('//', '/');
259
259
  if (query) {
260
260
  url.search = buildSearchParams(query);
261
261
  }
@@ -282,7 +282,7 @@ const defaultSettings = {
282
282
  const defaultContentType = 'application/octet-stream';
283
283
  const defaultFilename = 'original';
284
284
 
285
- var version = '4.3.1-alpha.0';
285
+ var version = '4.3.1';
286
286
 
287
287
  function isObject(o) {
288
288
  return Object.prototype.toString.call(o) === '[object Object]';
@@ -33,8 +33,9 @@ const request = ({ method, url, data, headers = {}, signal, onProgress }) => new
33
33
  let aborted = false;
34
34
  /**
35
35
  * Force synchronous flag to be off
36
- * Some users get `InvalidAccessError` error when we set `responseType`
36
+ * Some chrome versions gets `InvalidAccessError` error when we set `responseType`
37
37
  * See https://xhr.spec.whatwg.org/#synchronous-flag
38
+ * and https://bugs.chromium.org/p/chromium/issues/detail?id=1346628
38
39
  */
39
40
  xhr.open(requestMethod, url, true);
40
41
  if (headers) {
@@ -229,7 +230,7 @@ const buildSearchParams = (query) => {
229
230
  };
230
231
  const getUrl = (base, path, query) => {
231
232
  const url = new URL(base);
232
- url.pathname = path;
233
+ url.pathname = (url.pathname + path).replace('//', '/');
233
234
  if (query) {
234
235
  url.search = buildSearchParams(query);
235
236
  }
@@ -256,7 +257,7 @@ const defaultSettings = {
256
257
  const defaultContentType = 'application/octet-stream';
257
258
  const defaultFilename = 'original';
258
259
 
259
- var version = '4.3.1-alpha.0';
260
+ var version = '4.3.1';
260
261
 
261
262
  function isObject(o) {
262
263
  return Object.prototype.toString.call(o) === '[object Object]';
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@uploadcare/upload-client",
3
- "version": "4.3.1-alpha.0",
3
+ "version": "4.3.1",
4
4
  "description": "Library for work with Uploadcare Upload API",
5
5
  "type": "module",
6
- "main": "./dist/index.node.js",
7
6
  "module": "./dist/index.node.js",
8
7
  "browser": "./dist/index.browser.js",
9
8
  "react-native": "./dist/index.react-native.js",
@@ -11,7 +10,8 @@
11
10
  "exports": {
12
11
  ".": {
13
12
  "node": "./dist/index.node.js",
14
- "browser": "./dist/index.browser.js"
13
+ "browser": "./dist/index.browser.js",
14
+ "default": "./dist/index.browser.js"
15
15
  }
16
16
  },
17
17
  "sideEffects": false,
@@ -65,7 +65,7 @@
65
65
  "koa-body": "5.0.0",
66
66
  "mock-socket": "9.0.3",
67
67
  "start-server-and-test": "1.14.0",
68
- "@uploadcare/api-client-utils": "^4.3.1-alpha.0",
68
+ "@uploadcare/api-client-utils": "^4.3.1",
69
69
  "chalk": "^4.1.2"
70
70
  },
71
71
  "dependencies": {