Skip to content

Commit

Permalink
Merge branch 'parse-community:alpha' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhelms authored Apr 25, 2022
2 parents 2bc68ce + fd22644 commit 47d47ff
Show file tree
Hide file tree
Showing 8 changed files with 5,185 additions and 3,409 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Determine tag on current commit
id: tag
Expand Down
7 changes: 7 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.4.2-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.1...3.4.2-alpha.1) (2022-04-09)


### Bug Fixes

* security upgrade moment from 2.29.1 to 2.29.2 ([#1472](https://github.com/parse-community/Parse-SDK-JS/issues/1472)) ([893c2a5](https://github.com/parse-community/Parse-SDK-JS/commit/893c2a5b0504740d5001e5674b8eefbaab081764))

# [3.4.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.0-alpha.2...3.4.0-alpha.3) (2021-12-05)


Expand Down
19 changes: 19 additions & 0 deletions changelogs/CHANGELOG_release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [3.4.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.0...3.4.1) (2022-01-01)


### Bug Fixes

* upgrade idb-keyval from 5.0.6 to 6.0.3 ([#1397](https://github.com/parse-community/Parse-SDK-JS/issues/1397)) ([922a6db](https://github.com/parse-community/Parse-SDK-JS/commit/922a6dbb8e8208d18d0759543962cbb4c1ae6d96))

# [3.4.0](https://github.com/parse-community/Parse-SDK-JS/compare/3.3.1...3.4.0) (2021-11-01)


### Bug Fixes

* update parse server dependency branch; recreate package lock ([#1424](https://github.com/parse-community/Parse-SDK-JS/issues/1424)) ([38455ef](https://github.com/parse-community/Parse-SDK-JS/commit/38455ef6770d108dbf2f34604dade6dc0d63a201))
* upgrade @babel/runtime from 7.14.8 to 7.15.3 ([#1404](https://github.com/parse-community/Parse-SDK-JS/issues/1404)) ([8cb321c](https://github.com/parse-community/Parse-SDK-JS/commit/8cb321cbe81d51d4bbf94c2ac2638c14a0826bf4))

### Features

* add options to enable polling and set the polling interval; fixes excessive polling ([#1419](https://github.com/parse-community/Parse-SDK-JS/issues/1419)) ([0f804b8](https://github.com/parse-community/Parse-SDK-JS/commit/0f804b8760bba619080a79da5c6d3641f112b211))

# [3.3.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.3.0...3.3.1)

### Bug Fixes
Expand Down
24 changes: 5 additions & 19 deletions integration/test/ParseUserTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const assert = require('assert');
const Parse = require('../../node');
const uuidv4 = require('uuid/v4');
const { twitterAuthData } = require('./helper');

class CustomUser extends Parse.User {
constructor(attributes) {
Expand Down Expand Up @@ -953,21 +954,13 @@ describe('Parse User', () => {

it('can link with twitter', async () => {
Parse.User.enableUnsafeCurrentUser();
const authData = {
id: 227463280,
consumer_key: '5QiVwxr8FQHbo5CMw46Z0jquF',
consumer_secret: 'p05FDlIRAnOtqJtjIt0xcw390jCcjj56QMdE9B52iVgOEb7LuK',
auth_token: '227463280-lngpMGXdnG36JiuzGfAYbKcZUPwjmcIV2NqL9hWc',
auth_token_secret: 'G1tl1R0gaYKTyxw0uYJDKRoVhM16ifyLeMwIaKlFtPkQr',
};
const user = new Parse.User();
user.setUsername(uuidv4());
user.setPassword(uuidv4());
await user.signUp();

await user.linkWith('twitter', { authData });

expect(user.get('authData').twitter.id).toBe(authData.id);
await user.linkWith('twitter', { authData: twitterAuthData });
expect(user.get('authData').twitter.id).toBe(twitterAuthData.id);
expect(user._isLinked('twitter')).toBe(true);

await user._unlinkFrom('twitter');
Expand All @@ -977,25 +970,18 @@ describe('Parse User', () => {
it('can link with twitter and facebook', async () => {
Parse.User.enableUnsafeCurrentUser();
Parse.FacebookUtils.init();
const authData = {
id: 227463280,
consumer_key: '5QiVwxr8FQHbo5CMw46Z0jquF',
consumer_secret: 'p05FDlIRAnOtqJtjIt0xcw390jCcjj56QMdE9B52iVgOEb7LuK',
auth_token: '227463280-lngpMGXdnG36JiuzGfAYbKcZUPwjmcIV2NqL9hWc',
auth_token_secret: 'G1tl1R0gaYKTyxw0uYJDKRoVhM16ifyLeMwIaKlFtPkQr',
};
const user = new Parse.User();
user.setUsername(uuidv4());
user.setPassword(uuidv4());
await user.signUp();

await user.linkWith('twitter', { authData });
await user.linkWith('twitter', { authData: twitterAuthData });
await Parse.FacebookUtils.link(user);

expect(Parse.FacebookUtils.isLinked(user)).toBe(true);
expect(user._isLinked('twitter')).toBe(true);

expect(user.get('authData').twitter.id).toBe(authData.id);
expect(user.get('authData').twitter.id).toBe(twitterAuthData.id);
expect(user.get('authData').facebook.id).toBe('test');
});

Expand Down
22 changes: 20 additions & 2 deletions integration/test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ const mountPath = '/parse';
const serverURL = 'http://localhost:1337/parse';
let didChangeConfiguration = false;

/*
To generate the auth data below, the Twitter app "GitHub CI Test App" has
been created, managed by the @ParsePlatform Twitter account. In case this
test starts to fail because the token has become invalid, generate a new
token according to the OAuth process described in the Twitter docs[1].
[1] https://developer.twitter.com/en/docs/authentication/oauth-1-0a/obtaining-user-access-tokens
*/
const twitterAuthData = {
id: '1506726799266430985',
consumer_key: 'jeQw6luN2PEWREtoFDb0FdGYf',
consumer_secret: 'VSFENh1X5UC4MLEuduHLtJDnf8Ydsh5KuSR4zZQufFCAGNtzcs',
auth_token: '1506726799266430985-NKM9tqVbPXMnLhHTLYB98SNGtxxi6v',
auth_token_secret: 'JpDVIINbqV5TK0th9nKiS1IVokZfjRj06FrXxCrkggF07',
};

const defaultConfiguration = {
databaseURI: 'mongodb://localhost:27017/integration',
appId: 'integration',
Expand All @@ -34,8 +50,8 @@ const defaultConfiguration = {
appIds: 'test',
},
twitter: {
consumer_key: '5QiVwxr8FQHbo5CMw46Z0jquF',
consumer_secret: 'p05FDlIRAnOtqJtjIt0xcw390jCcjj56QMdE9B52iVgOEb7LuK',
consumer_key: twitterAuthData.consumer_key,
consumer_secret: twitterAuthData.consumer_secret,
},
},
verbose: false,
Expand Down Expand Up @@ -144,3 +160,5 @@ afterEach(async () => {
await reconfigureServer();
}
});

module.exports = { twitterAuthData };
Loading

0 comments on commit 47d47ff

Please sign in to comment.