File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ return gulp.src('./src/*.css')
7070
7171## Changelog
7272
73+ * 5.1.5
74+ * Updated ` CssSyntaxError ` check
75+
7376* 5.1.4
7477 * Simplified error handling
7578 * Simplified postcss execution with object processors
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ var postcss = require('postcss')
33var applySourceMap = require ( 'vinyl-sourcemaps-apply' )
44var gutil = require ( 'gulp-util' )
55var path = require ( 'path' )
6- var CssSyntaxError = require ( 'postcss/lib/css-syntax-error' )
76
87
98module . exports = function ( processors , options ) {
@@ -70,7 +69,7 @@ module.exports = function (processors, options) {
7069
7170 function handleError ( error ) {
7271 var errorOptions = { fileName : file . path }
73- if ( error instanceof CssSyntaxError ) {
72+ if ( error . name === ' CssSyntaxError' ) {
7473 error = error . message + error . showSourceCode ( )
7574 errorOptions . showStack = false
7675 }
Original file line number Diff line number Diff line change 11{
22 "name" : " gulp-postcss" ,
3- "version" : " 5.1.5 " ,
3+ "version" : " 5.1.6 " ,
44 "description" : " PostCSS gulp plugin" ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ describe('PostCSS Guidelines', function () {
116116
117117 var sandbox = sinon . sandbox . create ( )
118118 var CssSyntaxError = function ( message , sourceCode ) {
119+ this . name = 'CssSyntaxError'
119120 this . message = message
120121 this . sourceCode = sourceCode
121122 this . showSourceCode = function ( ) {
@@ -130,7 +131,6 @@ describe('PostCSS Guidelines', function () {
130131 postcss : function ( ) {
131132 return postcssStub
132133 }
133- , 'postcss/lib/css-syntax-error' : CssSyntaxError
134134 } )
135135
136136 beforeEach ( function ( ) {
You can’t perform that action at this time.
0 commit comments