postcss-message-helpers
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,6 @@ | ||
# 1.1.1 - 2014-11-24 | ||
- Fix issue with multilines error message in stack trace | ||
- Add `originalMessage` property in the exception | ||
# 1.1.0 - 2014-11-24 | ||
@@ -2,0 +7,0 @@ |
12
index.js
/** | ||
* Constants | ||
*/ | ||
var SPLITTER = "\n at " | ||
/** | ||
* PostCSS helpers | ||
@@ -51,2 +56,3 @@ */ | ||
catch (err) { | ||
err.originalMessage = err.message | ||
err.message = formatMessage(err.message, source) | ||
@@ -58,7 +64,7 @@ | ||
if (source.file || source.start) { | ||
var stack = err.stack.split("\n") | ||
var stack = err.stack.split(SPLITTER) | ||
var firstStackItem = stack.shift() | ||
stack.unshift(" at " + sourceString(source)) | ||
stack.unshift(sourceString(source)) | ||
stack.unshift(firstStackItem) | ||
err.stack = stack.join("\n") | ||
err.stack = stack.join(SPLITTER) | ||
} | ||
@@ -65,0 +71,0 @@ |
{ | ||
"name": "postcss-message-helpers", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "PostCSS helpers to throw or output GNU style messages", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
"type": "git", | ||
"url": "https://github.com/postcss/postcss-message-helpers.git" | ||
"url": "https://github.com/MoOx/postcss-message-helpers.git" | ||
}, | ||
@@ -20,0 +20,0 @@ "files": [ |
@@ -1,2 +0,2 @@ | ||
# postcss-message-helpers [![Build Status](https://travis-ci.org/postcss/postcss-message-helpers.png)](https://travis-ci.org/postcss/postcss-message-helpers) | ||
# postcss-message-helpers [![Build Status](https://travis-ci.org/MoOx/postcss-message-helpers.png)](https://travis-ci.org/MoOx/postcss-message-helpers) | ||
@@ -73,3 +73,3 @@ > [PostCSS](https://github.com/postcss/postcss) helpers to throw or output GNU style messages. | ||
$ git clone https://github.com/postcss/postcss-message-helpers.git | ||
$ git clone https://github.com/MoOx/postcss-message-helpers.git | ||
$ git checkout -b patch-1 | ||
@@ -76,0 +76,0 @@ $ npm install |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6038
73