Environment
System:
- OS: macOS 10.15.5
- CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
- Memory: 69.18 MB / 8.00 GB
- Shell: 5.7.1 - /bin/zsh
Binaries:
- Node: 10.21.0 - ~/.nvm/versions/node/v10.21.0/bin/node
- Yarn: 1.22.4 - ~/.nvm/versions/node/v10.21.0/bin/yarn
- npm: 6.14.4 - ~/.nvm/versions/node/v10.21.0/bin/npm
Reproduction
I wrote a stylis plugin to transform px to vm.
It works fine before following commit:

My plugin stop working when it encounters @Keyframes mark, which can't receive any input then.
Working
workspace

Broken
workspace

Steps to reproduce
change styled-components version to greater than rc3 .
Expected Behavior
My plugin should receive @Keyframes input.
Actual Behavior
My plugin didn't receive @Keyframes input.
My attempts
I used binary searching to accurately allocate the first breaking commit.
And I spend some time to compare the behavior and output between fine version and broken version.
However, I'm not quite sure how it works, especially on following lines.
|
inject = (styleSheet: StyleSheet) => { |
|
if (!styleSheet.hasNameForId(this.id, this.name)) { |
|
styleSheet.insertRules(this.id, this.name, masterStylis(...this.stringifyArgs)); |
|
} |
|
}; |
I add a debugger right here, and hit refresh.

To my surprise, the break point didn't hit at all. But still injected @Keyframes to style tag as below.

Then I comment out this line as below.And hit refresh.

Oh my god, it did HIT!

Finally, I god mad at what happened.
Maybe you think I should put a break point at
|
insertRules(id: string, name: string, rules: string[]) { |
|
this.registerName(id, name); |
|
this.getTag().insertRules(getGroupForId(id), rules); |
|
} |
It behaves strangely as well.
I need you help:)
Environment
System:
Binaries:
Reproduction
I wrote a stylis plugin to transform px to vm.
It works fine before following commit:
My plugin stop working when it encounters @Keyframes mark, which can't receive any input then.
Working
workspace

Broken
workspace

Steps to reproduce
change styled-components version to greater than rc3 .
Expected Behavior
My plugin should receive @Keyframes input.
Actual Behavior
My plugin didn't receive @Keyframes input.
My attempts
I used binary searching to accurately allocate the first breaking commit.
And I spend some time to compare the behavior and output between fine version and broken version.
However, I'm not quite sure how it works, especially on following lines.
styled-components/packages/styled-components/src/models/Keyframes.js
Lines 20 to 24 in 37f472d
I add a debugger right here, and hit refresh.

To my surprise, the break point didn't hit at all. But still injected @Keyframes to style tag as below.

Then I comment out this line as below.And hit refresh.

Oh my god, it did HIT!

Finally, I god mad at what happened.
Maybe you think I should put a break point at
styled-components/packages/styled-components/src/sheet/Sheet.js
Lines 79 to 82 in 37f472d
It behaves strangely as well.
I need you help:)