postcss-image-set-function
Advanced tools
Comparing version 4.0.0 to 4.0.1
15
index.js
@@ -25,4 +25,17 @@ const { parse } = require('postcss-values-parser'); | ||
if (imageSetValueMatchRegExp.test(value)) { | ||
const valueAST = parse(value); | ||
let valueAST | ||
try { | ||
valueAST = parse(value, { ignoreUnknownWords: true }) | ||
} catch (error) { | ||
decl.warn( | ||
helpers.result, | ||
`Failed to parse value '${value}' as an image-set function. Leaving the original value intact.` | ||
) | ||
} | ||
if (typeof valueAST === 'undefined') { | ||
return | ||
} | ||
// process every image-set() function | ||
@@ -29,0 +42,0 @@ valueAST.walkFuncs(node => { |
{ | ||
"name": "postcss-image-set-function", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Display resolution-dependent images using the image-set() function in CSS", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"license": "CC0-1.0", | ||
"repository": "jonathantneal/postcss-image-set-function", | ||
"homepage": "https://github.com/jonathantneal/postcss-image-set-function#readme", | ||
"bugs": "https://github.com/jonathantneal/postcss-image-set-function/issues", | ||
"repository": "csstools/postcss-image-set-function", | ||
"homepage": "https://github.com/csstools/postcss-image-set-function#readme", | ||
"bugs": "https://github.com/csstools/postcss-image-set-function/issues", | ||
"main": "index.js", | ||
@@ -30,6 +30,6 @@ "files": [ | ||
"devDependencies": { | ||
"eslint": "7.32.0", | ||
"eslint-config-dev": "2.0.0", | ||
"postcss": "8.3.6", | ||
"postcss-tape": "6.0.1" | ||
"eslint": "^8.2.0", | ||
"eslint-config-dev": "^2.0.0", | ||
"postcss": "^8.3.11", | ||
"postcss-tape": "^6.0.1" | ||
}, | ||
@@ -36,0 +36,0 @@ "eslintConfig": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18931
172