Skip to content

Commit 759a690

Browse files
committed
Merge remote-tracking branch 'upstream/alpha' into alpha
2 parents 4d62c21 + 5c14029 commit 759a690

32 files changed

+18824
-18372
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Dependabot dependency updates
2+
# Docs: https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "npm"
7+
# Location of package-lock.json
8+
directory: "/"
9+
# Check daily for updates
10+
schedule:
11+
interval: "daily"
12+
commit-message:
13+
# Set commit message prefix
14+
prefix: "refactor"
15+
# Define dependencies to update
16+
allow:
17+
- dependency-name: "parse-server"

.github/pull_request_template.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
### Issue Description
1212
<!-- Add a brief description of the issue this PR solves. -->
1313

14-
Related issue: #`FILL_THIS_OUT`
14+
Closes: FILL_THIS_OUT
1515

1616
### Approach
1717
<!-- Add a description of the approach in this PR. -->
@@ -23,5 +23,4 @@ Related issue: #`FILL_THIS_OUT`
2323
-->
2424

2525
- [ ] Add tests
26-
- [ ] Add entry to changelog
27-
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
26+
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ jobs:
4545
env:
4646
CI: true
4747
- run: bash <(curl -s https://codecov.io/bash)
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: true

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
---
44

5-
[![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
5+
[![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=alpha&subject=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
6+
[![Build Status CI beta](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=beta)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Abeta)
67
[![Build Status CI release](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=release)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Arelease)
78
[![Snyk Badge](https://snyk.io/test/github/parse-community/Parse-SDK-JS/badge.svg)](https://snyk.io/test/github/parse-community/Parse-SDK-JS)
89
[![Coverage](http://codecov.io/github/parse-community/Parse-SDK-JS/coverage.svg?branch=alpha)](http://codecov.io/github/parse-community/Parse-SDK-JS?branch=alpha)
910

10-
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_15-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
11+
[![Node Version](https://img.shields.io/badge/nodejs-14-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
1112
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
1213

1314
[![npm latest version](https://img.shields.io/npm/v/parse/latest.svg)](https://www.npmjs.com/package/parse)
@@ -28,6 +29,7 @@ A library that gives you access to the powerful Parse Server backend from your J
2829

2930
- [Getting Started](#getting-started)
3031
- [Using Parse on Different Platforms](#using-parse-on-different-platforms)
32+
- [Compatibility](#compatibility)
3133
- [Upgrading to Parse SDK 2.0.0](#upgrading-to-parse-sdk-200)
3234
- [3rd Party Authentications](#3rd-party-authentications)
3335
- [Want to ride the bleeding edge?](#want-to-ride-the-bleeding-edge)
@@ -88,6 +90,17 @@ $ npm install @types/parse
8890

8991
Types are updated manually after every release. If a definition doesn't exist, please submit a pull request to [@types/parse][types-parse]
9092

93+
## Compatibility
94+
95+
### Node.js
96+
97+
Parse JS SDK is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date.
98+
99+
| Version | Latest Version | End-of-Life | Compatible |
100+
|------------|----------------|-------------|------------|
101+
| Node.js 14 | 14.19.1 | April 2023 | ✅ Yes |
102+
103+
91104
## Upgrading to Parse SDK 2.0.0
92105

93106
With Parse SDK 2.0.0, gone are the backbone style callbacks and Parse.Promises.
@@ -112,12 +125,12 @@ And don't forget, if you plan to deploy it remotely, you should run `npm install
112125

113126
We really want Parse to be yours, to see it grow and thrive in the open source community. Please see the [Contributing to Parse Javascript SDK guide][contributing].
114127

115-
128+
116129
[3rd-party-auth]: http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
117130
[contributing]: https://github.com/parse-community/Parse-SDK-JS/blob/master/CONTRIBUTING.md
118131
[custom-auth-module]: https://docs.parseplatform.org/js/guide/#custom-authentication-module
119132
[link-with]: https://docs.parseplatform.org/js/guide/#linking-users
120133
[migration]: https://github.com/parse-community/Parse-SDK-JS/blob/master/2.0.0.md
121134
[open-collective-link]: https://opencollective.com/parse-server
122-
[types-parse]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse
135+
[types-parse]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse
123136
[license-link]: LICENSE

babel-jest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const babelJest = require('babel-jest');
33
module.exports = babelJest.createTransformer({
44
presets: [["@babel/preset-env", {
55
"targets": {
6-
"node": "8"
6+
"node": "14"
77
},
88
useBuiltIns: 'entry',
99
corejs: 3,

changelogs/CHANGELOG_alpha.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,84 @@
1+
# [4.0.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/4.0.0-alpha.2...4.0.0-alpha.3) (2022-11-18)
2+
3+
4+
### Performance Improvements
5+
6+
* Avoid CORS preflight request by removing upload listener when not used ([#1610](https://github.com/parse-community/Parse-SDK-JS/issues/1610)) ([6125419](https://github.com/parse-community/Parse-SDK-JS/commit/6125419e749866ffa814a4a3e696382206d5da09))
7+
8+
# [4.0.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/4.0.0-alpha.1...4.0.0-alpha.2) (2022-11-15)
9+
10+
11+
### Bug Fixes
12+
13+
* `Parse.Query.subscribe()` does not return a rejected promise on error in Cloud Code Triggers `beforeConnect` or `beforeSubscribe` ([#1490](https://github.com/parse-community/Parse-SDK-JS/issues/1490)) ([96d7174](https://github.com/parse-community/Parse-SDK-JS/commit/96d71744e4a12088f98ad33a5f7a0c06c90a0a4c))
14+
15+
16+
### BREAKING CHANGES
17+
18+
* Calling `Parse.Query.subscribe()` will now return a rejected promise if an error is thrown in Cloud Code Triggers `beforeConnect` or `beforeSubscribe`; in previous releases a resolved promise was returned, even if subscribing failed and it was necessary to create an `error.on` listener to handle these errors (#1490) ([96d7174](96d7174))
19+
20+
# [4.0.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.1-alpha.2...4.0.0-alpha.1) (2022-11-10)
21+
22+
23+
### Bug Fixes
24+
25+
* Remove support for Node <14 ([#1603](https://github.com/parse-community/Parse-SDK-JS/issues/1603)) ([bc04b4b](https://github.com/parse-community/Parse-SDK-JS/commit/bc04b4bc0c27d2f517b388dd2dfc17d463faf207))
26+
27+
28+
### BREAKING CHANGES
29+
30+
* This release removes support for Node versions <14 ([bc04b4b](bc04b4b))
31+
32+
## [3.5.1-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.1-alpha.1...3.5.1-alpha.2) (2022-11-07)
33+
34+
35+
### Bug Fixes
36+
37+
* SDK builds incorrectly since release 3.5.0 causing various bugs ([#1600](https://github.com/parse-community/Parse-SDK-JS/issues/1600)) ([f15154f](https://github.com/parse-community/Parse-SDK-JS/commit/f15154f903478f997bf127be198097a58c602594))
38+
39+
## [3.5.1-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0...3.5.1-alpha.1) (2022-11-03)
40+
41+
42+
### Bug Fixes
43+
44+
* File upload fails when uploading base64 data ([#1578](https://github.com/parse-community/Parse-SDK-JS/issues/1578)) ([03ee3ff](https://github.com/parse-community/Parse-SDK-JS/commit/03ee3ffd3e4798f9dd958ddc24b9f774cb875507))
45+
* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](https://github.com/parse-community/Parse-SDK-JS/issues/1587)) ([8aeaa4f](https://github.com/parse-community/Parse-SDK-JS/commit/8aeaa4f51e01f5763c497b5e86dca73835e2144b))
46+
47+
# [3.5.0-alpha.8](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.7...3.5.0-alpha.8) (2022-11-03)
48+
49+
50+
### Bug Fixes
51+
52+
* File upload fails when uploading base64 data ([#1578](https://github.com/parse-community/Parse-SDK-JS/issues/1578)) ([03ee3ff](https://github.com/parse-community/Parse-SDK-JS/commit/03ee3ffd3e4798f9dd958ddc24b9f774cb875507))
53+
54+
# [3.5.0-alpha.7](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.6...3.5.0-alpha.7) (2022-11-01)
55+
56+
57+
### Bug Fixes
58+
59+
* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](https://github.com/parse-community/Parse-SDK-JS/issues/1587)) ([8aeaa4f](https://github.com/parse-community/Parse-SDK-JS/commit/8aeaa4f51e01f5763c497b5e86dca73835e2144b))
60+
61+
# [3.5.0-alpha.6](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.5...3.5.0-alpha.6) (2022-10-13)
62+
63+
64+
### Bug Fixes
65+
66+
* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](https://github.com/parse-community/Parse-SDK-JS/issues/1569)) ([3560a5e](https://github.com/parse-community/Parse-SDK-JS/commit/3560a5e422f8e97aa55c1c238d333248bac7f7d6))
67+
68+
# [3.5.0-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.4...3.5.0-alpha.5) (2022-10-11)
69+
70+
71+
### Features
72+
73+
* localDatastore support for unsorted distance queries ([#1570](https://github.com/parse-community/Parse-SDK-JS/issues/1570)) ([ea3e75f](https://github.com/parse-community/Parse-SDK-JS/commit/ea3e75f1bdeb6e8c3b3e46c909f827daef1978f0))
74+
75+
# [3.5.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.3...3.5.0-alpha.4) (2022-09-21)
76+
77+
78+
### Features
79+
80+
* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](https://github.com/parse-community/Parse-SDK-JS/issues/1540)) ([68f3ff5](https://github.com/parse-community/Parse-SDK-JS/commit/68f3ff5b9a471648dcd07d35c706004eaaa173ec))
81+
182
# [3.5.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.2...3.5.0-alpha.3) (2022-09-14)
283

384

changelogs/CHANGELOG_beta.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
## [3.5.1-beta.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0...3.5.1-beta.1) (2022-11-03)
2+
3+
4+
### Bug Fixes
5+
6+
* File upload fails when uploading base64 data ([#1578](https://github.com/parse-community/Parse-SDK-JS/issues/1578)) ([03ee3ff](https://github.com/parse-community/Parse-SDK-JS/commit/03ee3ffd3e4798f9dd958ddc24b9f774cb875507))
7+
* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](https://github.com/parse-community/Parse-SDK-JS/issues/1587)) ([8aeaa4f](https://github.com/parse-community/Parse-SDK-JS/commit/8aeaa4f51e01f5763c497b5e86dca73835e2144b))
8+
9+
# [3.5.0-beta.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.4...3.5.0-beta.1) (2022-10-25)
10+
11+
12+
### Bug Fixes
13+
14+
* `Parse.User.signUp()` does not pass context to Cloud Code ([#1527](https://github.com/parse-community/Parse-SDK-JS/issues/1527)) ([53edcfd](https://github.com/parse-community/Parse-SDK-JS/commit/53edcfd7ad1bd075a6097ba3c129c5f0998ffbfa))
15+
* `Schema.addField` does not correctly add value of type `Date` ([#1544](https://github.com/parse-community/Parse-SDK-JS/issues/1544)) ([15111f7](https://github.com/parse-community/Parse-SDK-JS/commit/15111f74a658eefc71a50b6bfb3d25c7997d26a2))
16+
* creating a Parse.File with base64 string fails for some encodings ([#1517](https://github.com/parse-community/Parse-SDK-JS/issues/1517)) ([0439862](https://github.com/parse-community/Parse-SDK-JS/commit/0439862cd83dc37f8f3571b68fdaccb6b11b540d))
17+
* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](https://github.com/parse-community/Parse-SDK-JS/issues/1569)) ([3560a5e](https://github.com/parse-community/Parse-SDK-JS/commit/3560a5e422f8e97aa55c1c238d333248bac7f7d6))
18+
* remove base64 validation due to validation inefficiency ([#1543](https://github.com/parse-community/Parse-SDK-JS/issues/1543)) ([473949d](https://github.com/parse-community/Parse-SDK-JS/commit/473949d514a395cf3656b03e083e30fff6e2f22c))
19+
20+
### Features
21+
22+
* add `json` option to `Parse.Query.each()` ([#1539](https://github.com/parse-community/Parse-SDK-JS/issues/1539)) ([89fd5ec](https://github.com/parse-community/Parse-SDK-JS/commit/89fd5ec6a8e210de3946434c6c88d6de87b6635c))
23+
* add json option to query.each ([299fb0d](https://github.com/parse-community/Parse-SDK-JS/commit/299fb0d49cbbd3c95c2e8a61744bd03e93c33d36))
24+
* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](https://github.com/parse-community/Parse-SDK-JS/issues/1540)) ([68f3ff5](https://github.com/parse-community/Parse-SDK-JS/commit/68f3ff5b9a471648dcd07d35c706004eaaa173ec))
25+
* localDatastore support for unsorted distance queries ([#1570](https://github.com/parse-community/Parse-SDK-JS/issues/1570)) ([ea3e75f](https://github.com/parse-community/Parse-SDK-JS/commit/ea3e75f1bdeb6e8c3b3e46c909f827daef1978f0))
26+
127
## [3.4.4-beta.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.3...3.4.4-beta.1) (2022-07-02)
228

329

changelogs/CHANGELOG_release.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# [3.5.0](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.4...3.5.0) (2022-11-01)
2+
3+
4+
### Bug Fixes
5+
6+
* `Parse.User.signUp()` does not pass context to Cloud Code ([#1527](https://github.com/parse-community/Parse-SDK-JS/issues/1527)) ([53edcfd](https://github.com/parse-community/Parse-SDK-JS/commit/53edcfd7ad1bd075a6097ba3c129c5f0998ffbfa))
7+
* `Schema.addField` does not correctly add value of type `Date` ([#1544](https://github.com/parse-community/Parse-SDK-JS/issues/1544)) ([15111f7](https://github.com/parse-community/Parse-SDK-JS/commit/15111f74a658eefc71a50b6bfb3d25c7997d26a2))
8+
* creating a Parse.File with base64 string fails for some encodings ([#1517](https://github.com/parse-community/Parse-SDK-JS/issues/1517)) ([0439862](https://github.com/parse-community/Parse-SDK-JS/commit/0439862cd83dc37f8f3571b68fdaccb6b11b540d))
9+
* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](https://github.com/parse-community/Parse-SDK-JS/issues/1569)) ([3560a5e](https://github.com/parse-community/Parse-SDK-JS/commit/3560a5e422f8e97aa55c1c238d333248bac7f7d6))
10+
* remove base64 validation due to validation inefficiency ([#1543](https://github.com/parse-community/Parse-SDK-JS/issues/1543)) ([473949d](https://github.com/parse-community/Parse-SDK-JS/commit/473949d514a395cf3656b03e083e30fff6e2f22c))
11+
12+
### Features
13+
14+
* add `json` option to `Parse.Query.each()` ([#1539](https://github.com/parse-community/Parse-SDK-JS/issues/1539)) ([89fd5ec](https://github.com/parse-community/Parse-SDK-JS/commit/89fd5ec6a8e210de3946434c6c88d6de87b6635c))
15+
* add json option to query.each ([299fb0d](https://github.com/parse-community/Parse-SDK-JS/commit/299fb0d49cbbd3c95c2e8a61744bd03e93c33d36))
16+
* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](https://github.com/parse-community/Parse-SDK-JS/issues/1540)) ([68f3ff5](https://github.com/parse-community/Parse-SDK-JS/commit/68f3ff5b9a471648dcd07d35c706004eaaa173ec))
17+
* localDatastore support for unsorted distance queries ([#1570](https://github.com/parse-community/Parse-SDK-JS/issues/1570)) ([ea3e75f](https://github.com/parse-community/Parse-SDK-JS/commit/ea3e75f1bdeb6e8c3b3e46c909f827daef1978f0))
18+
19+
## [3.4.4](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.3...3.4.4) (2022-09-02)
20+
21+
22+
### Bug Fixes
23+
24+
* subscription to a LiveQuery containing `ParseQuery.select` overrides properties ([#1488](https://github.com/parse-community/Parse-SDK-JS/issues/1488)) ([b80eee4](https://github.com/parse-community/Parse-SDK-JS/commit/b80eee4b010b60d37b34b566880ed19f05d4c801))
25+
126
## [3.4.3](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.2...3.4.3) (2022-07-02)
227

328

gulpfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const watch = require('gulp-watch');
1212
const BUILD = process.env.PARSE_BUILD || 'browser';
1313
const VERSION = require('./package.json').version;
1414

15-
const transformRuntime = ["@babel/plugin-transform-runtime", {
15+
const transformRuntime = ["@babel/transform-runtime", {
1616
"corejs": 3,
1717
"helpers": true,
1818
"regenerator": true,
@@ -22,12 +22,12 @@ const transformRuntime = ["@babel/plugin-transform-runtime", {
2222
const PRESETS = {
2323
'browser': [["@babel/preset-env", {
2424
"targets": "> 0.25%, not dead"
25-
}], '@babel/preset-react'],
25+
}]],
2626
'weapp': [["@babel/preset-env", {
2727
"targets": "> 0.25%, not dead"
28-
}], '@babel/preset-react'],
28+
}], '@babel/react'],
2929
'node': [["@babel/preset-env", {
30-
"targets": { "node": "8" }
30+
"targets": { "node": "14" }
3131
}]],
3232
'react-native': ['module:metro-react-native-babel-preset'],
3333
};

integration/test/ParseDistTest.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const puppeteer = require('puppeteer');
2+
let page = null;
3+
for (const fileName of ['parse.js', 'parse.min.js']) {
4+
beforeAll(async () => {
5+
const browser = await puppeteer.launch();
6+
page = await browser.newPage();
7+
await page.goto(`http://localhost:1337/${fileName}`);
8+
});
9+
describe(`Parse Dist Test ${fileName}`, () => {
10+
it('can save an object', async () => {
11+
const response = await page.evaluate(async () => {
12+
const object = await new Parse.Object('TestObject').save();
13+
return object.id;
14+
});
15+
expect(response).toBeDefined();
16+
const obj = await new Parse.Query('TestObject').first();
17+
expect(obj).toBeDefined();
18+
expect(obj.id).toEqual(response);
19+
});
20+
it('can query an object', async () => {
21+
const obj = await new Parse.Object('TestObject').save();
22+
const response = await page.evaluate(async () => {
23+
const object = await new Parse.Query('TestObject').first();
24+
return object.id;
25+
});
26+
expect(response).toBeDefined();
27+
expect(obj).toBeDefined();
28+
expect(obj.id).toEqual(response);
29+
});
30+
});
31+
}

0 commit comments

Comments
 (0)