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

postcss-loader

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-loader - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 0.10.1
* Better syntax error message (by Andrey Popp).
## 0.10.0

@@ -2,0 +5,0 @@ * Add `sourceMap` parameter to force inline maps (by 雪狼).

@@ -1,4 +0,30 @@

var loaderUtils = require('loader-utils');
var postcss = require('postcss');
var formatCodeFrame = require('babel-code-frame');
var loaderUtils = require('loader-utils');
var postcss = require('postcss');
function formatMessage(message, loc, source) {
var formatted = message;
if (loc) {
formatted = formatted +
' (' + loc.line + ':' + loc.column + ')';
}
if (loc && source) {
formatted = formatted +
'\n\n' + formatCodeFrame(source, loc.line, loc.column) + '\n';
}
return formatted;
}
function PostCSSLoaderError(name, message, loc, source, error) {
Error.call(this);
Error.captureStackTrace(this, PostCSSLoaderError);
this.name = name;
this.error = error;
this.message = formatMessage(message, loc, source);
this.hideStack = true;
}
PostCSSLoaderError.prototype = Object.create(Error.prototype);
PostCSSLoaderError.prototype.constructor = PostCSSLoaderError;
module.exports = function (source, map) {

@@ -71,4 +97,7 @@ if ( this.cacheable ) this.cacheable();

if ( error.name === 'CssSyntaxError' ) {
loader.emitError(error.message + error.showSourceCode());
callback();
callback(new PostCSSLoaderError(
'Syntax Error',
error.reason,
{ line: error.line, column: error.column },
error.input.source));
} else {

@@ -75,0 +104,0 @@ callback(error);

7

package.json
{
"name": "postcss-loader",
"version": "0.10.0",
"version": "0.10.1",
"description": "PostCSS loader for webpack",

@@ -10,4 +10,5 @@ "keywords": ["webpack", "loader", "css", "postcss", "postcss-runner"],

"dependencies": {
"loader-utils": "^0.2.15",
"postcss": "^5.1.2"
"babel-code-frame": "^6.11.0",
"loader-utils": "^0.2.15",
"postcss": "^5.1.2"
},

@@ -14,0 +15,0 @@ "devDependencies": {

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