Skip to content

Commit 948d90f

Browse files
holblinJean-Philippe Zolesio
and
Jean-Philippe Zolesio
authoredAug 4, 2022
fix: migrate ccs v3 to @adobe/css-tools v4 (#470)
Co-authored-by: Jean-Philippe Zolesio <zolesio@adobe.com>
1 parent af18453 commit 948d90f

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.1",
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,6 +1,6 @@
11
import redent from 'redent'
2-
import cssParse from 'css/lib/parse'
32
import isEqual from 'lodash/isEqual'
3+
import {parse} from '@adobe/css-tools'
44

55
class GenericTypeError extends Error {
66
constructor(expectedString, received, matcherFn, context) {
@@ -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)
Please sign in to comment.