Skip to content

Commit dc9f90d

Browse files
committed
Merge commit 'ccb045b68c5b4d983a90fa125513fc476e4e2387'
* commit 'ccb045b68c5b4d983a90fa125513fc476e4e2387': fix: upgrade @graphql-tools/links from 6.2.4 to 6.2.5 (parse-community#7007) fix: upgrade pg-promise from 10.7.0 to 10.7.1 (parse-community#7009) fix: upgrade jwks-rsa from 1.10.1 to 1.11.0 (parse-community#7008) fix: upgrade graphql from 15.3.0 to 15.4.0 (parse-community#7011) update stale bot (parse-community#6998) fix(beforeSave/afterSave): Return value instead of Parse.Op for nested fields (parse-community#7005) fix(beforeSave): Skip Sanitizing Database results (parse-community#7003) Fix includeAll for querying a Pointer and Pointer array (parse-community#7002) Init (parse-community#6999)
2 parents dbf04f3 + ccb045b commit dc9f90d

File tree

9 files changed

+200
-115
lines changed

9 files changed

+200
-115
lines changed

.github/stale.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
# Number of days of inactivity before an issue becomes stale
2-
daysUntilStale: 45
2+
daysUntilStale: 30
33
# Number of days of inactivity before a stale issue is closed
4-
daysUntilClose: 7
5-
# Issues with these labels will never be considered stale
6-
exemptLabels:
7-
- bug
8-
- enhancement
9-
- feature request
10-
- good first issue
11-
- hacktoberfest
12-
- help wanted
13-
- needs investigation
14-
- needs more info
15-
- question
16-
- pinned
17-
- security
18-
- up-for-grabs
4+
daysUntilClose: 30
5+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
6+
onlyLabels:
7+
- ":rocket: feature"
8+
- ":dna: enhancement"
199
# Label to use when marking an issue as stale
20-
staleLabel: stale
10+
staleLabel: up-for-grabs
2111
# Limit to only `issues` not `pulls`
2212
only: issues
2313
# Comment to post when marking an issue as stale. Set to `false` to disable
2414
markComment: >
25-
This issue has been automatically marked as stale because it has not had
15+
This issue has been automatically marked as up-for-grabs because it has not had
2616
recent activity. It will be closed if no further activity occurs. Thank you
2717
for your contributions.
2818
# Comment to post when closing a stale issue. Set to `false` to disable
29-
closeComment: false
19+
closeComment: false

package-lock.json

Lines changed: 43 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"license": "BSD-3-Clause",
2121
"dependencies": {
2222
"@apollographql/graphql-playground-html": "1.6.26",
23-
"@graphql-tools/links": "6.2.4",
23+
"@graphql-tools/links": "6.2.5",
2424
"@graphql-tools/stitch": "6.2.4",
2525
"@graphql-tools/utils": "6.2.4",
2626
"@parse/fs-files-adapter": "1.2.0",
@@ -35,20 +35,20 @@
3535
"deepcopy": "2.1.0",
3636
"express": "4.17.1",
3737
"follow-redirects": "1.13.0",
38-
"graphql": "15.3.0",
38+
"graphql": "15.4.0",
3939
"graphql-list-fields": "2.0.2",
4040
"graphql-relay": "0.6.0",
4141
"graphql-upload": "11.0.0",
4242
"intersect": "1.0.1",
4343
"jsonwebtoken": "8.5.1",
44-
"jwks-rsa": "1.10.1",
44+
"jwks-rsa": "1.11.0",
4545
"ldapjs": "2.2.0",
4646
"lodash": "4.17.20",
4747
"lru-cache": "5.1.1",
4848
"mime": "2.4.6",
4949
"mongodb": "3.6.2",
5050
"parse": "2.17.0",
51-
"pg-promise": "10.7.0",
51+
"pg-promise": "10.7.1",
5252
"pluralize": "8.0.0",
5353
"redis": "3.0.2",
5454
"semver": "7.3.2",

spec/CloudCode.spec.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,45 @@ describe('Cloud Code', () => {
14791479
});
14801480
});
14811481

1482+
it('beforeSave should not sanitize database', async done => {
1483+
const { adapter } = Config.get(Parse.applicationId).database;
1484+
const spy = spyOn(adapter, 'findOneAndUpdate').and.callThrough();
1485+
spy.calls.saveArgumentsByValue();
1486+
1487+
let count = 0;
1488+
Parse.Cloud.beforeSave('CloudIncrementNested', req => {
1489+
count += 1;
1490+
req.object.set('foo', 'baz');
1491+
expect(typeof req.object.get('objectField').number).toBe('number');
1492+
});
1493+
1494+
Parse.Cloud.afterSave('CloudIncrementNested', req => {
1495+
expect(typeof req.object.get('objectField').number).toBe('number');
1496+
});
1497+
1498+
const obj = new Parse.Object('CloudIncrementNested');
1499+
obj.set('objectField', { number: 5 });
1500+
obj.set('foo', 'bar');
1501+
await obj.save();
1502+
1503+
obj.increment('objectField.number', 10);
1504+
await obj.save();
1505+
1506+
const [
1507+
,
1508+
,
1509+
,
1510+
/* className */ /* schema */ /* query */ update,
1511+
] = adapter.findOneAndUpdate.calls.first().args;
1512+
expect(update).toEqual({
1513+
'objectField.number': { __op: 'Increment', amount: 10 },
1514+
foo: 'baz',
1515+
updatedAt: obj.updatedAt.toISOString(),
1516+
});
1517+
1518+
count === 2 ? done() : fail();
1519+
});
1520+
14821521
/**
14831522
* Verifies that an afterSave hook throwing an exception
14841523
* will not prevent a successful save response from being returned

0 commit comments

Comments
 (0)