Skip to content

Commit 75d0efa

Browse files
authored
⚡️ Release 2.18.0 (#1248)
* ⚡️ Release 2.18.0 * Improve build speed
1 parent 1f2ca1f commit 75d0efa

File tree

5 files changed

+76
-43
lines changed

5 files changed

+76
-43
lines changed

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
# Parse-SDK-JS
22

33
### master
4-
[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/2.17.0...master)
4+
[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/2.18.0...master)
5+
6+
## 2.18.0
7+
[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/2.17.0...2.18.0)
8+
9+
**Features**
10+
- Support query.findAll() ([#1233](https://github.com/parse-community/Parse-SDK-JS/pull/1233))
11+
12+
**Improvements**
13+
- Pass objects into query.equalTo / query.notEqualTo ([#1235](https://github.com/parse-community/Parse-SDK-JS/pull/1235))
14+
- Improving legacy initialization setters/getters ([#1237](https://github.com/parse-community/Parse-SDK-JS/pull/1237))
15+
- Remove deprecated backbone options from Parse.Push ([#1238](https://github.com/parse-community/Parse-SDK-JS/pull/1238))
16+
- Code Coverage and Unit Tests ([#1241](https://github.com/parse-community/Parse-SDK-JS/pull/1241))
17+
18+
**Fixes**
19+
- Prevent crashing LiveQueryClient if emitter error is not set ([#1241](https://github.com/parse-community/Parse-SDK-JS/pull/1241))
20+
- Handle LiveQuery subscription socket error ([#1241](https://github.com/parse-community/Parse-SDK-JS/pull/1241))
21+
- Set WeChat socket handlers before connecting ([#1241](https://github.com/parse-community/Parse-SDK-JS/pull/1241))
22+
- Parse.Installation validating attribute error ([#1241](https://github.com/parse-community/Parse-SDK-JS/pull/1241))
523

624
## 2.17.0
725
[Full Changelog](https://github.com/parse-community/Parse-SDK-JS/compare/2.16.0...2.17.0)

build_releases.js

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const pkg = require('./package.json');
22
const fs = require('fs');
33
const path = require('path');
4-
const { execSync } = require('child_process');
4+
const { exec } = require('child_process');
55

66
const rmDir = function(dirPath) {
7-
if(fs.existsSync(dirPath)) {
7+
if (fs.existsSync(dirPath)) {
88
const files = fs.readdirSync(dirPath);
99
files.forEach(function(file) {
1010
const curPath = path.join(dirPath, file);
11-
if(fs.lstatSync(curPath).isDirectory()) {
11+
if (fs.lstatSync(curPath).isDirectory()) {
1212
rmDir(curPath);
1313
} else {
1414
fs.unlinkSync(curPath);
@@ -18,8 +18,18 @@ const rmDir = function(dirPath) {
1818
}
1919
};
2020

21-
const exec = function(cmd) {
22-
execSync(cmd, { stdio: 'inherit' });
21+
const execCommand = function(cmd) {
22+
return new Promise((resolve, reject) => {
23+
exec(cmd, (error, stdout, stderr) => {
24+
if (error) {
25+
console.warn(error);
26+
return reject(error);
27+
}
28+
const output = stdout ? stdout : stderr;
29+
console.log(output);
30+
resolve(output);
31+
});
32+
});
2333
};
2434

2535
console.log(`Building JavaScript SDK v${pkg.version}...\n`)
@@ -32,20 +42,25 @@ rmDir(path.join(__dirname, 'lib'));
3242
const crossEnv = 'npm run cross-env';
3343
const gulp = 'npm run gulp';
3444

35-
console.log('Browser Release:');
36-
exec(`${crossEnv} PARSE_BUILD=browser ${gulp} compile`);
37-
38-
console.log('Weapp Release:');
39-
exec(`${crossEnv} PARSE_BUILD=weapp ${gulp} compile`);
40-
41-
console.log('Node.js Release:');
42-
exec(`${crossEnv} PARSE_BUILD=node ${gulp} compile`);
43-
44-
console.log('React Native Release:');
45-
exec(`${crossEnv} PARSE_BUILD=react-native ${gulp} compile`);
45+
(async function() {
46+
console.log('Browser Release:');
47+
console.log('Weapp Release:');
48+
console.log('Node.js Release:');
49+
console.log('React Native Release:');
50+
await Promise.all([
51+
execCommand(`${crossEnv} PARSE_BUILD=browser ${gulp} compile`),
52+
execCommand(`${crossEnv} PARSE_BUILD=weapp ${gulp} compile`),
53+
execCommand(`${crossEnv} PARSE_BUILD=node ${gulp} compile`),
54+
execCommand(`${crossEnv} PARSE_BUILD=react-native ${gulp} compile`),
55+
]);
4656

47-
console.log('Bundling and minifying for CDN distribution:');
48-
exec(`${gulp} browserify`);
49-
exec(`${gulp} browserify-weapp`);
50-
exec(`${gulp} minify`);
51-
exec(`${gulp} minify-weapp`);
57+
console.log('Bundling and minifying for CDN distribution:');
58+
await Promise.all([
59+
execCommand(`${gulp} browserify`),
60+
execCommand(`${gulp} browserify-weapp`),
61+
]);
62+
await Promise.all([
63+
execCommand(`${gulp} minify`),
64+
execCommand(`${gulp} minify-weapp`),
65+
]);
66+
}());

gulpfile.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
var babel = require('gulp-babel');
2-
var browserify = require('browserify');
3-
var derequire = require('gulp-derequire');
4-
var gulp = require('gulp');
5-
var insert = require('gulp-insert');
6-
var path = require('path');
7-
var rename = require('gulp-rename');
8-
var source = require('vinyl-source-stream');
9-
var uglify = require('gulp-uglify');
10-
var watch = require('gulp-watch');
1+
const babel = require('gulp-babel');
2+
const browserify = require('browserify');
3+
const derequire = require('gulp-derequire');
4+
const gulp = require('gulp');
5+
const insert = require('gulp-insert');
6+
const path = require('path');
7+
const rename = require('gulp-rename');
8+
const source = require('vinyl-source-stream');
9+
const uglify = require('gulp-uglify');
10+
const watch = require('gulp-watch');
1111

12-
var BUILD = process.env.PARSE_BUILD || 'browser';
13-
var VERSION = require('./package.json').version;
12+
const BUILD = process.env.PARSE_BUILD || 'browser';
13+
const VERSION = require('./package.json').version;
1414

15-
var transformRuntime = ["@babel/plugin-transform-runtime", {
15+
const transformRuntime = ["@babel/plugin-transform-runtime", {
1616
"corejs": 3,
1717
"helpers": true,
1818
"regenerator": true,
1919
"useESModules": false
2020
}];
2121

22-
var PRESETS = {
22+
const PRESETS = {
2323
'browser': [["@babel/preset-env", {
2424
"targets": "> 0.25%, not dead"
2525
}], '@babel/preset-react'],
@@ -31,7 +31,7 @@ var PRESETS = {
3131
}]],
3232
'react-native': ['module:metro-react-native-babel-preset'],
3333
};
34-
var PLUGINS = {
34+
const PLUGINS = {
3535
'browser': [transformRuntime, '@babel/plugin-transform-flow-comments', '@babel/plugin-proposal-class-properties', 'inline-package-json',
3636
['transform-inline-environment-variables', {'exclude': ['SERVER_RENDERING']}]],
3737
'weapp': [transformRuntime, '@babel/plugin-transform-flow-comments', '@babel/plugin-proposal-class-properties', 'inline-package-json',
@@ -40,7 +40,7 @@ var PLUGINS = {
4040
'react-native': ['@babel/plugin-transform-flow-comments', 'inline-package-json', 'transform-inline-environment-variables']
4141
};
4242

43-
var DEV_HEADER = (
43+
const DEV_HEADER = (
4444
'/**\n' +
4545
' * Parse JavaScript SDK v' + VERSION + '\n' +
4646
' *\n' +
@@ -49,7 +49,7 @@ var DEV_HEADER = (
4949
' */\n'
5050
);
5151

52-
var FULL_HEADER = (
52+
const FULL_HEADER = (
5353
'/**\n' +
5454
' * Parse JavaScript SDK v' + VERSION + '\n' +
5555
' *\n' +
@@ -78,7 +78,7 @@ gulp.task('compile', function() {
7878
});
7979

8080
gulp.task('browserify', function(cb) {
81-
var stream = browserify({
81+
const stream = browserify({
8282
builtins: ['_process', 'events'],
8383
entries: 'lib/browser/Parse.js',
8484
standalone: 'Parse'
@@ -97,7 +97,7 @@ gulp.task('browserify', function(cb) {
9797

9898

9999
gulp.task('browserify-weapp', function(cb) {
100-
var stream = browserify({
100+
const stream = browserify({
101101
builtins: ['_process', 'events'],
102102
entries: 'lib/weapp/Parse.js',
103103
standalone: 'Parse'

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse",
3-
"version": "2.17.0",
3+
"version": "2.18.0",
44
"description": "The Parse JavaScript SDK",
55
"homepage": "https://parseplatform.org/",
66
"keywords": [

0 commit comments

Comments
 (0)