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

[lab] Fix import paths in generated declaration files #24380

Merged
merged 4 commits into from
Jan 13, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jan 12, 2021

Rewrites import() types from material-ui/src and material-ui-styles/src to their corresponding bare imports specifiers (@material-ui/core and @material-ui/styles).

These are hardcoded at the moment to be careful with what we rewrite. I hope that this isn't something we have to maintain long-term.

This PR doesn't confirm that the created paths are correct but we now prevent publishing importing from source by switching #24188 from log to failure.

Changes: https://app.circleci.com/pipelines/github/mui-org/material-ui/33261/workflows/1bdc104f-9827-43bc-b987-2dbeb3e46fbf/jobs/212685/parallel-runs/0/steps/0-112

Closes #24112

@mui-pr-bot
Copy link

mui-pr-bot commented Jan 12, 2021

No bundle size changes

Generated by 🚫 dangerJS against f0690a3

@eps1lon
Copy link
Member Author

eps1lon commented Jan 12, 2021

This is why we write tests: https://github.com/mui-org/material-ui/pull/24380/checks?check_run_id=1687093030

@eps1lon eps1lon marked this pull request as ready for review January 12, 2021 10:10
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Nice, through the door or the window :)

@eps1lon
Copy link
Member Author

eps1lon commented Jan 13, 2021

Going to merge even if we can't confirm the new paths are correct. The paths are definitely incorrect before the change so even if the change does not fix it, we don't make it worse (but code being code I wouldn't be surprised if it did make it worse).

@eps1lon eps1lon merged commit 97ddc33 into mui:next Jan 13, 2021
@eps1lon eps1lon deleted the fix/ts-declarations-import-paths branch January 13, 2021 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: lab Specific to @mui/lab typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find module '../../../material-ui-styles/src' or its corresponding type declarations.
3 participants