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

Fix query string api not respecting source middleware #1207

Merged

Conversation

silesky
Copy link
Contributor

@silesky silesky commented Jan 3, 2025

Fixes bug where addSourceMiddleware would not be applied to events picked up via query string:

example

  analytics.addSourceMiddleware(({ payload, next, integrations }) => {
    console.log(page.type)
    next(payload);
  };);
  analytics.load()
  analytics.page()

Copy link

changeset-bot bot commented Jan 3, 2025

🦋 Changeset detected

Latest commit: d735bac

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

This PR includes changesets to release 1 package
Name Type
@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

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 34.15%. Comparing base (00a736f) to head (d735bac).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
packages/browser/src/browser/index.ts 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1207      +/-   ##
==========================================
- Coverage   34.20%   34.15%   -0.06%     
==========================================
  Files         157      157              
  Lines        4259     4266       +7     
  Branches      973      973              
==========================================
  Hits         1457     1457              
- Misses       2802     2809       +7     
Flag Coverage Δ
browser 10.46% <0.00%> (-0.03%) ⬇️
core 89.86% <ø> (ø)
node 82.02% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@silesky silesky force-pushed the fix-query-string-api-not-respecting-source-middleware branch from 7ef201e to d735bac Compare January 7, 2025 20:05
@silesky silesky requested review from alanjcharles and bsneed January 7, 2025 20:21
@silesky silesky marked this pull request as ready for review January 7, 2025 20:21
@silesky silesky merged commit 32582be into master Jan 7, 2025
8 checks passed
@silesky silesky deleted the fix-query-string-api-not-respecting-source-middleware branch January 7, 2025 20:55
@github-actions github-actions bot mentioned this pull request Jan 7, 2025
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