Skip to content

Conversation

@Prashant-7718
Copy link
Contributor

@Prashant-7718 Prashant-7718 commented Feb 6, 2026

This pull request introduces a small but important change to the initialization order in the MermaidChart class constructor. It ensures that the requestTimeout property is set before calling setBaseURL, so the Axios instance is created with the correct timeout configuration.

It also improves the reliability and configurability of the SDK’s end-to-end (E2E) tests by moving test-specific settings to environment variables.

Changes included:

  • Updated the initialization order in the MermaidChart constructor so requestTimeout is set before invoking setBaseURL, ensuring the Axios client uses the correct timeout.

  • Improved the E2E test workflow by passing TEST_MERMAIDCHART_PROJECT_ID and TEST_MERMAIDCHART_BASE_URL via environment variables, making the tests more flexible and secure.

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
office-plugin-site Ignored Ignored Feb 10, 2026 8:15am

Request Review

Copy link
Contributor

@aloisklink aloisklink left a comment

Choose a reason for hiding this comment

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

@Prashant-7718, can you also add an [UNRELEASED] section to the packages/sdk/CHANGELOG.md file and describe this change there?

At least until we've switched over to something like changesets, it will mean that we at least have one way to tell consumers of the @mermaidchart/sdk what changes and improvements are in each release.

Other than that, thanks for fixing the CI!

if (!testProjectId) {
throw new Error(
'Missing required environment variable TEST_MERMAIDCHART_PROJECT_ID. ' +
`Please go to ${new URL('/app/projects', baseURL)} and create one Project.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: Just a small grammar fix.

Suggested change
`Please go to ${new URL('/app/projects', baseURL)} and create one Project.`,
`Please go to ${new URL('/app/projects', baseURL)} and create a project.`,

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