Skip to content

Commit 2afb4af

Browse files
authored
Merge branch 'alpha' into increase-coverage
2 parents 79ae3c0 + 2830021 commit 2afb4af

18 files changed

+503
-103
lines changed

.github/workflows/release-automated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- run: npx semantic-release
3131
env:
3232
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
3434
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3535
- name: Determine tag on current commit
3636
id: tag

changelogs/CHANGELOG_beta.md

Lines changed: 176 additions & 0 deletions
Large diffs are not rendered by default.

changelogs/CHANGELOG_release.md

Lines changed: 155 additions & 0 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 61 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "5.0.0-alpha.29",
3+
"version": "5.1.1",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -69,6 +69,7 @@
6969
"@babel/plugin-transform-flow-strip-types": "7.9.0",
7070
"@babel/preset-env": "7.10.0",
7171
"@parse/minami": "1.0.0",
72+
"@saithodev/semantic-release-backmerge": "2.1.2",
7273
"@semantic-release/changelog": "5.0.1",
7374
"@semantic-release/commit-analyzer": "8.0.1",
7475
"@semantic-release/git": "9.0.0",

release.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ async function config() {
8383
['@semantic-release/git', {
8484
assets: [changelogFile, 'package.json', 'package-lock.json', 'npm-shrinkwrap.json'],
8585
}],
86+
[
87+
"@saithodev/semantic-release-backmerge",
88+
{
89+
"branches": [
90+
{ from: "beta", to: "alpha" },
91+
{ from: "release", to: "beta" },
92+
{ from: "release", to: "alpha" },
93+
]
94+
}
95+
],
8696
['@semantic-release/github', {
8797
successComment: getReleaseComment(),
8898
labels: ['type:ci'],

spec/AuthenticationAdapters.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,7 +1722,9 @@ describe('Apple Game Center Auth adapter', () => {
17221722
await gcenter.validateAuthData(authData);
17231723
fail();
17241724
} catch (e) {
1725-
expect(e.message).toBe('Apple Game Center - invalid publicKeyUrl: http://static.gc.apple.com/public-key/gc-prod-4.cer');
1725+
expect(e.message).toBe(
1726+
'Apple Game Center - invalid publicKeyUrl: http://static.gc.apple.com/public-key/gc-prod-4.cer'
1727+
);
17261728
}
17271729
});
17281730
});

spec/Idempotency.spec.js

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,28 +93,31 @@ describe('Idempotency', () => {
9393
expect(counter).toBe(2);
9494
});
9595

96-
it_only_db('postgres')('should delete request entry when postgress ttl function is called', async () => {
97-
const client = Config.get(Parse.applicationId).database.adapter._client;
98-
let counter = 0;
99-
Parse.Cloud.define('myFunction', () => {
100-
counter++;
101-
});
102-
const params = {
103-
method: 'POST',
104-
url: 'http://localhost:8378/1/functions/myFunction',
105-
headers: {
106-
'X-Parse-Application-Id': Parse.applicationId,
107-
'X-Parse-Master-Key': Parse.masterKey,
108-
'X-Parse-Request-Id': 'abc-123',
109-
},
110-
};
111-
await expectAsync(request(params)).toBeResolved();
112-
await expectAsync(request(params)).toBeRejected();
113-
await new Promise(resolve => setTimeout(resolve, maxTimeOut));
114-
await client.one('SELECT idempotency_delete_expired_records()');
115-
await expectAsync(request(params)).toBeResolved();
116-
expect(counter).toBe(2);
117-
});
96+
it_only_db('postgres')(
97+
'should delete request entry when postgress ttl function is called',
98+
async () => {
99+
const client = Config.get(Parse.applicationId).database.adapter._client;
100+
let counter = 0;
101+
Parse.Cloud.define('myFunction', () => {
102+
counter++;
103+
});
104+
const params = {
105+
method: 'POST',
106+
url: 'http://localhost:8378/1/functions/myFunction',
107+
headers: {
108+
'X-Parse-Application-Id': Parse.applicationId,
109+
'X-Parse-Master-Key': Parse.masterKey,
110+
'X-Parse-Request-Id': 'abc-123',
111+
},
112+
};
113+
await expectAsync(request(params)).toBeResolved();
114+
await expectAsync(request(params)).toBeRejected();
115+
await new Promise(resolve => setTimeout(resolve, maxTimeOut));
116+
await client.one('SELECT idempotency_delete_expired_records()');
117+
await expectAsync(request(params)).toBeResolved();
118+
expect(counter).toBe(2);
119+
}
120+
);
118121

119122
it('should enforce idempotency for cloud code jobs', async () => {
120123
let counter = 0;

spec/ParseQuery.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4777,7 +4777,7 @@ describe('Parse.Query testing', () => {
47774777
ttl: new Date(now - 2 * 24 * 60 * 60 * 1000), // 2 days ago
47784778
});
47794779

4780-
await Parse.Object.saveAll([obj1, obj2])
4780+
await Parse.Object.saveAll([obj1, obj2]);
47814781
const q1 = new Parse.Query('MyCustomObject');
47824782
q1.greaterThan('ttl', { $relativeTime: 'in 1 day' });
47834783
const results1 = await q1.find({ useMasterKey: true });
@@ -4825,8 +4825,8 @@ describe('Parse.Query testing', () => {
48254825
q.greaterThan('ttl', { $relativeTime: '-12 bananas ago' });
48264826
try {
48274827
await q.find({ useMasterKey: true });
4828-
fail("Should have thrown error");
4829-
} catch(error) {
4828+
fail('Should have thrown error');
4829+
} catch (error) {
48304830
expect(error.code).toBe(Parse.Error.INVALID_JSON);
48314831
}
48324832
});
@@ -4842,8 +4842,8 @@ describe('Parse.Query testing', () => {
48424842
q.greaterThan('nonDateField', { $relativeTime: '1 day ago' });
48434843
try {
48444844
await q.find({ useMasterKey: true });
4845-
fail("Should have thrown error");
4846-
} catch(error) {
4845+
fail('Should have thrown error');
4846+
} catch (error) {
48474847
expect(error.code).toBe(Parse.Error.INVALID_JSON);
48484848
}
48494849
});

spec/ParseServerRESTController.spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,7 @@ describe('ParseServerRESTController', () => {
186186
databaseAdapter.createObject.calls.argsFor(i + 1)[3]
187187
);
188188
}
189-
expect(results.map(result => result.get('key')).sort()).toEqual([
190-
'value1',
191-
'value2',
192-
]);
189+
expect(results.map(result => result.get('key')).sort()).toEqual(['value1', 'value2']);
193190
});
194191

195192
it('should not save anything when one operation fails in a transaction', async () => {

0 commit comments

Comments
 (0)