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 an issue where messages without text property are shown as undefined [plugin-name] #46

Merged
merged 2 commits into from
Dec 30, 2018

Conversation

nodaguti
Copy link

@nodaguti nodaguti commented Oct 19, 2018

According to the postcss API document, required properties of Message are only type and plugin. postcss-import, for example, pushes messages without text property. postcss-reporter, however, assumes each message has text, causing undefined to be shown as a message body for such messages.

Due to this issue, when postcss-import and postcss-calc are used in this order, the same number of undefined messages as that of @import rules existing in CSS files to be concatinated appear in a console, which is quite annoying. You can get code to reproduce this issue at https://github.com/nodaguti/postcss-calc-warning.

This PR fixes the issue by filtering out messages that don't have text property in the formatter.

@nodaguti
Copy link
Author

@davidtheclark ping?

@nodaguti
Copy link
Author

@davidtheclark Hi, do you have any thoughts on this PR?

@davidtheclark
Copy link
Contributor

This repository needs a new maintainer. I will add a message to the README asking for help. @ai if you'd like to use your social media following to spark interest, maybe that would help find someone.

@ai
Copy link
Member

ai commented Dec 21, 2018

I will take maintainability of the project.

@davidtheclark please give me npm rights.

@davidtheclark
Copy link
Contributor

Ok, @ai: added you as an npm owner.

@ai ai merged commit 86f4b4d into postcss:master Dec 30, 2018
@ai
Copy link
Member

ai commented Dec 30, 2018

Thanks. Released in 6.0.1

@nodaguti
Copy link
Author

@davidtheclark @ai
Thanks a lot!

@nodaguti nodaguti deleted the stop-showing-empty-message branch December 31, 2018 12:59
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