Skip to content

Commit

Permalink
build: Release (#2196)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Jun 29, 2024
2 parents 8b40289 + 6a00e76 commit 58d61f4
Show file tree
Hide file tree
Showing 8 changed files with 1,390 additions and 3,172 deletions.
7 changes: 7 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [5.2.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/5.2.0-alpha.3...5.2.0-alpha.4) (2024-06-28)


### Bug Fixes

* Dot notation on JSON arrays doesn't work on `PushStatus` offset fields ([#2194](https://github.com/parse-community/Parse-SDK-JS/issues/2194)) ([e0eb6f0](https://github.com/parse-community/Parse-SDK-JS/commit/e0eb6f04e086da4628a9706b17909d11e5f06210))

# [5.2.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/5.2.0-alpha.2...5.2.0-alpha.3) (2024-06-24)


Expand Down
8 changes: 5 additions & 3 deletions integration/test/ParseEventuallyQueueTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ describe('Parse EventuallyQueue', () => {
it('can saveEventually', async () => {
const parseServer = await reconfigureServer();
const object = new TestObject({ hash: 'saveSecret' });
await parseServer.handleShutdown();
await new Promise(resolve => parseServer.server.close(resolve));
await object.saveEventually();

Expand Down Expand Up @@ -224,15 +225,15 @@ describe('Parse EventuallyQueue', () => {
const acl = new Parse.ACL(user);
const object = new TestObject({ hash: 'saveSecret' });
object.setACL(acl);

await parseServer.handleShutdown();
await new Promise(resolve => parseServer.server.close(resolve));
await object.saveEventually();

const length = await Parse.EventuallyQueue.length();
assert(Parse.EventuallyQueue.isPolling());
assert.strictEqual(length, 1);

await reconfigureServer({});
await reconfigureServer();

while (Parse.EventuallyQueue.isPolling()) {
await sleep(100);
Expand All @@ -250,14 +251,15 @@ describe('Parse EventuallyQueue', () => {
const parseServer = await reconfigureServer();
const object = new TestObject({ hash: 'deleteSecret' });
await object.save();
await parseServer.handleShutdown();
await new Promise(resolve => parseServer.server.close(resolve));
await object.destroyEventually();
const length = await Parse.EventuallyQueue.length();

assert(Parse.EventuallyQueue.isPolling());
assert.strictEqual(length, 1);

await reconfigureServer({});
await reconfigureServer();
while (Parse.EventuallyQueue.isPolling()) {
await sleep(100);
}
Expand Down
1 change: 1 addition & 0 deletions integration/test/ParseServerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('ParseServer', () => {
it('can reconfigure server', async () => {
const parseServer = await reconfigureServer({ serverURL: 'www.google.com' });
assert.strictEqual(parseServer.config.serverURL, 'www.google.com');
await parseServer.handleShutdown();
await new Promise(resolve => parseServer.server.close(resolve));
await reconfigureServer();
});
Expand Down
13 changes: 7 additions & 6 deletions integration/test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ const defaultConfiguration = {

const openConnections = {};
let parseServer;
let server;

const reconfigureServer = async (changedConfiguration = {}) => {
if (server) {
if (parseServer) {
await parseServer.handleShutdown();
await new Promise(resolve => server.close(resolve));
await new Promise(resolve => parseServer.server.close(resolve));
parseServer = undefined;
server = undefined;
return reconfigureServer(changedConfiguration);
}

Expand All @@ -110,6 +108,10 @@ const reconfigureServer = async (changedConfiguration = {}) => {
port,
});
parseServer = await ParseServer.startApp(newConfiguration);
if (parseServer.config.state === 'initialized') {
console.error('Failed to initialize Parse Server');
return reconfigureServer(newConfiguration);
}
const app = parseServer.expressApp;
for (const fileName of ['parse.js', 'parse.min.js']) {
const file = fs.readFileSync(path.resolve(__dirname, `./../../dist/${fileName}`)).toString();
Expand All @@ -136,8 +138,7 @@ const reconfigureServer = async (changedConfiguration = {}) => {
res.send('{}');
});
});
server = parseServer.server;
server.on('connection', connection => {
parseServer.server.on('connection', connection => {
const key = `${connection.remoteAddress}:${connection.remotePort}`;
openConnections[key] = connection;
connection.on('close', () => {
Expand Down
Loading

0 comments on commit 58d61f4

Please sign in to comment.