feat: Upgrade to Parse JS SDK 6.0.0 (#9624)
BREAKING CHANGE: This upgrades to the Parse JS SDK 6.0.0. See the [change log](https://github.com/parse-community/Parse-SDK-JS/releases/tag/6.0.0) of the Parse JS SDK for breaking changes and more details.
This commit is contained in:
157
package-lock.json
generated
157
package-lock.json
generated
@@ -40,7 +40,7 @@
|
|||||||
"mongodb": "6.13.0",
|
"mongodb": "6.13.0",
|
||||||
"mustache": "4.2.0",
|
"mustache": "4.2.0",
|
||||||
"otpauth": "9.3.6",
|
"otpauth": "9.3.6",
|
||||||
"parse": "5.3.0",
|
"parse": "6.0.0",
|
||||||
"path-to-regexp": "6.3.0",
|
"path-to-regexp": "6.3.0",
|
||||||
"pg-monitor": "2.1.0",
|
"pg-monitor": "2.1.0",
|
||||||
"pg-promise": "11.10.2",
|
"pg-promise": "11.10.2",
|
||||||
@@ -2208,9 +2208,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/runtime-corejs3": {
|
"node_modules/@babel/runtime-corejs3": {
|
||||||
"version": "7.24.7",
|
"version": "7.26.9",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.26.9.tgz",
|
||||||
"integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
|
"integrity": "sha512-5EVjbTegqN7RSJle6hMWYxO4voo4rI+9krITk+DWR+diJgGrjZjrIBnJhjrHYYQsFgI7j1w1QnrvV7YSKBfYGg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js-pure": "^3.30.2",
|
"core-js-pure": "^3.30.2",
|
||||||
"regenerator-runtime": "^0.14.0"
|
"regenerator-runtime": "^0.14.0"
|
||||||
@@ -3851,6 +3851,69 @@
|
|||||||
"node": "18 || 20 || 22"
|
"node": "18 || 20 || 22"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@parse/push-adapter/node_modules/@babel/runtime-corejs3": {
|
||||||
|
"version": "7.24.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
|
||||||
|
"integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
|
||||||
|
"dependencies": {
|
||||||
|
"core-js-pure": "^3.30.2",
|
||||||
|
"regenerator-runtime": "^0.14.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@parse/push-adapter/node_modules/parse": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse/-/parse-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime-corejs3": "7.24.7",
|
||||||
|
"idb-keyval": "6.2.1",
|
||||||
|
"react-native-crypto-js": "1.0.0",
|
||||||
|
"uuid": "10.0.0",
|
||||||
|
"ws": "8.17.1",
|
||||||
|
"xmlhttprequest": "1.8.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "18 || 19 || 20 || 22"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"crypto-js": "4.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@parse/push-adapter/node_modules/uuid": {
|
||||||
|
"version": "10.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
|
||||||
|
"integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa",
|
||||||
|
"https://github.com/sponsors/ctavan"
|
||||||
|
],
|
||||||
|
"bin": {
|
||||||
|
"uuid": "dist/bin/uuid"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@parse/push-adapter/node_modules/ws": {
|
||||||
|
"version": "8.17.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||||
|
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bufferutil": "^4.0.1",
|
||||||
|
"utf-8-validate": ">=5.0.2"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"bufferutil": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"utf-8-validate": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@pnpm/config.env-replace": {
|
"node_modules/@pnpm/config.env-replace": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz",
|
||||||
@@ -7811,9 +7874,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/core-js-pure": {
|
"node_modules/core-js-pure": {
|
||||||
"version": "3.37.1",
|
"version": "3.41.0",
|
||||||
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.1.tgz",
|
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.41.0.tgz",
|
||||||
"integrity": "sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA==",
|
"integrity": "sha512-71Gzp96T9YPk63aUvE5Q5qP+DryB4ZloUZPSOebGM88VNw8VNfvdA7z6kGA8iGOTEzAomsRidp4jXSmUIJsL+Q==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -17279,15 +17342,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/parse": {
|
"node_modules/parse": {
|
||||||
"version": "5.3.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/parse/-/parse-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/parse/-/parse-6.0.0.tgz",
|
||||||
"integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
|
"integrity": "sha512-uBfgO5refS/KhrKGQWEgTEjz5+m9F+Q9d6N4gbKWElGUWwoOUCBlGVgfErZOouunTwbKmpBy5f1i8KeYk46qkw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime-corejs3": "7.24.7",
|
"@babel/runtime-corejs3": "7.26.9",
|
||||||
"idb-keyval": "6.2.1",
|
"idb-keyval": "6.2.1",
|
||||||
"react-native-crypto-js": "1.0.0",
|
"react-native-crypto-js": "1.0.0",
|
||||||
"uuid": "10.0.0",
|
"uuid": "10.0.0",
|
||||||
"ws": "8.17.1",
|
"ws": "8.18.1",
|
||||||
"xmlhttprequest": "1.8.0"
|
"xmlhttprequest": "1.8.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -17337,9 +17400,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/parse/node_modules/ws": {
|
"node_modules/parse/node_modules/ws": {
|
||||||
"version": "8.17.1",
|
"version": "8.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz",
|
||||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
@@ -22874,9 +22937,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/runtime-corejs3": {
|
"@babel/runtime-corejs3": {
|
||||||
"version": "7.24.7",
|
"version": "7.26.9",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.26.9.tgz",
|
||||||
"integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
|
"integrity": "sha512-5EVjbTegqN7RSJle6hMWYxO4voo4rI+9krITk+DWR+diJgGrjZjrIBnJhjrHYYQsFgI7j1w1QnrvV7YSKBfYGg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"core-js-pure": "^3.30.2",
|
"core-js-pure": "^3.30.2",
|
||||||
"regenerator-runtime": "^0.14.0"
|
"regenerator-runtime": "^0.14.0"
|
||||||
@@ -24035,6 +24098,42 @@
|
|||||||
"npmlog": "7.0.1",
|
"npmlog": "7.0.1",
|
||||||
"parse": "5.3.0",
|
"parse": "5.3.0",
|
||||||
"web-push": "3.6.7"
|
"web-push": "3.6.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime-corejs3": {
|
||||||
|
"version": "7.24.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
|
||||||
|
"integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
|
||||||
|
"requires": {
|
||||||
|
"core-js-pure": "^3.30.2",
|
||||||
|
"regenerator-runtime": "^0.14.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parse": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse/-/parse-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime-corejs3": "7.24.7",
|
||||||
|
"crypto-js": "4.2.0",
|
||||||
|
"idb-keyval": "6.2.1",
|
||||||
|
"react-native-crypto-js": "1.0.0",
|
||||||
|
"uuid": "10.0.0",
|
||||||
|
"ws": "8.17.1",
|
||||||
|
"xmlhttprequest": "1.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uuid": {
|
||||||
|
"version": "10.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
|
||||||
|
"integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ=="
|
||||||
|
},
|
||||||
|
"ws": {
|
||||||
|
"version": "8.17.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||||
|
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||||
|
"requires": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pnpm/config.env-replace": {
|
"@pnpm/config.env-replace": {
|
||||||
@@ -26933,9 +27032,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core-js-pure": {
|
"core-js-pure": {
|
||||||
"version": "3.37.1",
|
"version": "3.41.0",
|
||||||
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.1.tgz",
|
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.41.0.tgz",
|
||||||
"integrity": "sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA=="
|
"integrity": "sha512-71Gzp96T9YPk63aUvE5Q5qP+DryB4ZloUZPSOebGM88VNw8VNfvdA7z6kGA8iGOTEzAomsRidp4jXSmUIJsL+Q=="
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -33605,16 +33704,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parse": {
|
"parse": {
|
||||||
"version": "5.3.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/parse/-/parse-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/parse/-/parse-6.0.0.tgz",
|
||||||
"integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
|
"integrity": "sha512-uBfgO5refS/KhrKGQWEgTEjz5+m9F+Q9d6N4gbKWElGUWwoOUCBlGVgfErZOouunTwbKmpBy5f1i8KeYk46qkw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime-corejs3": "7.24.7",
|
"@babel/runtime-corejs3": "7.26.9",
|
||||||
"crypto-js": "4.2.0",
|
"crypto-js": "4.2.0",
|
||||||
"idb-keyval": "6.2.1",
|
"idb-keyval": "6.2.1",
|
||||||
"react-native-crypto-js": "1.0.0",
|
"react-native-crypto-js": "1.0.0",
|
||||||
"uuid": "10.0.0",
|
"uuid": "10.0.0",
|
||||||
"ws": "8.17.1",
|
"ws": "8.18.1",
|
||||||
"xmlhttprequest": "1.8.0"
|
"xmlhttprequest": "1.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -33624,9 +33723,9 @@
|
|||||||
"integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ=="
|
"integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ=="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "8.17.1",
|
"version": "8.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz",
|
||||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
"mongodb": "6.13.0",
|
"mongodb": "6.13.0",
|
||||||
"mustache": "4.2.0",
|
"mustache": "4.2.0",
|
||||||
"otpauth": "9.3.6",
|
"otpauth": "9.3.6",
|
||||||
"parse": "5.3.0",
|
"parse": "6.0.0",
|
||||||
"path-to-regexp": "6.3.0",
|
"path-to-regexp": "6.3.0",
|
||||||
"pg-monitor": "2.1.0",
|
"pg-monitor": "2.1.0",
|
||||||
"pg-promise": "11.10.2",
|
"pg-promise": "11.10.2",
|
||||||
|
|||||||
@@ -3494,9 +3494,17 @@ describe('afterLogin hook', () => {
|
|||||||
expect(req.object._context).not.toBeDefined();
|
expect(req.object._context).not.toBeDefined();
|
||||||
expect(req.object.context).not.toBeDefined();
|
expect(req.object.context).not.toBeDefined();
|
||||||
});
|
});
|
||||||
const obj = new TestObject();
|
await request({
|
||||||
obj.set('_context', { hello: 'world' });
|
url: 'http://localhost:8378/1/classes/TestObject',
|
||||||
await obj.save(null, { context: { a: 'a' } });
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-Parse-Application-Id': 'test',
|
||||||
|
'X-Parse-REST-API-Key': 'rest',
|
||||||
|
'X-Parse-Cloud-Context': '{"a":"a"}',
|
||||||
|
},
|
||||||
|
body: JSON.stringify({_context: { hello: 'world' }}),
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have access to context when saving a new object', async () => {
|
it('should have access to context when saving a new object', async () => {
|
||||||
|
|||||||
@@ -5,17 +5,9 @@ const Config = require('../lib/Config');
|
|||||||
const auth = require('../lib/Auth');
|
const auth = require('../lib/Auth');
|
||||||
|
|
||||||
describe('Parse.ACL', () => {
|
describe('Parse.ACL', () => {
|
||||||
it('acl must be valid', done => {
|
it('acl must be valid', () => {
|
||||||
const user = new Parse.User();
|
const user = new Parse.User();
|
||||||
ok(
|
expect(() => user.setACL('ACL')).toThrow(new Parse.Error(Parse.Error.OTHER_CAUSE, 'ACL must be a Parse ACL.'));
|
||||||
!user.setACL("Ceci n'est pas un ACL.", {
|
|
||||||
error: function (user, error) {
|
|
||||||
equal(error.code, -1);
|
|
||||||
done();
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
'setACL should have returned false.'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('refresh object with acl', async done => {
|
it('refresh object with acl', async done => {
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ describe('Parse.Object testing', () => {
|
|||||||
|
|
||||||
it('invalid key name', function (done) {
|
it('invalid key name', function (done) {
|
||||||
const item = new Parse.Object('Item');
|
const item = new Parse.Object('Item');
|
||||||
ok(!item.set({ 'foo^bar': 'baz' }), 'Item should not be updated with invalid key.');
|
expect(() => item.set({ 'foo^bar': 'baz' })).toThrow(new Parse.Error(Parse.Error.INVALID_KEY_NAME, 'Invalid key name: "foo^bar"'));
|
||||||
item.save({ 'foo^bar': 'baz' }).then(fail, () => done());
|
item.save({ 'foo^bar': 'baz' }).then(fail, () => done());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2817,7 +2817,7 @@ describe('schemas', () => {
|
|||||||
object.save({
|
object.save({
|
||||||
'!12field': 'field',
|
'!12field': 'field',
|
||||||
})
|
})
|
||||||
).toBeRejectedWith(new Parse.Error(Parse.Error.INVALID_KEY_NAME));
|
).toBeRejectedWith(new Parse.Error(Parse.Error.INVALID_KEY_NAME, 'Invalid key name: "!12field"'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user