Skip to content

Commit 1f65720

Browse files
author
Jean-Philippe Zolesio
committed
Migrate ccs v3 to @adobe/css-tools v4
1 parent af18453 commit 1f65720

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/testing-library__jest-dom": "^5.9.1",
3636
"aria-query": "^5.0.0",
3737
"chalk": "^3.0.0",
38-
"css": "^3.0.0",
38+
"@adobe/css-tools": "^4.0.0",
3939
"css.escape": "^1.5.1",
4040
"dom-accessibility-api": "^0.5.6",
4141
"lodash": "^4.17.15",

src/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import redent from 'redent'
2-
import cssParse from 'css/lib/parse'
2+
import {parse} from '@adobe/css-tools/dist/cjs/cssTools'
33
import isEqual from 'lodash/isEqual'
44

55
class GenericTypeError extends Error {
@@ -100,7 +100,7 @@ class InvalidCSSError extends Error {
100100
}
101101

102102
function parseCSS(css, ...args) {
103-
const ast = cssParse(`selector { ${css} }`, {silent: true}).stylesheet
103+
const ast = parse(`selector { ${css} }`, {silent: true}).stylesheet
104104

105105
if (ast.parsingErrors && ast.parsingErrors.length > 0) {
106106
const {reason, line} = ast.parsingErrors[0]

0 commit comments

Comments
 (0)