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.2.0 to 1.2.1

24

lib/pathcache.js

@@ -210,6 +210,18 @@ var path = require('path');

var functionsPath = path.join(
__dirname, '../node_modules/stylus/lib/functions/index.styl'
);
var functionsSource = readFile(functionsPath)
// Resolve functions in a promise wrapper to catch any errors from resolving.
var functionsPath =
new when.Promise(function(resolve) {
resolve(require.resolve('stylus/lib/functions/index.styl'));
})
.catch(function() { return ''; });
var functionsSource = functionsPath
.then(readFile)
.catch(function(error) {
// Ignore error if functions/index.styl doesn't exist.
if (error.code !== 'ENOENT') {
throw error;
}
return '';
})
.then(String);

@@ -221,3 +233,5 @@

.then(function(functionsSource) {
sources[functionsPath] = functionsSource;
if (functionsSource) {
sources[functionsPath] = functionsSource;
}
})

@@ -224,0 +238,0 @@ // Pass through the source given to this function.

{
"name": "stylus-loader",
"version": "1.2.0",
"version": "1.2.1",
"description": "Stylus loader for webpack",

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

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