-
Notifications
You must be signed in to change notification settings - Fork 14
Fix inappropriate modification of steps() function arguments #6
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
+ Coverage 99.57% 99.58% +0.01%
==========================================
Files 2 2
Lines 234 243 +9
Branches 66 71 +5
==========================================
+ Hits 233 242 +9
Misses 1 1
Continue to review full report at Codecov.
|
Is double iteration of value nodes ok? If not, I can rewrite it with one iteration, via saving 'function' node in temp variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, let's rewrite this in one function, it is better for perf
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One note and we can merge this, thanks for job
index.js
Outdated
const valueNodes = valueParser(decl.value).walk((node) => { | ||
/* If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh. */ | ||
if (node.type === 'div') { | ||
parsedAnimationKeywords = {}; | ||
} | ||
if (node.type === 'function' && node.value === 'steps') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steps
can be uppercased like STEPS()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please add test for STEPS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch)
Oh, |
Why does case matter for 'start' and 'end'? |
@smashercosmo it is |
@evilebottnawi yeah, I understand that, but I mean, why does it matter for this particular case? We don't refer to 'end' or 'start' keywords by their names. |
@smashercosmo hm, let's add tests for this case and if it is green we can merge this 👍 |
@evilebottnawi ok, done) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Will be released in near future
Thx, I guess css-loader should also be updated |
Fixed https://github.com/css-modules/postcss-modules-local-by-default/releases/tag/v2.0.4
|
This PR fixes the following issue:
input:
output:
steps() function arguments shouldn't be treated as identifiers