New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flow-status-webpack-plugin

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-status-webpack-plugin - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

.idea/codeStyles/codeStyleConfig.xml

39

index.js

@@ -29,8 +29,7 @@ var shell = require('shelljs');

function startFlowIfFirstRun(compiler, cb) {
function startFlowIfFirstRun(cb) {
if (firstRun) {
firstRun = false;
startFlow(cb);
}
else {
} else {
cb();

@@ -55,9 +54,8 @@ }

var flowError = null
var flowError = null;
function checkItWreckIt(compiler, cb) {
startFlowIfFirstRun(compiler, function () {
function checkItWreckIt(cb) {
startFlowIfFirstRun(function () {
flowStatus(function success(stdout) {
onSuccess(stdout);
cb();

@@ -68,18 +66,19 @@ }, function error(stdout) {

flowError = new Error(stdout);
// Here we don't pass error to callback because
// webpack-dev-middleware would just throw it
// and cause webpack dev server to exit with
// an error status code. Obviously, having to restart
// the development webpack server after every flow
// check error would be too annoying.
cb()
})
})
// Do not pass error to callback to avoid dev server exit
cb();
});
});
}
compiler.plugin('run', checkItWreckIt);
compiler.plugin('watch-run', checkItWreckIt);
// Webpack 5 hooks
compiler.hooks.run.tapAsync('FlowStatusWebpackPlugin', (compilation, callback) => {
checkItWreckIt(callback);
});
// If there are flow errors, fail the build before compilation starts.
compiler.plugin('compilation', function (compilation) {
compiler.hooks.watchRun.tapAsync('FlowStatusWebpackPlugin', (compilation, callback) => {
checkItWreckIt(callback);
});
// Add errors to compilation if needed
compiler.hooks.compilation.tap('FlowStatusWebpackPlugin', (compilation) => {
if (flowError) {

@@ -86,0 +85,0 @@ if (failOnError === true) {

{
"name": "flow-status-webpack-plugin",
"version": "0.1.7",
"version": "0.1.8",
"author": "Diego Durli <dgodurli@gmail> (https://github.com/diegodurli)",

@@ -5,0 +5,0 @@ "dependencies": {

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