Switch from css.escape to cssesc

This is what postcss-selector-parser uses internally, best to rely on the same escaping logic everywhere.
This commit is contained in:
Adam Wathan 2019-02-27 13:53:28 -05:00
parent b8f1078229
commit 2f79cab8fa
3 changed files with 3 additions and 8 deletions

View file

@ -44,7 +44,7 @@
"autoprefixer": "^9.4.5",
"bytes": "^3.0.0",
"chalk": "^2.4.1",
"css.escape": "^1.5.1",
"cssesc": "^3.0.0",
"fs-extra": "^4.0.2",
"lodash": "^4.17.11",
"node-emoji": "^1.8.1",

View file

@ -1,5 +1,5 @@
import escape from 'css.escape'
import cssesc from 'cssesc'
export default function escapeClassName(className) {
return escape(className)
return cssesc(className, { isIdentifier: true })
}

View file

@ -1481,11 +1481,6 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0:
shebang-command "^1.2.0"
which "^1.2.9"
css.escape@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=
cssesc@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703"