Skip to content

Commit 4ab49b7

Browse files
authored
Merge branch 'master' into feature/7517-clear-pointer-graphql
2 parents de2efed + 12eb6c8 commit 4ab49b7

21 files changed

+206
-190
lines changed

.github/stale.yml

-19
This file was deleted.

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"cors": "2.8.5",
3333
"deepcopy": "2.1.0",
3434
"express": "4.17.1",
35-
"follow-redirects": "1.14.1",
35+
"follow-redirects": "1.14.2",
3636
"graphql": "15.6.0",
3737
"graphql-list-fields": "2.0.2",
3838
"graphql-relay": "0.9.0",
@@ -52,7 +52,7 @@
5252
"pg-promise": "10.11.0",
5353
"pluralize": "8.0.0",
5454
"redis": "3.1.2",
55-
"semver": "7.3.4",
55+
"semver": "7.3.5",
5656
"subscriptions-transport-ws": "0.10.0",
5757
"tv4": "1.3.0",
5858
"uuid": "8.3.2",

spec/AuthenticationAdapters.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,7 @@ describe('microsoft graph auth adapter', () => {
17501750
access_token: 'very.long.bad.token',
17511751
};
17521752
microsoft.validateAuthData(authData).then(done.fail, err => {
1753-
expect(err.code).toBe(101);
1753+
expect(err.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
17541754
expect(err.message).toBe('Microsoft Graph auth is invalid for this user.');
17551755
done();
17561756
});

spec/CloudCode.spec.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('Cloud Code', () => {
7575

7676
it('is cleared cleared after the previous test', done => {
7777
Parse.Cloud.run('hello', {}).catch(error => {
78-
expect(error.code).toEqual(141);
78+
expect(error.code).toEqual(Parse.Error.SCRIPT_FAILED);
7979
done();
8080
});
8181
});
@@ -109,7 +109,7 @@ describe('Cloud Code', () => {
109109
Parse.Cloud.run('cloudCodeWithError').then(
110110
() => done.fail('should not succeed'),
111111
e => {
112-
expect(e).toEqual(new Parse.Error(141, 'foo is not defined'));
112+
expect(e).toEqual(new Parse.Error(Parse.Error.SCRIPT_FAILED, 'foo is not defined'));
113113
done();
114114
}
115115
);
@@ -123,7 +123,7 @@ describe('Cloud Code', () => {
123123
Parse.Cloud.run('cloudCodeWithError').then(
124124
() => done.fail('should not succeed'),
125125
e => {
126-
expect(e.code).toEqual(141);
126+
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
127127
expect(e.message).toEqual('Script failed.');
128128
done();
129129
}
@@ -142,7 +142,7 @@ describe('Cloud Code', () => {
142142
const query = new Parse.Query('beforeFind');
143143
await query.first();
144144
} catch (e) {
145-
expect(e.code).toBe(141);
145+
expect(e.code).toBe(Parse.Error.SCRIPT_FAILED);
146146
expect(e.message).toBe('throw beforeFind');
147147
done();
148148
}
@@ -467,7 +467,7 @@ describe('Cloud Code', () => {
467467
});
468468
} catch (e) {
469469
catched = true;
470-
expect(e.code).toBe(101);
470+
expect(e.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
471471
}
472472
expect(catched).toBe(true);
473473
expect(called).toBe(7);
@@ -479,7 +479,7 @@ describe('Cloud Code', () => {
479479
});
480480
} catch (e) {
481481
catched = true;
482-
expect(e.code).toBe(101);
482+
expect(e.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
483483
}
484484
expect(catched).toBe(true);
485485
expect(called).toBe(7);
@@ -491,7 +491,7 @@ describe('Cloud Code', () => {
491491
});
492492
} catch (e) {
493493
catched = true;
494-
expect(e.code).toBe(101);
494+
expect(e.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
495495
}
496496
expect(catched).toBe(true);
497497
expect(called).toBe(7);
@@ -1761,7 +1761,7 @@ describe('Cloud Code', () => {
17611761

17621762
it('should set the failure message on the job error', async () => {
17631763
Parse.Cloud.job('myJobError', () => {
1764-
throw new Parse.Error(101, 'Something went wrong');
1764+
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Something went wrong');
17651765
});
17661766
const job = await Parse.Cloud.startJob('myJobError');
17671767
let jobStatus, status;
@@ -2038,7 +2038,7 @@ describe('beforeFind hooks', () => {
20382038
done();
20392039
},
20402040
err => {
2041-
expect(err.code).toBe(141);
2041+
expect(err.code).toBe(Parse.Error.SCRIPT_FAILED);
20422042
expect(err.message).toEqual('Do not run that query');
20432043
done();
20442044
}

spec/CloudCodeLogger.spec.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('Cloud Code Logger', () => {
161161
expect(log[0]).toEqual('error');
162162
const error = log[2].error;
163163
expect(error instanceof Parse.Error).toBeTruthy();
164-
expect(error.code).toBe(141);
164+
expect(error.code).toBe(Parse.Error.SCRIPT_FAILED);
165165
expect(error.message).toBe('uh oh!');
166166
done();
167167
});
@@ -199,7 +199,9 @@ describe('Cloud Code Logger', () => {
199199
expect(log[1]).toMatch(
200200
/Failed running cloud function aFunction for user [^ ]* with:\n {2}Input: {"foo":"bar"}\n {2}Error:/
201201
);
202-
const errorString = JSON.stringify(new Parse.Error(141, 'it failed!'));
202+
const errorString = JSON.stringify(
203+
new Parse.Error(Parse.Error.SCRIPT_FAILED, 'it failed!')
204+
);
203205
expect(log[1].indexOf(errorString)).toBeGreaterThan(0);
204206
done();
205207
})

spec/ParseAPI.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const headers = {
2323
'X-Parse-Installation-Id': 'yolo',
2424
};
2525

26-
describe_only_db('mongo')('miscellaneous', () => {
26+
describe('miscellaneous', () => {
2727
it('db contains document after successful save', async () => {
2828
const obj = new Parse.Object('TestObject');
2929
obj.set('foo', 'bar');
@@ -1015,7 +1015,7 @@ describe('miscellaneous', function () {
10151015
done();
10161016
},
10171017
e => {
1018-
expect(e.code).toEqual(141);
1018+
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
10191019
expect(e.message).toEqual('noway');
10201020
done();
10211021
}

0 commit comments

Comments
 (0)