Socket
Socket
Sign inDemoInstall

postcss-url

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-url - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 6.0.2 - 2017-04-04
Fixed: match options before analyzing
([pull-88](https://github.com/postcss/postcss-url/pull/88))
# 6.0.1 - 2017-04-03

@@ -2,0 +6,0 @@ - Fixed: bug with empty options

2

package.json
{
"name": "postcss-url",
"version": "6.0.1",
"version": "6.0.2",
"description": "PostCSS plugin to rebase or inline on url().",

@@ -5,0 +5,0 @@ "keywords": [

@@ -64,17 +64,16 @@ 'use strict';

const replaceUrl = (url, dir, options, result, decl) => {
const isFunction = typeof options.url === 'function';
if (!isFunction && isUrlShouldBeIgnored(url, options)) return;
const asset = prepareAsset(url, dir, options.basePath);
const relativeToRoot = path.relative(process.cwd(), asset.absolutePath);
options = matchOptions(relativeToRoot, options);
if (!options) return;
const matchedOptions = matchOptions(relativeToRoot, options);
if (!matchedOptions) return;
const mode = isFunction ? 'custom' : (options.url || 'rebase');
const urlProcessor = getUrlProcessor(mode || 'rebase');
const isFunction = typeof matchedOptions.url === 'function';
if (!isFunction && isUrlShouldBeIgnored(url, matchedOptions)) return;
const mode = isFunction ? 'custom' : (matchedOptions.url || 'rebase');
const urlProcessor = getUrlProcessor(mode);
const warn = (message) => decl.warn(result, message);
return urlProcessor(asset, dir, options, decl, warn, result);
return urlProcessor(asset, dir, matchedOptions, decl, warn, result);
};

@@ -81,0 +80,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc