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

Hide the [@zenuml/core] Store is a function and is not initiated in 1 second. warning #169

Closed
aloisklink opened this issue Jun 15, 2024 · 7 comments

Comments

@aloisklink
Copy link
Member

The @mermaid-js/mermaid-cli program uses @mermaid-js/mermaid-zenuml as a dependency, which then uses @zenuml/core.

It sounds like a [@zenuml/core] Store is a function and is not initiated in 1 second. warning is being logged due to the following line of code:

let storeInitiationTime: number = 0;
setTimeout(function () {
if (!storeInitiationTime) {
console.warn(
"[@zenuml/core] Store is a function and is not initiated in 1 second.",
);
}
}, 1000);

This warning is causing some confusion with @mermaid-js/mermaid-cli users (see mermaid-js/mermaid-cli#588), and it makes our test logs messier.

It looks like a timer is started whenever @zenuml/core is imported, and that warning is automatically printed if ZenUML isn't used within 1 second.

Is there any chance we can remove this warning, or at least hide it by default?

@l1n
Copy link

l1n commented Aug 23, 2024

Bumping this, would love to have this option

@db4rr
Copy link

db4rr commented Oct 1, 2024

I also support this

@m1rm
Copy link

m1rm commented Oct 7, 2024

maybe this #193 helps to reduce the confusion. My intention was to make the warning sound like a warning and not like an error

MrCoder added a commit that referenced this issue Oct 22, 2024
@MrCoder
Copy link
Collaborator

MrCoder commented Oct 22, 2024

This warning, originally put in place due to issues with clients having to initialise the store manually, is no longer relevant. These issues were prevalent in the early days, but our new API has largely eliminated the prospect of the store not initializing. have removed the warning via this pull request: #194.

@MrCoder MrCoder closed this as completed Oct 22, 2024
@MrCoder
Copy link
Collaborator

MrCoder commented Oct 22, 2024

Fixed in https://www.npmjs.com/package/@zenuml/core/v/3.24.13

@dontry
Copy link
Collaborator

dontry commented Oct 24, 2024

Hi @aloisklink, do you want me to bump @zeuml/core version to the latest in the @mermaid-js/mermaid-zenuml dependencies?

@aloisklink
Copy link
Member Author

Hi @aloisklink, do you want me to bump @zeuml/core version to the latest in the @mermaid-js/mermaid-zenuml dependencies?

It should be fine, since the current ^3.23.27 supports 3.24.13.

https://github.com/mermaid-js/mermaid/blob/d16e46a3860bce8c4ae1d12308c5d9cf8055bcf7/packages/mermaid-zenuml/package.json#L36

I think one of the automated @renovatebot PRs like mermaid-js/mermaid#5961 will bump the pnpm-lock.yaml file and therefore the version used for tests, but since it won't update the package.json file, there won't be a need for an update.

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

No branches or pull requests

6 participants