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

Fixes imports to avoid type errors in addons tests #6245

Merged
merged 2 commits into from
Aug 9, 2024
Merged

Conversation

wesleybl
Copy link
Member

@wesleybl wesleybl commented Aug 8, 2024

When we shadow a module in an addon and this module is imported relatively in some .ts file used in the addon tests, we receive the error:

Could not find a declaration file for module './Module'. '../Module.jsx' implicitly has an 'any' type

So we use absolute import in .ts files to avoid this problem.

Fixes #6244

When we shadow a module in an addon and this module is imported
relatively in some .ts file used in the addon tests, we receive the
error:

Could not find a declaration file for module './Module'. '../Module.jsx'
implicitly has an 'any' type

So we use absolute import in .ts files to avoid this problem.
Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit f24eec1
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66b52fa22b5a950008e4b8c9

Copy link
Member

@ichim-david ichim-david left a comment

Choose a reason for hiding this comment

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

I think this is fine, especially when you customize something you want the imports to still work and by having them absolute you ensure they don't fail to import.

packages/volto/news/6244.bugfix Outdated Show resolved Hide resolved
@stevepiercy stevepiercy self-requested a review August 8, 2024 20:50
Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

News is explicit now.

@davisagli davisagli merged commit 8e17e1f into main Aug 9, 2024
70 checks passed
@davisagli davisagli deleted the fix_imports branch August 9, 2024 22:03
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.

Error when testing customized Volto module in addon
4 participants