parse 6.1.1 → 6.2.0-alpha.2
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/parse.js +7 -7
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +7 -7
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseFile.js +2 -2
- package/lib/browser/ParseObject.js +1 -1
- package/lib/browser/RESTController.js +1 -1
- package/lib/browser/equals.js +1 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseFile.js +2 -2
- package/lib/node/ParseObject.js +1 -1
- package/lib/node/RESTController.js +1 -1
- package/lib/node/equals.js +1 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseFile.js +1 -1
- package/lib/react-native/ParseObject.js +1 -1
- package/lib/react-native/RESTController.js +1 -1
- package/lib/react-native/equals.js +1 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseFile.js +2 -2
- package/lib/weapp/ParseObject.js +1 -1
- package/lib/weapp/RESTController.js +1 -1
- package/lib/weapp/equals.js +1 -1
- package/package.json +9 -20
- package/types/ParseFile.d.ts +1 -1
package/lib/browser/ParseFile.js
CHANGED
|
@@ -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
|
|
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',
|
|
@@ -295,7 +295,7 @@ const RESTController = {
|
|
|
295
295
|
if (response && response.responseText) {
|
|
296
296
|
try {
|
|
297
297
|
const errorJSON = JSON.parse(response.responseText);
|
|
298
|
-
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
298
|
+
error = new _ParseError.default(errorJSON.code, errorJSON.error || errorJSON.message);
|
|
299
299
|
} catch (_) {
|
|
300
300
|
// If we fail to parse the error text, that's okay.
|
|
301
301
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
package/lib/browser/equals.js
CHANGED
package/lib/node/CoreManager.js
CHANGED
package/lib/node/ParseFile.js
CHANGED
|
@@ -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
|
|
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',
|
package/lib/node/ParseObject.js
CHANGED
|
@@ -289,7 +289,7 @@ const RESTController = {
|
|
|
289
289
|
if (response && response.responseText) {
|
|
290
290
|
try {
|
|
291
291
|
const errorJSON = JSON.parse(response.responseText);
|
|
292
|
-
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
292
|
+
error = new _ParseError.default(errorJSON.code, errorJSON.error || errorJSON.message);
|
|
293
293
|
} catch (_) {
|
|
294
294
|
// If we fail to parse the error text, that's okay.
|
|
295
295
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
package/lib/node/equals.js
CHANGED
|
@@ -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
|
}
|
|
@@ -264,7 +264,7 @@ var RESTController = {
|
|
|
264
264
|
if (response && response.responseText) {
|
|
265
265
|
try {
|
|
266
266
|
var errorJSON = JSON.parse(response.responseText);
|
|
267
|
-
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
267
|
+
error = new _ParseError.default(errorJSON.code, errorJSON.error || errorJSON.message);
|
|
268
268
|
} catch (_) {
|
|
269
269
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
|
270
270
|
}
|
package/lib/weapp/CoreManager.js
CHANGED
package/lib/weapp/ParseFile.js
CHANGED
|
@@ -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
|
|
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',
|
package/lib/weapp/ParseObject.js
CHANGED
|
@@ -296,7 +296,7 @@ const RESTController = {
|
|
|
296
296
|
if (response && response.responseText) {
|
|
297
297
|
try {
|
|
298
298
|
const errorJSON = JSON.parse(response.responseText);
|
|
299
|
-
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
299
|
+
error = new _ParseError.default(errorJSON.code, errorJSON.error || errorJSON.message);
|
|
300
300
|
} catch (_) {
|
|
301
301
|
// If we fail to parse the error text, that's okay.
|
|
302
302
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
package/lib/weapp/equals.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0-alpha.2",
|
|
4
4
|
"description": "Parse JavaScript SDK",
|
|
5
5
|
"homepage": "https://parseplatform.org",
|
|
6
6
|
"keywords": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@babel/preset-env": "7.26.9",
|
|
46
46
|
"@babel/preset-react": "7.26.3",
|
|
47
47
|
"@babel/preset-typescript": "7.27.0",
|
|
48
|
-
"@eslint/js": "9.
|
|
48
|
+
"@eslint/js": "9.24.0",
|
|
49
49
|
"@parse/minami": "git+https://github.com/parse-community/minami#main",
|
|
50
50
|
"@saithodev/semantic-release-backmerge": "4.0.1",
|
|
51
51
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"codecov": "3.8.3",
|
|
64
64
|
"core-js": "3.41.0",
|
|
65
65
|
"cross-env": "7.0.2",
|
|
66
|
-
"eslint": "9.
|
|
66
|
+
"eslint": "9.24.0",
|
|
67
67
|
"eslint-plugin-expect-type": "0.6.2",
|
|
68
68
|
"eslint-plugin-jsdoc": "50.6.9",
|
|
69
|
-
"express": "
|
|
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.
|
|
89
|
-
"parse-server": "
|
|
90
|
-
"
|
|
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.
|
|
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": "
|
|
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
|
},
|
package/types/ParseFile.d.ts
CHANGED
|
@@ -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
|
|
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
|