parse 6.1.1 → 6.2.0-alpha.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.
@@ -19,7 +19,7 @@ const config = {
19
19
  SERVER_AUTH_TOKEN: null,
20
20
  LIVEQUERY_SERVER_URL: null,
21
21
  ENCRYPTED_KEY: null,
22
- VERSION: 'js' + "6.1.1",
22
+ VERSION: 'js' + "6.2.0-alpha.1",
23
23
  APPLICATION_ID: null,
24
24
  JAVASCRIPT_KEY: null,
25
25
  MAINTENANCE_KEY: null,
@@ -54,7 +54,7 @@ class ParseFile {
54
54
  * an alphanumeric character, and consist of alphanumeric characters,
55
55
  * periods, spaces, underscores, or dashes.
56
56
  * @param data {Array} The data for the file, as either:
57
- * 1. an Array of byte value Numbers, or
57
+ * 1. an Array of byte value Numbers or Uint8Array.
58
58
  * 2. an Object like { base64: "..." } with a base64-encoded String.
59
59
  * 3. an Object like { uri: "..." } with a uri String.
60
60
  * 4. a File object selected with a file upload control. (3) only works
@@ -92,7 +92,7 @@ class ParseFile {
92
92
  this._metadata = metadata || {};
93
93
  this._tags = tags || {};
94
94
  if (data !== undefined) {
95
- if ((0, _isArray.default)(data)) {
95
+ if ((0, _isArray.default)(data) || data instanceof Uint8Array) {
96
96
  this._data = ParseFile.encodeBase64(data);
97
97
  this._source = {
98
98
  format: 'base64',
@@ -920,7 +920,7 @@ class ParseObject {
920
920
  */
921
921
  op(attr) {
922
922
  const pending = this._getPendingOps();
923
- for (let i = pending.length; i--;) {
923
+ for (let i = 0; i < pending.length; i += 1) {
924
924
  if (pending[i][attr]) {
925
925
  return pending[i][attr];
926
926
  }
@@ -33,7 +33,7 @@ function equals(a, b) {
33
33
  if (a.length !== b.length) {
34
34
  return false;
35
35
  }
36
- for (let i = a.length; i--;) {
36
+ for (let i = 0; i < a.length; i += 1) {
37
37
  if (!equals(a[i], b[i])) {
38
38
  return false;
39
39
  }
@@ -16,7 +16,7 @@ const config = {
16
16
  SERVER_AUTH_TOKEN: null,
17
17
  LIVEQUERY_SERVER_URL: null,
18
18
  ENCRYPTED_KEY: null,
19
- VERSION: 'js' + "6.1.1",
19
+ VERSION: 'js' + "6.2.0-alpha.1",
20
20
  APPLICATION_ID: null,
21
21
  JAVASCRIPT_KEY: null,
22
22
  MAINTENANCE_KEY: null,
@@ -50,7 +50,7 @@ class ParseFile {
50
50
  * an alphanumeric character, and consist of alphanumeric characters,
51
51
  * periods, spaces, underscores, or dashes.
52
52
  * @param data {Array} The data for the file, as either:
53
- * 1. an Array of byte value Numbers, or
53
+ * 1. an Array of byte value Numbers or Uint8Array.
54
54
  * 2. an Object like { base64: "..." } with a base64-encoded String.
55
55
  * 3. an Object like { uri: "..." } with a uri String.
56
56
  * 4. a File object selected with a file upload control. (3) only works
@@ -80,7 +80,7 @@ class ParseFile {
80
80
  this._metadata = metadata || {};
81
81
  this._tags = tags || {};
82
82
  if (data !== undefined) {
83
- if (Array.isArray(data)) {
83
+ if (Array.isArray(data) || data instanceof Uint8Array) {
84
84
  this._data = ParseFile.encodeBase64(data);
85
85
  this._source = {
86
86
  format: 'base64',
@@ -903,7 +903,7 @@ class ParseObject {
903
903
  */
904
904
  op(attr) {
905
905
  const pending = this._getPendingOps();
906
- for (let i = pending.length; i--;) {
906
+ for (let i = 0; i < pending.length; i += 1) {
907
907
  if (pending[i][attr]) {
908
908
  return pending[i][attr];
909
909
  }
@@ -34,7 +34,7 @@ function equals(a, b) {
34
34
  if (a.length !== b.length) {
35
35
  return false;
36
36
  }
37
- for (let i = a.length; i--;) {
37
+ for (let i = 0; i < a.length; i += 1) {
38
38
  if (!equals(a[i], b[i])) {
39
39
  return false;
40
40
  }
@@ -12,7 +12,7 @@ var config = {
12
12
  SERVER_AUTH_TOKEN: null,
13
13
  LIVEQUERY_SERVER_URL: null,
14
14
  ENCRYPTED_KEY: null,
15
- VERSION: 'js' + "6.1.1",
15
+ VERSION: 'js' + "6.2.0-alpha.1",
16
16
  APPLICATION_ID: null,
17
17
  JAVASCRIPT_KEY: null,
18
18
  MAINTENANCE_KEY: null,
@@ -40,7 +40,7 @@ var ParseFile = function () {
40
40
  this._metadata = metadata || {};
41
41
  this._tags = tags || {};
42
42
  if (data !== undefined) {
43
- if (Array.isArray(data)) {
43
+ if (Array.isArray(data) || data instanceof Uint8Array) {
44
44
  this._data = ParseFile.encodeBase64(data);
45
45
  this._source = {
46
46
  format: 'base64',
@@ -647,7 +647,7 @@ var ParseObject = function () {
647
647
  key: "op",
648
648
  value: function (attr) {
649
649
  var pending = this._getPendingOps();
650
- for (var i = pending.length; i--;) {
650
+ for (var i = 0; i < pending.length; i += 1) {
651
651
  if (pending[i][attr]) {
652
652
  return pending[i][attr];
653
653
  }
@@ -27,7 +27,7 @@ function equals(a, b) {
27
27
  if (a.length !== b.length) {
28
28
  return false;
29
29
  }
30
- for (var i = a.length; i--;) {
30
+ for (var i = 0; i < a.length; i += 1) {
31
31
  if (!equals(a[i], b[i])) {
32
32
  return false;
33
33
  }
@@ -19,7 +19,7 @@ const config = {
19
19
  SERVER_AUTH_TOKEN: null,
20
20
  LIVEQUERY_SERVER_URL: null,
21
21
  ENCRYPTED_KEY: null,
22
- VERSION: 'js' + "6.1.1",
22
+ VERSION: 'js' + "6.2.0-alpha.1",
23
23
  APPLICATION_ID: null,
24
24
  JAVASCRIPT_KEY: null,
25
25
  MAINTENANCE_KEY: null,
@@ -55,7 +55,7 @@ class ParseFile {
55
55
  * an alphanumeric character, and consist of alphanumeric characters,
56
56
  * periods, spaces, underscores, or dashes.
57
57
  * @param data {Array} The data for the file, as either:
58
- * 1. an Array of byte value Numbers, or
58
+ * 1. an Array of byte value Numbers or Uint8Array.
59
59
  * 2. an Object like { base64: "..." } with a base64-encoded String.
60
60
  * 3. an Object like { uri: "..." } with a uri String.
61
61
  * 4. a File object selected with a file upload control. (3) only works
@@ -93,7 +93,7 @@ class ParseFile {
93
93
  this._metadata = metadata || {};
94
94
  this._tags = tags || {};
95
95
  if (data !== undefined) {
96
- if ((0, _isArray.default)(data)) {
96
+ if ((0, _isArray.default)(data) || data instanceof Uint8Array) {
97
97
  this._data = ParseFile.encodeBase64(data);
98
98
  this._source = {
99
99
  format: 'base64',
@@ -920,7 +920,7 @@ class ParseObject {
920
920
  */
921
921
  op(attr) {
922
922
  const pending = this._getPendingOps();
923
- for (let i = pending.length; i--;) {
923
+ for (let i = 0; i < pending.length; i += 1) {
924
924
  if (pending[i][attr]) {
925
925
  return pending[i][attr];
926
926
  }
@@ -33,7 +33,7 @@ function equals(a, b) {
33
33
  if (a.length !== b.length) {
34
34
  return false;
35
35
  }
36
- for (let i = a.length; i--;) {
36
+ for (let i = 0; i < a.length; i += 1) {
37
37
  if (!equals(a[i], b[i])) {
38
38
  return false;
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "6.1.1",
3
+ "version": "6.2.0-alpha.1",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [
@@ -66,7 +66,7 @@
66
66
  "eslint": "9.23.0",
67
67
  "eslint-plugin-expect-type": "0.6.2",
68
68
  "eslint-plugin-jsdoc": "50.6.9",
69
- "express": "4.21.2",
69
+ "express": "5.1.0",
70
70
  "gulp": "5.0.0",
71
71
  "gulp-babel": "8.0.0",
72
72
  "gulp-derequire": "3.0.0",
@@ -74,7 +74,6 @@
74
74
  "gulp-rename": "2.0.0",
75
75
  "gulp-uglify": "3.0.2",
76
76
  "gulp-watch": "5.0.1",
77
- "husky": "9.1.7",
78
77
  "jasmine": "5.6.0",
79
78
  "jasmine-reporters": "2.5.2",
80
79
  "jasmine-spec-reporter": "7.0.0",
@@ -85,13 +84,12 @@
85
84
  "lint-staged": "15.5.0",
86
85
  "madge": "8.0.0",
87
86
  "metro-react-native-babel-preset": "0.77.0",
88
- "mongodb-runner": "5.8.0",
89
- "parse-server": "7.3.0",
90
- "prettier": "3.5.2",
91
- "puppeteer": "24.4.0",
87
+ "mongodb-runner": "5.8.1",
88
+ "parse-server": "8.1.0",
89
+ "puppeteer": "24.6.0",
92
90
  "regenerator-runtime": "0.14.1",
93
91
  "semantic-release": "24.2.3",
94
- "typescript-eslint": "8.28.0",
92
+ "typescript-eslint": "8.29.0",
95
93
  "vinyl-source-stream": "2.0.0"
96
94
  },
97
95
  "optionalDependencies": {
@@ -117,20 +115,11 @@
117
115
  "integration": "cross-env TESTING=1 jasmine --config=jasmine.json",
118
116
  "docs": "jsdoc -c ./jsdoc-conf.json ./src",
119
117
  "madge:circular": "madge ./src --extensions js,ts --circular",
120
- "prepare": "husky && npm run build",
121
- "pre-commit": "lint-staged",
118
+ "prepare": "npm run build",
122
119
  "release_docs": "./release_docs.sh",
123
120
  "gulp": "gulp",
124
- "prettier": "prettier --write '{src,integration,types}/{**/*,*}.{js,ts}' && npm run lint:fix",
125
121
  "cross-env": "cross-env"
126
122
  },
127
- "lint-staged": {
128
- "{src,integration}/{**/*,*}.{js,ts}": [
129
- "prettier --write",
130
- "eslint --fix --cache",
131
- "git add"
132
- ]
133
- },
134
123
  "engines": {
135
124
  "node": "18 || 19 || 20 || 22"
136
125
  },
@@ -44,7 +44,7 @@ declare class ParseFile {
44
44
  * an alphanumeric character, and consist of alphanumeric characters,
45
45
  * periods, spaces, underscores, or dashes.
46
46
  * @param data {Array} The data for the file, as either:
47
- * 1. an Array of byte value Numbers, or
47
+ * 1. an Array of byte value Numbers or Uint8Array.
48
48
  * 2. an Object like { base64: "..." } with a base64-encoded String.
49
49
  * 3. an Object like { uri: "..." } with a uri String.
50
50
  * 4. a File object selected with a file upload control. (3) only works