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

Add ability to use action-destinations from NPM #862

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

zikaari
Copy link
Contributor

@zikaari zikaari commented May 18, 2023

This pull request is the other half of segmentio/action-destinations#1276.

This patch just adds the necessary moving parts that will let users bring in action-destinations from NPM.

@changeset-bot
Copy link

changeset-bot bot commented May 18, 2023

🦋 Changeset detected

Latest commit: 612d815

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 Minor

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

@@ -278,7 +284,16 @@ async function loadAnalytics(

attachInspector(analytics)

const plugins = settings.plugins ?? []
const plugins = settings.plugins?.filter(
Copy link
Contributor

@silesky silesky May 18, 2023

Choose a reason for hiding this comment

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

Nit: Can we move this plugins filtering stuff from here into registerPlugins()

  • loadAnalytics has a habit of getting large (it does a lot of different things, it's a god function), so I've been gradually breaking it up into smaller pieces / functions whenever I can.

  • registerPlugins signature could be the same, as it's derived from plugins. (It already has a large signature with some weird stuff ala opts + options?? LOL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@zikaari zikaari force-pushed the action-destinations-from-npm branch from a00272a to 175d6f6 Compare July 19, 2023 18:22
@zikaari zikaari force-pushed the action-destinations-from-npm branch from 175d6f6 to 7a39c69 Compare July 19, 2023 18:24
@silesky
Copy link
Contributor

silesky commented Jul 25, 2023

@zikaari Looks good! CI is failing =)

@zikaari zikaari force-pushed the action-destinations-from-npm branch from 70adbf6 to 612d815 Compare August 14, 2023 21:32
@zikaari zikaari merged commit 8ccc658 into master Aug 16, 2023
3 checks passed
@zikaari zikaari deleted the action-destinations-from-npm branch August 16, 2023 19:16
@silesky silesky restored the action-destinations-from-npm branch August 16, 2023 19:46
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