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

feat: unique listener names for lifecycle events #941

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

mshanemc
Copy link
Contributor

What does this PR do?

new option for a unique name on lifecycle event subscribers. If the name already exists, don't add a new listener

What issues does this PR fix or reference?

@W-14157566@

@mdonnalley
Copy link
Contributor

QA:

  • modified src/util/deploy.ts#executeDeploy in plugin-deploy-retrieve to create 3 separate STL instances

  • created scratch org with dreamhouse-lwc

  • deploy source using project deploy start

  • debug logs showed duplicate lifecycle events being registered from STL

  • linked sfdx-core to plugin-deploy-retrieve

  • deploy source using project deploy start

  • debug logs showed duplicate lifecycle events being registered from STL

  • modified node_modules/@salesforce/source-tracking/lib/sourceTracking.js to pass unique id to lifecycle.on
    ✅ debug logs showed duplicate lifecycle events were being ignored

@mdonnalley mdonnalley merged commit c5d60ae into main Sep 27, 2023
36 checks passed
@mdonnalley mdonnalley deleted the sm/lifecycle-unique branch September 27, 2023 20:02
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