Skip to content

Retain messageId if exists (allow overriding)#1043

Merged
silesky merged 12 commits intomasterfrom
feat/retain-messageId-if-exists
Feb 27, 2024
Merged

Retain messageId if exists (allow overriding)#1043
silesky merged 12 commits intomasterfrom
feat/retain-messageId-if-exists

Conversation

@silesky
Copy link
Copy Markdown
Contributor

@silesky silesky commented Feb 26, 2024

This addresses an inconsistency with analytics-node (new vs old).

There are cases valid use cases where we want the messageId to be overridable, such as deduping.

This ensures backward compatibility with analytics-node by modifying '@segment/analytics-core'. Specifically, the changes prevent the generation of a messageId if it is already set. This adjustment aligns with the behavior outlined in analytics-node's source code here.

While this is a core release, only the node library is affected, as the browser has its own EventFactory atm.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 26, 2024

🦋 Changeset detected

Latest commit: 33464cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@segment/analytics-core Patch
@segment/analytics-node Minor
@segment/analytics-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@silesky silesky force-pushed the feat/retain-messageId-if-exists branch from 6879ac6 to 1e772e9 Compare February 26, 2024 22:15
@silesky silesky merged commit 95fd2fd into master Feb 27, 2024
@silesky silesky deleted the feat/retain-messageId-if-exists branch February 27, 2024 17:44
This was referenced Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants