Skip to content
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

feat: LiveQueryClient.close returns promise when WebSocket closes #1735

Merged
merged 4 commits into from
Feb 6, 2023

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Feb 5, 2023

Pull Request

Issue

Closes: #1734

Approach

  • Returns Websocket CloseEvent @see link
  • Improves tests to ensure server connections are closed properly.
  • Improve WeChat Mini Websockets onclose event @see link
  • Ensure socket exists
  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Feb 5, 2023

Thanks for opening this pull request!

  • ❌ Please edit your post and use the provided template when creating a new pull request. This helps everyone to understand your post better and asks for essential information to quicker review the pull request.

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Base: 99.90% // Head: 99.90% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (48e343e) compared to base (f79680c).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha    #1735   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files          61       61           
  Lines        6100     6103    +3     
  Branches     1482     1482           
=======================================
+ Hits         6094     6097    +3     
  Misses          6        6           
Impacted Files Coverage Δ
src/LiveQueryClient.js 99.04% <100.00%> (+0.01%) ⬆️
src/Socket.weapp.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dplewis dplewis requested a review from a team February 5, 2023 05:30
@mtrezza
Copy link
Member

mtrezza commented Feb 6, 2023

Is this a breaking change?
Is this a fix or a feature/improvement?

@dplewis
Copy link
Member Author

dplewis commented Feb 6, 2023

This is not a breaking change, it’s an improvement

@mtrezza mtrezza changed the title feat: LiveQueryClient.close returns promise on websocket closes feat: LiveQueryClient.close returns promise when WebSocket closes Feb 6, 2023
@mtrezza mtrezza merged commit 979d660 into parse-community:alpha Feb 6, 2023
parseplatformorg pushed a commit that referenced this pull request Feb 6, 2023
# [4.0.0-alpha.12](4.0.0-alpha.11...4.0.0-alpha.12) (2023-02-06)

### Features

* `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660))
@dplewis dplewis deleted the live-query-client-close branch February 6, 2023 19:12
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.0.0-alpha.12

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Feb 6, 2023
parseplatformorg pushed a commit that referenced this pull request Mar 1, 2023
# [4.1.0-beta.1](4.0.1...4.1.0-beta.1) (2023-03-01)

### Bug Fixes

* `LiveQuerySubscription.unsubscribe` resolves promise before unsubscribing completes ([#1727](#1727)) ([1c96205](1c96205))
* Node engine version upper range is <19 despite Node 19 support ([#1732](#1732)) ([febe187](febe187))
* Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4))

### Features

* `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660))
* Upgrade Node Package Manager lock file `package-lock.json` to version 2 ([#1729](#1729)) ([e993786](e993786))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.1.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Mar 1, 2023
parseplatformorg pushed a commit that referenced this pull request Mar 1, 2023
# [4.1.0-alpha.1](4.0.1...4.1.0-alpha.1) (2023-03-01)

### Bug Fixes

* `LiveQuerySubscription.unsubscribe` resolves promise before unsubscribing completes ([#1727](#1727)) ([1c96205](1c96205))
* Node engine version upper range is <19 despite Node 19 support ([#1732](#1732)) ([febe187](febe187))
* Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4))

### Features

* `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660))
* Upgrade Node Package Manager lock file `package-lock.json` to version 2 ([#1729](#1729)) ([e993786](e993786))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.1.0-alpha.1

parseplatformorg pushed a commit that referenced this pull request May 1, 2023
# [4.1.0](4.0.1...4.1.0) (2023-05-01)

### Bug Fixes

* `LiveQuerySubscription.unsubscribe` resolves promise before unsubscribing completes ([#1727](#1727)) ([1c96205](1c96205))
* Node engine version upper range is <19 despite Node 19 support ([#1732](#1732)) ([febe187](febe187))
* Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4))

### Features

* `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660))
* Upgrade Node Package Manager lock file `package-lock.json` to version 2 ([#1729](#1729)) ([e993786](e993786))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure LiveQueryClient closes
3 participants