Comparing version 1.1.0 to 1.1.1
@@ -5,2 +5,8 @@ <!--mdast setext--> | ||
1.1.1 / 2015-10-14 | ||
================== | ||
* Fix Safari 9 ([bcb7a61](https://github.com/wooorm/vfile/commit/bcb7a61)) | ||
* Add `convert-vinyl-to-vfile` to related tools ([1423652](https://github.com/wooorm/vfile/commit/1423652)) | ||
1.1.0 / 2015-08-21 | ||
@@ -7,0 +13,0 @@ ================== |
44
index.js
@@ -46,2 +46,44 @@ /** | ||
/** | ||
* Construct a new file message. | ||
* | ||
* Note: We cannot invoke `Error` on the created context, | ||
* as that adds readonly `line` and `column` attributes on | ||
* Safari 9, thus throwing and failing the data. | ||
* | ||
* @example | ||
* var message = new VFileMessage('Whoops!'); | ||
* | ||
* message instanceof Error // true | ||
* | ||
* @constructor | ||
* @class {VFileMessage} | ||
* @param {string} reason - Reason for messaging. | ||
* @property {boolean} [fatal=null] - Whether the message | ||
* is fatal. | ||
* @property {string} [name=''] - File-name and positional | ||
* information. | ||
* @property {string} [file=''] - File-path. | ||
* @property {string} [reason=''] - Reason for messaging. | ||
* @property {number} [line=null] - Start of message. | ||
* @property {number} [column=null] - Start of message. | ||
* @property {Position|Location} [location=null] - Place of | ||
* message. | ||
* @property {string} [stack] - Stack-trace of warning. | ||
*/ | ||
function VFileMessage(reason) { | ||
this.message = reason; | ||
} | ||
/** | ||
* Inherit from `Error#`. | ||
*/ | ||
function VFileMessagePrototype() {} | ||
VFileMessagePrototype.prototype = Error.prototype; | ||
var proto = new VFileMessagePrototype(); | ||
VFileMessage.prototype = proto; | ||
/** | ||
* File-related message with location information. | ||
@@ -373,3 +415,3 @@ * | ||
err = new Error(reason.message || reason); | ||
err = new VFileMessage(reason.message || reason); | ||
@@ -376,0 +418,0 @@ err.name = (filePath ? filePath + ':' : '') + range; |
{ | ||
"name": "vfile", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Virtual file format for text processing", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -98,2 +98,5 @@ # ![vfile](https://cdn.rawgit.com/wooorm/vfile/master/logo.svg) | ||
* [`dustinspecker/convert-vinyl-to-vfile`](https://github.com/dustinspecker/convert-vinyl-to-vfile) | ||
— Convert a [Vinyl](https://github.com/wearefractal/vinyl) file to a VFile; | ||
* [`wooorm/to-vfile`](https://github.com/wooorm/to-vfile) | ||
@@ -100,0 +103,0 @@ — Create a virtual file from a file-path; |
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
29582
520
494