feat: Deprecation DEPPS10: Encode Parse.Object in Cloud Function and remove option encodeParseObjectInCloudFunction (#9973)

BREAKING CHANGE: This release encodes `Parse.Object` in Cloud Function and removes option `encodeParseObjectInCloudFunction` (Deprecation DEPPS10).
This commit is contained in:
Manuel
2025-12-12 20:46:35 +01:00
committed by GitHub
parent 5b68f7d050
commit a2d3dbe972
10 changed files with 4 additions and 40 deletions

View File

@@ -1702,28 +1702,7 @@ describe('Cloud Code', () => {
});
});
it('should not encode Parse Objects', async () => {
await reconfigureServer({ encodeParseObjectInCloudFunction: false });
const user = new Parse.User();
user.setUsername('username');
user.setPassword('password');
user.set('deleted', false);
await user.signUp();
Parse.Cloud.define(
'deleteAccount',
async req => {
expect(req.params.object instanceof Parse.Object).not.toBeTrue();
return 'Object deleted';
},
{
requireMaster: true,
}
);
await Parse.Cloud.run('deleteAccount', { object: user.toPointer() }, { useMasterKey: true });
});
it('allow cloud to encode Parse Objects', async () => {
await reconfigureServer({ encodeParseObjectInCloudFunction: true });
it('should encode Parse Objects in cloud functions', async () => {
const user = new Parse.User();
user.setUsername('username');
user.setPassword('password');

View File

@@ -1266,7 +1266,6 @@ describe('miscellaneous', () => {
});
it('test cloud function query parameters with array of pointers', async () => {
await reconfigureServer({ encodeParseObjectInCloudFunction: false });
Parse.Cloud.define('echoParams', req => {
return req.params;
});
@@ -1279,7 +1278,7 @@ describe('miscellaneous', () => {
method: 'POST',
headers: headers,
url: 'http://localhost:8378/1/functions/echoParams',
body: '{"arr": [{ "__type": "Pointer", "className": "PointerTest" }]}',
body: '{"arr": [{ "__type": "Pointer", "className": "PointerTest", "objectId": "test123" }]}',
});
const res = response.data.result;
expect(res.arr.length).toEqual(1);

View File

@@ -150,7 +150,6 @@ const defaultConfiguration = {
shortLivedAuth: mockShortLivedAuth(),
},
allowClientClassCreation: true,
encodeParseObjectInCloudFunction: true,
};
if (silent) {