Skip to content

build: Release #1664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c8709bd
Update ci.yml
dblythy Nov 6, 2022
a0e662a
add node 15
dblythy Nov 8, 2022
1941e75
Merge branch 'alpha' into add-node-16
dblythy Nov 8, 2022
adee155
fix incorrect node version key
mtrezza Nov 10, 2022
e06b1f9
upgrade node versions
mtrezza Nov 10, 2022
da629de
fix node 18 build
mtrezza Nov 10, 2022
bc04b4b
fix: Remove support for Node <14 (#1603)
dblythy Nov 10, 2022
1134c8a
chore(release): 4.0.0-alpha.1 [skip ci]
semantic-release-bot Nov 10, 2022
2c63a95
Merge branch 'alpha' into add-node-16
mtrezza Nov 10, 2022
ec88a1e
remove node 12, 15 from CI
mtrezza Nov 10, 2022
d84c576
switch back to ubuntu 18.04
mtrezza Nov 10, 2022
d3aa856
use latest
mtrezza Nov 10, 2022
43502a9
remove mongodb env var
mtrezza Nov 10, 2022
744b721
refactor: Bump parse-server from `81304be` to `7cb266b` (#1607)
dependabot[bot] Nov 10, 2022
5ef2f0f
Merge branch 'alpha' into add-node-16
mtrezza Nov 10, 2022
041bd09
remove localhost
dblythy Nov 11, 2022
27e119d
Update helper.js
dblythy Nov 11, 2022
34175f8
add dns
dblythy Nov 15, 2022
75ba9c5
Update helper.js
dblythy Nov 15, 2022
96d7174
fix: `Parse.Query.subscribe()` does not return a rejected promise on …
dblythy Nov 15, 2022
e180bac
chore(release): 4.0.0-alpha.2 [skip ci]
semantic-release-bot Nov 15, 2022
31dac3b
Merge branch 'alpha' into add-node-16
mtrezza Nov 15, 2022
9198b4e
Update LiveQueryClient-test.js
dblythy Nov 16, 2022
782c057
docs: fix PR template
mtrezza Nov 16, 2022
80d38fc
Merge branch 'alpha' into add-node-16
dblythy Nov 16, 2022
6125419
perf: Avoid CORS preflight request by removing upload listener when n…
ricmatsui Nov 18, 2022
17374a3
chore(release): 4.0.0-alpha.3 [skip ci]
semantic-release-bot Nov 18, 2022
8f3becb
Merge branch 'alpha' into add-node-16
mtrezza Nov 19, 2022
5c14029
ci: Add concurrency to cancel previous workflow runs (#1617)
dblythy Nov 22, 2022
21f6e30
Merge branch 'alpha' into add-node-16
dblythy Nov 27, 2022
ed5fbf5
docs: update React Native AsyncStorage module
dplewis Nov 28, 2022
2c79a31
feat: Add Node 16 and 18 support (#1598)
mtrezza Dec 21, 2022
f714763
chore(release): 4.0.0-alpha.4 [skip ci]
semantic-release-bot Dec 21, 2022
c8ac62f
Merge branch 'alpha' into dplewis-patch-2
mtrezza Dec 22, 2022
8ed0fab
feat: Add node 19 support
dblythy Dec 29, 2022
ba07e51
Update ci.yml
dblythy Dec 29, 2022
1f81573
Update ci.yml
dblythy Dec 29, 2022
82e9d53
docs: Update React Native AsyncStorage module (#1625)
mtrezza Jan 4, 2023
0b2985c
Merge branch 'alpha' into node-19
mtrezza Jan 5, 2023
dfb5196
feat: Add Node 19 support (#1643)
mtrezza Jan 6, 2023
5dabffb
chore(release): 4.0.0-alpha.5 [skip ci]
semantic-release-bot Jan 6, 2023
7e1ed12
ci: Add support for Parse Server 6 (#1641)
dblythy Jan 9, 2023
6870a13
test: Change tests to use native MongoDB aggregation pipeline syntax …
dblythy Jan 16, 2023
92624b7
ci: Fix release workflow (#1656)
mtrezza Jan 16, 2023
f4bfbd2
refactor: Bump parse-server from `62b3426` to `eb0311b` (#1655)
dependabot[bot] Jan 16, 2023
5b31b9f
Merge branch 'beta' into release-beta
mtrezza Jan 20, 2023
4e94c2d
build: Release beta (#1658)
mtrezza Jan 23, 2023
81607f6
chore(release): 4.0.0-beta.1 [skip ci]
semantic-release-bot Jan 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
### Issue Description
<!-- Add a brief description of the issue this PR solves. -->

Related issue: #`FILL_THIS_OUT`
Closes: FILL_THIS_OUT

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

- [ ] Add tests
- [ ] Add entry to changelog
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,31 @@ jobs:
with:
version: 1
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
timeout-minutes: 30
env:
MONGODB_VERSION: 3.6.9
strategy:
matrix:
include:
- name: Node 14
NODE_VERSION: 14.21.1
- name: Node 16
NODE_VERSION: 16.18.1
- name: Node 18
NODE_VERSION: 18.12.1
- name: Node 19
NODE_VERSION: 19.3.0
fail-fast: false
steps:
- name: Fix usage of insecure GitHub protocol
run: sudo git config --system url."https://github".insteadOf "git://github"
- name: Fix git protocol for Node 14
if: ${{ startsWith(matrix.NODE_VERSION, '14.') }}
run: sudo git config --system url."https://github".insteadOf "ssh://git@github"
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14
node-version: ${{ matrix.NODE_VERSION }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -45,3 +58,6 @@ jobs:
env:
CI: true
- run: bash <(curl -s https://codecov.io/bash)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
4 changes: 2 additions & 2 deletions .github/workflows/release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Cache Node.js modules
uses: actions/cache@v2
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![Snyk Badge](https://snyk.io/test/github/parse-community/Parse-SDK-JS/badge.svg)](https://snyk.io/test/github/parse-community/Parse-SDK-JS)
[![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)

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

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

- [Getting Started](#getting-started)
- [Using Parse on Different Platforms](#using-parse-on-different-platforms)
- [Compatibility](#compatibility)
- [Upgrading to Parse SDK 2.0.0](#upgrading-to-parse-sdk-200)
- [3rd Party Authentications](#3rd-party-authentications)
- [Want to ride the bleeding edge?](#want-to-ride-the-bleeding-edge)
Expand Down Expand Up @@ -71,7 +72,7 @@ For React Native applications, include `'parse/react-native.js'`:
const Parse = require('parse/react-native.js');

// On React Native >= 0.50 and Parse >= 1.11.0, set the Async
const AsyncStorage = require('react-native').AsyncStorage;
const AsyncStorage = require('@react-native-async-storage/async-storage');
Parse.setAsyncStorage(AsyncStorage);
```

Expand All @@ -89,6 +90,20 @@ $ npm install @types/parse

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

## Compatibility

### Node.js

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.

| Version | Latest Version | End-of-Life | Compatible |
|------------|----------------|-------------|------------|
| Node.js 14 | 14.19.1 | April 2023 | ✅ Yes |
| Node.js 16 | 16.19.0 | September 2023 | ✅ Yes |
| Node.js 18 | 18.12.1 | April 2025 | ✅ Yes |
| Node.js 19 | 19.3.0 | June 2023 | ✅ Yes |


## Upgrading to Parse SDK 2.0.0

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

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].


[3rd-party-auth]: http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
[contributing]: https://github.com/parse-community/Parse-SDK-JS/blob/master/CONTRIBUTING.md
[custom-auth-module]: https://docs.parseplatform.org/js/guide/#custom-authentication-module
[link-with]: https://docs.parseplatform.org/js/guide/#linking-users
[migration]: https://github.com/parse-community/Parse-SDK-JS/blob/master/2.0.0.md
[open-collective-link]: https://opencollective.com/parse-server
[types-parse]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse
[types-parse]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse
[license-link]: LICENSE
2 changes: 1 addition & 1 deletion babel-jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const babelJest = require('babel-jest');
module.exports = babelJest.createTransformer({
presets: [["@babel/preset-env", {
"targets": {
"node": "8"
"node": "14"
},
useBuiltIns: 'entry',
corejs: 3,
Expand Down
46 changes: 46 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
# [4.0.0-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/4.0.0-alpha.4...4.0.0-alpha.5) (2023-01-06)


### Features

* Add node 19 support ([8ed0fab](https://github.com/parse-community/Parse-SDK-JS/commit/8ed0faba400642571ff90b9645a6e4fcef16c475))
* Add Node 19 support ([#1643](https://github.com/parse-community/Parse-SDK-JS/issues/1643)) ([dfb5196](https://github.com/parse-community/Parse-SDK-JS/commit/dfb5196ea135e2e7bfbfa9df443162a144ec9ee4))

# [4.0.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/4.0.0-alpha.3...4.0.0-alpha.4) (2022-12-21)


### Features

* Add Node 16 and 18 support ([#1598](https://github.com/parse-community/Parse-SDK-JS/issues/1598)) ([2c79a31](https://github.com/parse-community/Parse-SDK-JS/commit/2c79a31201d569b645eea475290c9ed0266227fc))

# [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)


### Performance Improvements

* 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))

# [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)


### Bug Fixes

* `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))


### BREAKING CHANGES

* 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))

# [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)


### Bug Fixes

* 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))


### BREAKING CHANGES

* This release removes support for Node versions <14 ([bc04b4b](bc04b4b))

## [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)


Expand Down
24 changes: 24 additions & 0 deletions changelogs/CHANGELOG_beta.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# [4.0.0-beta.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.1...4.0.0-beta.1) (2023-01-23)


### Bug Fixes

* `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))
* 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))

### Features

* Add Node 16 and 18 support ([#1598](https://github.com/parse-community/Parse-SDK-JS/issues/1598)) ([2c79a31](https://github.com/parse-community/Parse-SDK-JS/commit/2c79a31201d569b645eea475290c9ed0266227fc))
* Add node 19 support ([8ed0fab](https://github.com/parse-community/Parse-SDK-JS/commit/8ed0faba400642571ff90b9645a6e4fcef16c475))
* Add Node 19 support ([#1643](https://github.com/parse-community/Parse-SDK-JS/issues/1643)) ([dfb5196](https://github.com/parse-community/Parse-SDK-JS/commit/dfb5196ea135e2e7bfbfa9df443162a144ec9ee4))

### Performance Improvements

* 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))


### BREAKING CHANGES

* 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))
* This release removes support for Node versions <14 ([bc04b4b](bc04b4b))

## [3.5.1-beta.2](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.1-beta.1...3.5.1-beta.2) (2022-11-26)


Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const PRESETS = {
"targets": "> 0.25%, not dead"
}], '@babel/react'],
'node': [["@babel/preset-env", {
"targets": { "node": "8" }
"targets": { "node": "14" }
}]],
'react-native': ['module:metro-react-native-babel-preset'],
};
Expand Down
52 changes: 52 additions & 0 deletions integration/test/ParseLiveQueryTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,56 @@ describe('Parse LiveQuery', () => {
object.set({ foo: 'bar' });
await object.save();
});

it('live query can handle beforeConnect and beforeSubscribe errors', async () => {
await reconfigureServer({
cloud({ Cloud }) {
Cloud.beforeSubscribe('TestError', () => {
throw 'not allowed to subscribe';
});
},
});
const client = new Parse.LiveQueryClient({
applicationId: 'integration',
serverURL: 'ws://localhost:1337',
javascriptKey: null,
masterKey: null,
sessionToken: null,
installationId: null,
});
client.open();
const query = new Parse.Query('TestError');
const subscription = client.subscribe(query);
await expectAsync(subscription.subscribePromise).toBeRejectedWith(
new Parse.Error(141, 'not allowed to subscribe')
);
client.close();
});

it('connectPromise does throw', async () => {
await reconfigureServer({
cloud({ Cloud }) {
Cloud.beforeConnect(params => {
if (params.sessionToken === 'testToken') {
throw 'not allowed to connect';
}
});
},
});
const client = new Parse.LiveQueryClient({
applicationId: 'integration',
serverURL: 'ws://localhost:1337',
javascriptKey: null,
masterKey: null,
sessionToken: 'testToken',
installationId: null,
});
client.open();
const query = new Parse.Query('TestError');
const subscription = client.subscribe(query);
await expectAsync(subscription.subscribePromise).toBeRejectedWith(
new Parse.Error(141, 'not allowed to connect')
);
client.close();
});
});
63 changes: 25 additions & 38 deletions integration/test/ParseObjectTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1644,49 +1644,36 @@ describe('Parse Object', () => {
});
});

it('merges user attributes on fetchAll', done => {
it('merges user attributes on fetchAll', async () => {
Parse.User.enableUnsafeCurrentUser();
let sameUser;
const acl = new Parse.ACL();
acl.setPublicReadAccess(true);
let user = new Parse.User();
user.set('username', 'asdf');
user.set('password', 'zxcv');
user.set('foo', 'bar');
user
.signUp()
.then(() => {
Parse.User.logOut();
const query = new Parse.Query(Parse.User);
return query.get(user.id);
})
.then(userAgain => {
user = userAgain;
sameUser = new Parse.User();
sameUser.set('username', 'asdf');
sameUser.set('password', 'zxcv');
return sameUser.logIn();
})
.then(() => {
assert(!user.getSessionToken());
assert(sameUser.getSessionToken());
sameUser.set('baz', 'qux');
return sameUser.save();
})
.then(() => {
return Parse.Object.fetchAll([user]);
})
.then(() => {
assert.equal(user.createdAt.getTime(), sameUser.createdAt.getTime());
assert.equal(user.updatedAt.getTime(), sameUser.updatedAt.getTime());
return Parse.User.logOut().then(
() => {
done();
},
() => {
done();
}
);
})
.catch(done.fail);
user.setACL(acl);
await user.signUp();

Parse.User.logOut();
const query = new Parse.Query(Parse.User);
user = await query.get(user.id);

const sameUser = new Parse.User();
sameUser.set('username', 'asdf');
sameUser.set('password', 'zxcv');
sameUser.setACL(acl);
await sameUser.logIn();

assert(!user.getSessionToken());
assert(sameUser.getSessionToken());
sameUser.set('baz', 'qux');
await sameUser.save();

await Parse.Object.fetchAll([user]);
assert.equal(user.createdAt.getTime(), sameUser.createdAt.getTime());
assert.equal(user.updatedAt.getTime(), sameUser.updatedAt.getTime());
await Parse.User.logOut();
});

it('can fetchAllIfNeededWithInclude', async () => {
Expand Down
Loading