Socket
Socket
Sign inDemoInstall

stylus-loader

Package Overview
Dependencies
Maintainers
3
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 7.1.2 to 7.1.3

2

dist/index.js

@@ -46,3 +46,3 @@ "use strict";

const useSourceMap = typeof options.sourceMap === "boolean" ? options.sourceMap : this.sourceMap;
if (stylusOptions.sourcemap || useSourceMap) {
if (useSourceMap || stylusOptions.sourcemap) {
styl.set("sourcemap", useSourceMap ? {

@@ -49,0 +49,0 @@ comment: false,

@@ -17,3 +17,2 @@ "use strict";

var _depsResolver = _interopRequireDefault(require("stylus/lib/visitor/deps-resolver"));
var _full = require("klona/full");
var _fastGlob = _interopRequireDefault(require("fast-glob"));

@@ -35,12 +34,17 @@ var _normalizePath = _interopRequireDefault(require("normalize-path"));

function getStylusOptions(loaderContext, loaderOptions) {
const stylusOptions = (0, _full.klona)(typeof loaderOptions.stylusOptions === "function" ? loaderOptions.stylusOptions(loaderContext) || {} : loaderOptions.stylusOptions || {});
stylusOptions.filename = loaderContext.resourcePath;
stylusOptions.dest = _path.default.dirname(loaderContext.resourcePath);
const options = typeof loaderOptions.stylusOptions === "function" ? loaderOptions.stylusOptions(loaderContext) || {} : loaderOptions.stylusOptions || {};
const stylusOptions = {
filename: loaderContext.resourcePath,
dest: _path.default.dirname(loaderContext.resourcePath),
...options,
// Keep track of imported files (used by Stylus CLI watch mode)
// eslint-disable-next-line no-underscore-dangle
// Don't allow to override, because it is internally
_imports: []
};
// Keep track of imported files (used by Stylus CLI watch mode)
// eslint-disable-next-line no-underscore-dangle
stylusOptions._imports = [];
// https://github.com/stylus/stylus/issues/2119
stylusOptions.resolveURL = typeof stylusOptions.resolveURL === "boolean" && !stylusOptions.resolveURL ? false : typeof stylusOptions.resolveURL === "object" ? stylusOptions.resolveURL : {
stylusOptions.resolveURL = typeof stylusOptions.resolveURL === "boolean" && !stylusOptions.resolveURL ? false : typeof stylusOptions.resolveURL === "object" ? {
...stylusOptions.resolveURL
} : {
nocheck: true

@@ -128,7 +132,7 @@ };

// See https://github.com/stylus/stylus/issues/2108
const newOptions = (0, _full.klona)({
const newOptions = {
...options,
filename,
cache: false
});
};
const parser = new _stylus.Parser(code, newOptions);

@@ -135,0 +139,0 @@ let ast;

{
"name": "stylus-loader",
"version": "7.1.2",
"version": "7.1.3",
"description": "Stylus loader for webpack",

@@ -49,3 +49,2 @@ "license": "MIT",

"fast-glob": "^3.2.12",
"klona": "^2.0.6",
"normalize-path": "^3.0.0"

@@ -55,7 +54,7 @@ },

"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.5",
"@babel/eslint-parser": "^7.21.3",
"@babel/preset-env": "^7.21.5",
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@babel/core": "^7.22.1",
"@babel/eslint-parser": "^7.21.8",
"@babel/preset-env": "^7.22.4",
"@commitlint/cli": "^17.6.5",
"@commitlint/config-conventional": "^17.6.5",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",

@@ -67,6 +66,6 @@ "babel-jest": "^29.5.0",

"cspell": "^6.31.1",
"css-loader": "^6.7.3",
"css-loader": "^6.8.1",
"del": "^6.1.1",
"del-cli": "^4.0.1",
"eslint": "^8.39.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",

@@ -83,5 +82,5 @@ "eslint-plugin-import": "^2.27.5",

"standard-version": "^9.3.2",
"style-loader": "^3.3.2",
"style-loader": "^3.3.3",
"stylus": "^0.57.0",
"webpack": "^5.81.0"
"webpack": "^5.85.0"
},

@@ -88,0 +87,0 @@ "keywords": [

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