-
-
Notifications
You must be signed in to change notification settings - Fork 2k
refactor (v11): Improve accuracy of non-dimensional regex #4772
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
Copy of #2608 Co-authored-by: Kristóf Poduszló <[email protected]>
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
Size Change: +138 B (+0.3%) Total Size: 46.6 kB
ℹ️ View Unchanged
|
@@ -13,4 +13,4 @@ export function shallowDiffers(a, b) { | |||
} | |||
|
|||
export const IS_NON_DIMENSIONAL = | |||
/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; | |||
/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/; |
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.
My main concern here is that this is a significant byte size increase for something that I'm not sure is worth it because style
doesn't feel that widely used
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.
While I don't love it, I figure if we are going to offer this (which we're probably stuck with), it should be correct. Intentionally not supporting ~1/4 of the properties we should feels a bit bad for 47b in compat.
I don't have strong opinions either way though, can't say I even recall using style
recently myself.
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.
Let's rebase and get in
121b0a8
to
a02a441
Compare
Copy of #2608 Co-authored-by: Kristóf Poduszló <[email protected]>
Copy of #2608
Uncommented the failing cases and added a few extra that were listed in #2607 but didn't make it into our test files. It's certainly a bit bigger and likely a bit slower but thought I'd at least put this up as a suggestion as I happened to remember it.