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.
- package/dist/parse.js +6 -6
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +6 -6
- 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/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/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/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/equals.js +1 -1
- package/package.json +7 -18
- 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',
|
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
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
|
}
|
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
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.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": "
|
|
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
|