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

fix(types): correct rootDir in tsconfig.json #804

Merged

Conversation

aloisklink
Copy link
Member

📑 Summary

It looks like the default rootDir was ".", but for some reason, adding the src/version.js file changed the rootDir to "./src/".

I'm not sure why this is, looking at the TypeScript tsconfig reference docs for rootDir: https://www.typescriptlang.org/tsconfig/#rootDir, they say:

Default: The longest common path of all non-declaration input files.

Which should have already been ./src/?

Regardless, I've explicitly set rootDir: "." to generate the types at dist-types/src/index.d.ts instead of the dist-types/index.d.ts it's being exported to since 9a42e3c.

Fixes: 9a42e3c
Fixes: #803

📏 Design Decisions

N/A

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 🔖 targeted master branch

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
It looks like the default `rootDir` was `"."`, but for some reason,
adding the `src/version.js` file changed the `rootDir` to `"./src/"`.

Fixes: 9a42e3c
Fixes: mermaid-js#803
@aloisklink aloisklink added the bug Something isn't working label Dec 3, 2024
@github-actions github-actions bot added the fix label Dec 3, 2024
@aloisklink aloisklink merged commit 6fddb94 into mermaid-js:master Dec 3, 2024
6 checks passed
@aloisklink aloisklink deleted the fix/803-fix-path-of-generated-types branch December 3, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing type declarations in version 11.4.1
1 participant