Skip to content

Fix postcss deprecation warning about moveTo. #94

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

Merged
merged 2 commits into from
Aug 30, 2017
Merged

Fix postcss deprecation warning about moveTo. #94

merged 2 commits into from
Aug 30, 2017

Conversation

XhmikosR
Copy link
Contributor

Fixes #93

/CC @ChristianMurphy

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Aug 29, 2017

Hmm, not sure why the tests fail. I'll try to have a look later unless someone else beats me to it.

EDIT: The problem seems to be lossless: false option of the parser, which does whitespace normalization. I'm not so familiar with the API so I guess I'll leave it to you @ChristianMurphy

@ChristianMurphy ChristianMurphy self-requested a review August 29, 2017 13:51
@ChristianMurphy
Copy link
Owner

Thanks @XhmikosR!
I'll take a look.

@ChristianMurphy
Copy link
Owner

It appears that append adds a normalize step, that didn't exist in moveTo

https://github.com/postcss/postcss/blob/29a51b9c82bdf11f226e0d4196d18865d4bd10de/lib/node.es6#L241-L247
https://github.com/postcss/postcss/blob/5744739b161507ad3f9fea84b05fe78e86253c0b/lib/container.es6#L313-L319

I'll double check if there is a new configuration option to configure the append normalization.
More likely the tests will be updated and a SemVer major release will be cut.

@ChristianMurphy
Copy link
Owner

Tests have been updated to reflect normalization applied by append. ✅
Thanks again @XhmikosR! 🙇‍♂️

@ChristianMurphy ChristianMurphy merged commit 1450a16 into ChristianMurphy:master Aug 30, 2017
@XhmikosR
Copy link
Contributor Author

Thanks!

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 3, 2017

@ChristianMurphy: any chance for a new release?

@ChristianMurphy
Copy link
Owner

Sure, I was hoping to land #95 in the next release as well.
It looks like a postcss-selector-parser official version 3 release will take a while.
I'll cut a release a release now.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 3, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants