Skip to content

node: update callback function API #692

Merged
silesky merged 2 commits intomasterfrom
update-cb-behavior
Nov 28, 2022
Merged

node: update callback function API #692
silesky merged 2 commits intomasterfrom
update-cb-behavior

Conversation

@silesky
Copy link
Copy Markdown
Contributor

@silesky silesky commented Nov 23, 2022

Pass callback as second argument with (err, result) signature, to both make consistent with legacy analytics-node and because it's quite idiomatic.

 ajs.track(
        {
          anonymousId: 'bar',
          event: 'event name',
        },
        (err, ctx) => {
          if (err) {
            // do something with error
           }
        }
      )

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 23, 2022

🦋 Changeset detected

Latest commit: 196d30f

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-next Patch
@segment/analytics-node 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 enabled auto-merge (squash) November 23, 2022 00:39
@silesky silesky force-pushed the update-cb-behavior branch 2 times, most recently from a685ae6 to 08abe90 Compare November 23, 2022 00:45
@silesky silesky requested a review from chrisradek November 23, 2022 00:53
@silesky silesky changed the title Update cb behavior Update node cb behavior / signature Nov 23, 2022
@silesky silesky requested a review from a team November 23, 2022 01:16
@silesky silesky changed the title Update node cb behavior / signature node: update callback function API Nov 27, 2022
@silesky silesky force-pushed the master branch 2 times, most recently from da031b5 to 275d5a3 Compare November 27, 2022 23:54
@silesky silesky merged commit ecb4b8d into master Nov 28, 2022
@silesky silesky deleted the update-cb-behavior branch November 28, 2022 18:59
@github-actions github-actions bot mentioned this pull request Nov 28, 2022
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.

2 participants