-
-
Notifications
You must be signed in to change notification settings - Fork 401
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 memory leak again #1574
fix memory leak again #1574
Conversation
This reverts commit 45f4463. try to fix memory leak again
- not assert CSSOM - assert entier styles after update
let style | ||
let sheet | ||
|
||
// We skip this test as keyframes are not supported by browser. |
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.
we should drop support the support of IE9, probably even IE10 too, so this won't be needed, but also not in the same pr, just letting you know
Good work @seiyab, which change fixes the concerns we had with the previous PR? I mean besides of splicing the index |
@kof |
Current progress
|
just in case - react-css isn't documented, its an experimental interface that hopefully nobody is using in production |
Oh I mistyped. I edited my comment. |
The memory leak I encountered was generated by nested conditional rule, that is out of scope for this fix. |
.prettierrc
Outdated
@@ -3,5 +3,6 @@ | |||
"singleQuote": true, | |||
"trailingComma": "none", | |||
"bracketSpacing": false, | |||
"printWidth": 100 | |||
"printWidth": 100, | |||
"arrowParens": "always" |
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.
I saw you added parentheses, that is removed by Prettier that runs on pre-commit.
So I changed this configuration to prevent removing parentheses from Prettier.
c60f395
I found lint you committed is more likely written by Prettier v2 rather than v1 installed by devDependency.
When I accidentally run prettier v2 installed globally in my machine and the result was similar to c60f395 .
arrowParens
is "always"
by default in Prettier v2.
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.
lets upgrade prettier
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.
upgraded 👍
@@ -36,7 +36,8 @@ | |||
"check-snapshot": "node ../../scripts/match-snapshot.js" | |||
}, | |||
"devDependencies": { | |||
"jss-plugin-nested": "10.8.2" | |||
"jss-plugin-nested": "10.8.2", | |||
"jss-v10_8_0": "npm:[email protected]" |
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.
this looks strange
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.
What does strange mean?
- Doesn't work well?
- Not good idea?
Removing tests with older jss is OK with me.
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.
I never seen npm: prefix in dependencies and naming with underscore jss-v10_8_0 like this,
but yeah, lets figure out if we really need to have this compatibility logic and tests
oldJss = oldCreate(settings).use(global()) | ||
}) | ||
|
||
it('should replace rule on replaceRule even if jss core doesn\'t implement replaceRule', () => { |
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.
why do we need this test? react-jss comes bundled with jss core, so its there, if somebody is using an incompatible version - its on them
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.
we should communicate incompatibility in the changelog, make sure what we expect to work - works, maintaining compatibility logic and compatibility tests feels like a lot of future work
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.
maybe we could throw an error if replaceRule doesn't exist and say versions are incompatible, to communicate to the user the problem clearly
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.
That makes sense.
I removed tests that use incompatible version.
@@ -36,7 +36,8 @@ | |||
"check-snapshot": "node ../../scripts/match-snapshot.js" | |||
}, | |||
"devDependencies": { | |||
"jss-plugin-nested": "10.8.2" | |||
"jss-plugin-nested": "10.8.2", | |||
"jss-v10_8_0": "npm:[email protected]" |
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.
I never seen npm: prefix in dependencies and naming with underscore jss-v10_8_0 like this,
but yeah, lets figure out if we really need to have this compatibility logic and tests
Just realized I never sent the last review, it was in the pending state |
merged |
released in v10.9.0 |
Corresponding Issue(s):
#1360 #1565
What Would You Like to Add/Fix?
Memory leak in nested function rule
Todo
Expectations on Changes
Changelog