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

broccoli-standard

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-standard - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

43

lib/index.js

@@ -5,2 +5,4 @@ const Filter = require('broccoli-persistent-filter')

const path = require('path')
const md5Hex = require('md5-hex')
const stringify = require('json-stable-stringify')
const escapeStringRegexp = require('escape-string-regexp')

@@ -142,26 +144,25 @@ const BUILD_DIR_REGEXP = new RegExp('(' + escapeStringRegexp(path.sep) + ')?build(' + escapeStringRegexp(path.sep) + ')?$')

StandardValidationFilter.prototype.postProcess = function postProcess({ report, output } /* , relativePath */) {
// if verification has result
if (report.results.length &&
report.results[0].messages.length) {
StandardValidationFilter.prototype.postProcess = function postProcess ({ report, output } /* , relativePath */) {
// if verification has result
if (report.results.length &&
report.results[0].messages.length) {
const throwOnWarn = !!this.internalOptions.throwOnWarn
const throwOnError = !!this.internalOptions.throwOnError
const throwOnWarn = !!this.internalOptions.throwOnWarn;
const throwOnError = !!this.internalOptions.throwOnError;
if (throwOnWarn || throwOnError) {
const resultSeverity = getResultSeverity(report.results[0].messages)
if (throwOnWarn || throwOnError) {
const resultSeverity = getResultSeverity(report.results[0].messages);
if (resultSeverity === 1 && throwOnWarn) {
throw new Error('rules violation with `warn` severity level')
}
if (resultSeverity === 1 && throwOnWarn) {
throw new Error('rules violation with `warn` severity level');
}
if (resultSeverity >= 2 && (throwOnWarn || throwOnError)) {
throw new Error('rules violation with `error` severity level')
}
}
}
if (resultSeverity >= 2 && (throwOnWarn || throwOnError)) {
throw new Error('rules violation with `error` severity level');
}
}
}
return {
output
};
};
return {
output
}
}
{
"name": "broccoli-standard",
"version": "0.1.2",
"version": "0.1.3",
"description": "broccoli filter for standard formatting",

@@ -40,5 +40,6 @@ "main": "lib/index.js",

"broccoli-persistent-filter": "^1.2.11",
"escape-string-regexp": "^1.0.5",
"eslint": "^3.0.0",
"escape-string-regexp": "^1.0.5",
"js-string-escape": "^1.0.1",
"json-stable-stringify": "^1.0.1",
"md5-hex": "^1.3.0",

@@ -45,0 +46,0 @@ "standard": "^8.4.0",

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