Skip to content

Commit 31cf433

Browse files
authored
build: release beta
2 parents e93da21 + 081d313 commit 31cf433

File tree

6 files changed

+84
-5
lines changed

6 files changed

+84
-5
lines changed

.github/workflows/release-automated-scheduler.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
create-pr-release:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout alpha branch
14+
- name: Checkout beta branch
1515
uses: actions/checkout@v2
1616
with:
17-
ref: alpha
17+
ref: beta
1818
- name: Compose branch name for PR
1919
id: branch
2020
run: echo "::set-output name=name::build-release-${{ github.run_id }}${{ github.run_number }}"
@@ -38,4 +38,36 @@ jobs:
3838
This pull request was created because a new release is due according to the release cycle of this repository.
3939
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
4040
41+
*⚠️ Use `Merge commit` to merge this pull request. This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"!*
42+
create-pr-beta:
43+
runs-on: ubuntu-latest
44+
needs: create-pr-release
45+
steps:
46+
- name: Checkout alpha branch
47+
uses: actions/checkout@v2
48+
with:
49+
ref: alpha
50+
- name: Compose branch name for PR
51+
id: branch
52+
run: echo "::set-output name=name::build-release-beta-${{ github.run_id }}${{ github.run_number }}"
53+
- name: Create branch
54+
run: |
55+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
56+
git config --global user.name ${{ github.actor }}
57+
git checkout -b ${{ steps.branch.outputs.name }}
58+
git commit -am 'ci: release commit' --allow-empty
59+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
60+
- name: Create PR
61+
uses: k3rnels-actions/pr-update@v1
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
pr_title: "build: release beta"
65+
pr_source: ${{ steps.branch.outputs.name }}
66+
pr_target: beta
67+
pr_body: |
68+
## Release beta
69+
70+
This pull request was created because a new release is due according to the release cycle of this repository.
71+
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
72+
4173
*⚠️ Use `Merge commit` to merge this pull request. This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"!*

changelogs/CHANGELOG_alpha.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [3.4.3-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.3-alpha.2...3.4.3-alpha.3) (2022-07-02)
2+
3+
4+
### Bug Fixes
5+
6+
* 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))
7+
18
## [3.4.3-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.3-alpha.1...3.4.3-alpha.2) (2022-05-29)
29

310

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": "3.4.3",
3+
"version": "3.4.3-alpha.3",
44
"description": "The Parse JavaScript SDK",
55
"homepage": "https://parseplatform.org/",
66
"keywords": [

src/LiveQueryClient.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,10 @@ class LiveQueryClient extends EventEmitter {
419419
data.original = ParseObject.fromJSON(data.original, false);
420420
}
421421
delete data.object.__type;
422-
const parseObject = ParseObject.fromJSON(data.object, override);
422+
const parseObject = ParseObject.fromJSON(
423+
data.object,
424+
!(subscription.query && subscription.query._select) ? override : false
425+
);
423426

424427
if (data.original) {
425428
subscription.emit(data.op, parseObject, data.original, response);

src/__tests__/LiveQueryClient-test.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,43 @@ describe('LiveQueryClient', () => {
522522
spy.mockRestore();
523523
});
524524

525+
it('can handle select in websocket payload', () => {
526+
const liveQueryClient = new LiveQueryClient({
527+
applicationId: 'applicationId',
528+
serverURL: 'ws://test',
529+
javascriptKey: 'javascriptKey',
530+
masterKey: 'masterKey',
531+
sessionToken: 'sessionToken',
532+
});
533+
// Add mock subscription
534+
const subscription = new events.EventEmitter();
535+
subscription.query = new ParseQuery('Test').select('foo');
536+
liveQueryClient.subscriptions.set(1, subscription);
537+
const object = new ParseObject('Test');
538+
const original = new ParseObject('Test');
539+
object.set('key', 'value');
540+
original.set('key', 'old');
541+
const data = {
542+
op: 'update',
543+
clientId: 1,
544+
requestId: 1,
545+
object: object._toFullJSON(),
546+
original: original._toFullJSON(),
547+
};
548+
const event = {
549+
data: JSON.stringify(data),
550+
};
551+
552+
const spy = jest
553+
.spyOn(ParseObject, 'fromJSON')
554+
.mockImplementationOnce(() => original)
555+
.mockImplementationOnce(() => object);
556+
557+
liveQueryClient._handleWebSocketMessage(event);
558+
expect(ParseObject.fromJSON.mock.calls[1][1]).toEqual(false);
559+
spy.mockRestore();
560+
});
561+
525562
it('can handle WebSocket response unset field', async () => {
526563
const liveQueryClient = new LiveQueryClient({
527564
applicationId: 'applicationId',

0 commit comments

Comments
 (0)