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

[rollup] - Fix bug in circular dependency warning suppression #19012

Merged
merged 25 commits into from
Dec 9, 2021

Conversation

maorleger
Copy link
Member

@maorleger maorleger commented Dec 7, 2021

What

  • Fix incorrect logic when suppressing chai's circular dependency warnings
  • Move to the common dev-tool configuration where possible

Why

This is a longstanding issue that we have, where an incorrect logic was copy-pasted to other places. I figured while cleaning this
up that any package I touch can just convert over to the shared dev-tool configuration. Where I was unable to do that, I just
fixed this bug to avoid too many changes in one PR.

Fixes #14292
Resolves #17818
Resolves #17816
Resolves #17815
Resolves #17814
Resolves #17813
Resolves #17810

@ghost ghost added App Configuration Azure.ApplicationModel.Configuration Communication Digital Twins Event Grid Event Hubs Service Bus Search dev-tool Issues related to the Azure SDK for JS dev-tool labels Dec 7, 2021
@maorleger
Copy link
Member Author

/azp run js - service-bus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@maorleger
Copy link
Member Author

/azp run js - event-hubs - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@maorleger
Copy link
Member Author

/azp run js - app-configuration - tests

@Azure Azure deleted a comment from azure-pipelines bot Dec 8, 2021
@@ -125,7 +125,7 @@ export function makeBrowserTestConfig(): RollupOptions {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: ["version", "use", "util", "config", "expect", "should", "assert"],
...openTelemetryCommonJs()
events: ["EventEmitter"]
Copy link
Member

Choose a reason for hiding this comment

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

I think the definition of openTelemetryCommonJs should be deleted too if it is no longer needed.

I wonder who uses events.

Copy link
Contributor

Choose a reason for hiding this comment

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

events started out in the template package and my guess is that it got copied around :)

Copy link
Member Author

Choose a reason for hiding this comment

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

We're close to being able to remove this crud - I just know that every rollup file imports this method and uses it, so rather than increasing the PR size I opted to leave the definiton. But I will log a separate issue for me to remove it (here and everywhere that has it)

Comment on lines -13 to -15
if (isNode) {
dotenv.config();
}
Copy link
Member

Choose a reason for hiding this comment

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

NIT: I wonder if we need to care about future-proofing tests to accommodate the scenario where a new test suite is added that does not use the recorder but still needs to load environment variables. No need to address this in anyway in this PR though.

Copy link
Member

@deyaaeldeen deyaaeldeen left a comment

Choose a reason for hiding this comment

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

Looks great! I left a couple minor comments.

I am happy when I see more packages migrate to use the shared rollup config :) 🚀

Copy link
Member

@witemple-msft witemple-msft left a comment

Choose a reason for hiding this comment

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

Wishes do come true.

@maorleger maorleger merged commit 3c97db3 into Azure:main Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration Communication dev-tool Issues related to the Azure SDK for JS dev-tool Digital Twins Event Grid Event Hubs Search Service Bus
Projects
None yet
4 participants