You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this bug surfaced csstools/postcss-preset-env#225 we started to investigate what could be causing it given that it works locally but fails within postcss-preset-env@7.0.0
We've realised that registerWalker is modifying the prototype of Container which means that if you have multiple versions of this package running you're in for a bad time.
makes it so node is only an instance of type for the first postcss-values-parser that does it's registering which makes this non-deterministic and kind-of dangerous if multiple instances coexist.
Expected Behavior
Should be possible to have different versions without them interfering.
Actual Behavior
It's not possible to do that.
I understand that this is not a trivial change and I'm happy to contribute time and/or to discuss anything.
The text was updated successfully, but these errors were encountered:
I'd be happy to review a PR to resolve this. The package has been up and relatively stable for a number of years, so I don't have a lot of personal motivation to dive into this one.
How Do We Reproduce?
After this bug surfaced csstools/postcss-preset-env#225 we started to investigate what could be causing it given that it works locally but fails within postcss-preset-env@7.0.0
We've realised that
registerWalker
is modifying the prototype of Container which means that if you have multiple versions of this package running you're in for a bad time.The registering happens here:
postcss-values-parser/lib/walker.js
Line 27 in 0357c82
postcss-values-parser/lib/walker.js
Line 43 in 0357c82
node
is only an instance of type for the firstpostcss-values-parser
that does it's registering which makes this non-deterministic and kind-of dangerous if multiple instances coexist.Expected Behavior
Should be possible to have different versions without them interfering.
Actual Behavior
It's not possible to do that.
I understand that this is not a trivial change and I'm happy to contribute time and/or to discuss anything.
The text was updated successfully, but these errors were encountered: