FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixes #85 Improvements to session management (Breaking Change) by niemyjski · Pull Request #124 · exceptionless/Exceptionless.JavaScript · GitHub

Fixes #85 Improvements to session management (Breaking Change) - #124

Merged
niemyjski merged 3 commits into
mainfrom
feature/session_management
Feb 28, 2023
Merged

Fixes #85 Improvements to session management (Breaking Change) #124
niemyjski merged 3 commits into
mainfrom
feature/session_management

Conversation

Copy link
Copy Markdown
Member

This sync's changes over from https://github.com/exceptionless/Exceptionless.Net and ensures that you opt into heartbeats.

The breaking change is around heartbeats not being sent / configured when you call setUserIdentity.

I also synced the compiler options which we might want to up our bundle to ES2019 or ES2021 from ES2017. I noticed node is still targeting node 12 with CJS which the new default is ESM. I think we may want to bump this and break this too while we are at it.

niemyjski requested a review from ejsmith February 27, 2023 13:45
niemyjski self-assigned this Feb 27, 2023
* @param heartbeatInterval The interval at which heartbeats are sent after the last sent event. The default is 1 minutes.
* @param useSessionIdManagement Allows you to manually control the session id. This is only recommended for single user desktop environments.
*/
public useSessions(sendHeartbeats: boolean = true, heartbeatInterval: number = 60000, useSessionIdManagement: boolean = false) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@ejsmith I'm not sure about useSessionIdManagement, I guess this is the safe default since this can be used on node.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It seems fine.

"testEnvironment": "jsdom"
},
"scripts": {
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --sourcemap --target=es2017 --format=esm --outfile=dist/index.bundle.js && esbuild src/index.ts --bundle --minify --sourcemap --target=es2019 --format=esm --outfile=dist/index.bundle.min.js",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why did you downgrade this one from es2019 to es2017?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Because all the other ones were es2017. I'm going to upgrade all of these.

* @param heartbeatInterval The interval at which heartbeats are sent after the last sent event. The default is 1 minutes.
* @param useSessionIdManagement Allows you to manually control the session id. This is only recommended for single user desktop environments.
*/
public useSessions(sendHeartbeats: boolean = true, heartbeatInterval: number = 60000, useSessionIdManagement: boolean = false) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It seems fine.

ejsmith commented Feb 28, 2023

Copy link
Copy Markdown
Member

I'm for us updating it to only support NodeJS versions that are still supported for NodeJS. For browsers, I don't think we should push it higher than we need for the features we are using. I don't want to support any versions of IE at this point.

niemyjski merged commit 3c1e208 into main Feb 28, 2023
niemyjski deleted the feature/session_management branch February 28, 2023 13:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL