parse 4.0.0-alpha.2 → 4.0.0-alpha.4

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![Snyk Badge](https://snyk.io/test/github/parse-community/Parse-SDK-JS/badge.svg)](https://snyk.io/test/github/parse-community/Parse-SDK-JS)
9
9
  [![Coverage](http://codecov.io/github/parse-community/Parse-SDK-JS/coverage.svg?branch=alpha)](http://codecov.io/github/parse-community/Parse-SDK-JS?branch=alpha)
10
10
 
11
- [![Node Version](https://img.shields.io/badge/nodejs-14-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
11
+ [![Node Version](https://img.shields.io/badge/nodejs-14,_16,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
12
12
  [![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
13
13
 
14
14
  [![npm latest version](https://img.shields.io/npm/v/parse/latest.svg)](https://www.npmjs.com/package/parse)
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v4.0.0-alpha.2
2
+ * Parse JavaScript SDK v4.0.0-alpha.4
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "4.0.0-alpha.2",
702
+ VERSION: 'js' + "4.0.0-alpha.4",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -24478,8 +24478,8 @@ var RESTController = {
24478
24478
  headers[key] = customHeaders[key];
24479
24479
  }
24480
24480
 
24481
- function handleProgress(type, event) {
24482
- if (options && typeof options.progress === 'function') {
24481
+ if (options && typeof options.progress === 'function') {
24482
+ var handleProgress = function handleProgress(type, event) {
24483
24483
  if (event.lengthComputable) {
24484
24484
  options.progress(event.loaded / event.total, event.loaded, event.total, {
24485
24485
  type: type
@@ -24489,17 +24489,17 @@ var RESTController = {
24489
24489
  type: type
24490
24490
  });
24491
24491
  }
24492
- }
24493
- }
24494
-
24495
- xhr.onprogress = function (event) {
24496
- handleProgress('download', event);
24497
- };
24492
+ };
24498
24493
 
24499
- if (xhr.upload) {
24500
- xhr.upload.onprogress = function (event) {
24501
- handleProgress('upload', event);
24494
+ xhr.onprogress = function (event) {
24495
+ handleProgress('download', event);
24502
24496
  };
24497
+
24498
+ if (xhr.upload) {
24499
+ xhr.upload.onprogress = function (event) {
24500
+ handleProgress('upload', event);
24501
+ };
24502
+ }
24503
24503
  }
24504
24504
 
24505
24505
  xhr.open(method, url, true);