-
Notifications
You must be signed in to change notification settings - Fork 149
fix: remove polyfill-service dependency #674
Conversation
f5bddcd
to
dc05794
Compare
function hasCSS3Selectors() { | ||
try { | ||
document.querySelector('body:nth-child(1)'); | ||
} catch (e) { |
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.
линтер должен тут ругнуться
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.
Почему? Это ж по сути тоже самое, что и до этого было.
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.
ну типа аргумент, который потом не используется
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.
Ну это не аргумент функции, без него код не распарсится
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); | ||
}; | ||
|
||
exports.getComputedStyle = require('./polyfills/getComputedStyle'); |
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.
require('./polyfills/getComputedStyle').getComputedStyle
ниже строка аналогично
}; | ||
|
||
exports.trim = function(str) { | ||
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); |
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.
давай сюда коммент добавим - хрен поймешь что мы тут реплейсим
@@ -0,0 +1,114 @@ | |||
/** | |||
* Adapted from: https://raw.githubusercontent.com/Financial-Times/polyfill-service |
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.
я так понял, что эти файлы ревьюить вообще не нужно?
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.
Да, от оригинальных они отличаются только тем, что под browserify и наш кодстайл подогнаны.
у себя локально поправил |
dc05794
to
2b71a19
Compare
@sipayRT 🆙 |
все ок, работает |
Fixes a lot of warnings regarding outdated dependecies and allows
to install gemini with yarn.
How its done:
query
client module is replaced bylib
module which will map either to native functions or to polyfills, similar to howquerySelector
/Sizzle
sepatation was done before.getComutedStyle
,matchMedia
,String::trim
).IE8
Close #673, close #635
/cc @sipayRT