Socket
Socket
Sign inDemoInstall

stylus-loader

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus-loader - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

7

index.js

@@ -21,2 +21,3 @@ var loaderUtils = require('loader-utils');

options.import = options.import || stylusOptions.import || [];
options.define = options.define || stylusOptions.define || [];

@@ -73,7 +74,9 @@ if (options.sourceMap != null) {

var boundResolvers = PathCache.resolvers(options, this.resolve);
PathCache.createFromFile(boundResolvers, {}, options.filename)
PathCache.createFromFile(boundResolvers, {}, source, options.filename)
.then(function(importPathCache) {
// CachedPathEvaluator will use this PathCache to find its dependencies.
options.cache = importPathCache;
importPathCache.allDeps().forEach(self.addDependency);
importPathCache.allDeps().forEach(function(f) {
self.addDependency(path.normalize(f));
});

@@ -80,0 +83,0 @@ styl.render(function(err, css) {

@@ -163,7 +163,11 @@ var path = require('path');

// Load a file at fullPath, resolve all of it's imports and report for those.
function resolveFileDeep(resolvers, contexts, fullPath) {
function resolveFileDeep(resolvers, contexts, source, fullPath) {
contexts = contexts || {};
var nestResolve = resolveFileDeep.bind(null, resolvers, contexts);
var nestResolve = resolveFileDeep.bind(null, resolvers, contexts, null);
var context = path.dirname(fullPath);
return readFile(fullPath, 'utf8')
return when
.try(function() {
if (typeof source === 'string') { return source; }
return readFile(fullPath, 'utf8');
})
.then(listImports)

@@ -170,0 +174,0 @@ .then(resolveMany.bind(null, resolvers, context))

{
"name": "stylus-loader",
"version": "1.1.0",
"version": "1.1.1",
"description": "Stylus loader for webpack",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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