diff --git a/CHANGELOG.md b/CHANGELOG.md index a9082e449..7082482cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,26 @@ # Parse-SDK-JS ### master -[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/3.1.0...master) -- Add className argument to Parse Object subclass constructor ([#1315](https://github.com/parse-community/Parse-SDK-JS/pull/1315)) +[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/3.2.0...master) + +## 3.2.0 +[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/3.1.0...3.2.0) + +**Breaking Changes** +- Remove deletion of Anonymous User on logout ([#1324](https://github.com/parse-community/Parse-SDK-JS/pull/1324)) +See https://community.parseplatform.org/t/anonymous-user-destroyed-on-logout/1425 + +**Improvements** +- Allow multiple classNames for `Parse.Object.registerSubclass` ([#1315](https://github.com/parse-community/Parse-SDK-JS/pull/1315)) +``` +const classNames = ['ClassOne', 'ClassTwo', 'ClassThree']; +for (const className of classNames) { + Parse.Object.registerSubclass(className, CustomClass); +} +``` + +**Fixes** +- Fixes build for WeChat WeApp, to reduce package size, see [issue/#1331](https://github.com/parse-community/Parse-SDK-JS/issues/1331) ## 3.1.0 [Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/3.0.0...3.1.0) diff --git a/integration/test/helper.js b/integration/test/helper.js index 68a9007b4..fed29da4f 100644 --- a/integration/test/helper.js +++ b/integration/test/helper.js @@ -1,5 +1,8 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000; +const { SpecReporter } = require('jasmine-spec-reporter'); +jasmine.getEnv().addReporter(new SpecReporter()); + const ParseServer = require('parse-server').default; const CustomAuth = require('./CustomAuth'); const sleep = require('./sleep'); @@ -9,6 +12,7 @@ const Parse = require('../../node'); const port = 1337; const mountPath = '/parse'; const serverURL = 'http://localhost:1337/parse'; +let didChangeConfiguration = false; const defaultConfiguration = { databaseURI: 'mongodb://localhost:27017/integration', @@ -68,7 +72,7 @@ const destroyAliveConnections = function () { let parseServer; let server; -const reconfigureServer = changedConfiguration => { +const reconfigureServer = (changedConfiguration = {}) => { return new Promise((resolve, reject) => { if (server) { return parseServer.handleShutdown().then(() => { @@ -80,6 +84,7 @@ const reconfigureServer = changedConfiguration => { }); } try { + didChangeConfiguration = Object.keys(changedConfiguration).length !== 0; const newConfiguration = Object.assign({}, defaultConfiguration, changedConfiguration || {}, { serverStartComplete: error => { if (error) { @@ -124,7 +129,7 @@ global.reconfigureServer = reconfigureServer; beforeAll(async () => { await reconfigureServer(); Parse.initialize('integration'); - Parse.CoreManager.set('SERVER_URL', 'http://localhost:1337/parse'); + Parse.CoreManager.set('SERVER_URL', serverURL); Parse.CoreManager.set('MASTER_KEY', 'notsosecret'); }); @@ -135,4 +140,7 @@ afterEach(async () => { destroyAliveConnections(); // Connection close events are not immediate on node 10+... wait a bit await sleep(0); + if (didChangeConfiguration) { + await reconfigureServer(); + } }); diff --git a/package-lock.json b/package-lock.json index e5921d99b..aecb50558 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "parse", - "version": "3.1.0", + "version": "3.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -8273,6 +8273,15 @@ "xmldom": "^0.1.22" } }, + "jasmine-spec-reporter": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-6.0.0.tgz", + "integrity": "sha512-MvTOVoMxDZAftQYBApIlSfKnGMzi9cj351nXeqtnZTuXffPlbONN31+Es7F+Ke4okUeQ2xISukt4U1npfzLVrQ==", + "dev": true, + "requires": { + "colors": "1.4.0" + } + }, "jest": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", diff --git a/package.json b/package.json index f9309dd48..81f2492e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "parse", - "version": "3.1.0", + "version": "3.2.0", "description": "The Parse JavaScript SDK", "homepage": "https://parseplatform.org/", "keywords": [ @@ -69,6 +69,7 @@ "husky": "4.3.5", "jasmine": "3.5.0", "jasmine-reporters": "2.3.2", + "jasmine-spec-reporter": "6.0.0", "jest": "24.9.0", "jsdoc": "3.6.3", "jsdoc-babel": "0.5.0",