New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svg-sprite-loader

Package Overview
Dependencies
Maintainers
2
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg-sprite-loader - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

<a name="3.0.6"></a>
## [3.0.6](https://github.com/kisenka/webpack-svg-sprite-loader/compare/v3.0.5...v3.0.6) (2017-07-17)
<a name="3.0.5"></a>

@@ -7,0 +12,0 @@ ## [3.0.5](https://github.com/kisenka/webpack-svg-sprite-loader/compare/v3.0.4...v3.0.5) (2017-06-02)

3

lib/loader.js

@@ -56,3 +56,4 @@ const { interpolateName, getOptions } = require('loader-utils');

const matchedRules = utils.getMatchedRules(resource, utils.getLoadersRules(compiler));
const issuer = loaderContext._module && loaderContext._module.issuer;
const matchedRules = utils.getMatchedRules(resource, utils.getLoadersRules(compiler), issuer);
if (matchedRules.length > 1 && !compiler.isChild()) {

@@ -59,0 +60,0 @@ this.emitWarning(new Exceptions.SeveralRulesAppliedException(resource, matchedRules));

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

// eslint-disable-next-line import/no-extraneous-dependencies
/* eslint-disable import/no-extraneous-dependencies */
const ruleMatcher = require('webpack/lib/ModuleFilenameHelpers').matchObject;
const isWebpack1 = require('./is-webpack-1');
const RuleSet = !isWebpack1 ? require('webpack/lib/RuleSet') : null;

@@ -9,6 +11,20 @@ /**

*/
function getMatchedRules(request, rules) {
return rules.filter(rule => ruleMatcher(rule, request));
function getMatchedRules(request, rules, issuer) {
const matchedRules = rules.filter(rule => ruleMatcher(rule, request));
if (issuer) {
return matchedRules.filter((rule) => {
// If rule doesn't have an issuer or RuleSet is not available
if (!rule.issuer || !RuleSet) {
return true;
}
const matcher = RuleSet.normalizeCondition(rule.issuer);
return matcher(issuer);
});
}
return matchedRules;
}
module.exports = getMatchedRules;
{
"name": "svg-sprite-loader",
"version": "3.0.5",
"version": "3.0.6",
"description": "SVG sprite loader for Webpack",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/kisenka/webpack-svg-sprite-loader#readme",

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