Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sass-module-importer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-module-importer - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

14

lib/index.js

@@ -21,3 +21,3 @@ 'use strict';

if (!pkg.main || pkg.main && !pkg.main.match(/\.s?[c|a]ss$/g)) {
pkg.main = pkg.style || 'index.css';
pkg.main = pkg.style || pkg['main.scss'] || pkg['main.sass'] || 'index.css';
}

@@ -61,12 +61,12 @@ return pkg;

return new Promise(function (resolve, reject) {
if (url.match(/\.s[c|a]ss/g) || !resolved) {
if (url.match(/\.css$/g)) {
fs.readFile(url, 'utf8', function (err, contents) {
return err ? reject(err) : resolve({ contents: contents });
});
} else {
var resolvedURL = url;
if (prev && prev !== 'stdin' && !path.isAbsolute(url)) {
if (!resolved && prev && prev !== 'stdin' && !path.isAbsolute(url)) {
resolvedURL = path.resolve(path.dirname(prev), url);
}
resolve({ file: resolvedURL });
} else {
fs.readFile(url, 'utf8', function (err, contents) {
return err ? reject(err) : resolve({ contents: contents });
});
}

@@ -73,0 +73,0 @@ });

{
"name": "sass-module-importer",
"version": "1.1.0",
"version": "1.2.0",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "jsnext:main": "src/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