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

webpack-build-notifier

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-build-notifier - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

15

index.js

@@ -106,4 +106,15 @@ /**

* 2) {String} filepath - The path to the file containing the error/warning (if available).
* This function must return a String.
* The default messageFormatter will display the filename which contains the error/warning followed by the
* error/warning message.
* Note that the message will always be limited to 256 characters.
*/
this.messageFormatter = cfg.messageFormatter || this.messageFormatter;
this.messageFormatter = function(error, filepath) {
var message = (cfg.messageFormatter || this.defaultMessageFormatter)(error, filepath);
if (typeof message === "string") {
return message.substr(0, 256); // limit message length to 256 characters, fixes #20
} else {
throw "Invalid message type '" + typeof message + "'; messageFormatter must return a String.";
}
};

@@ -117,3 +128,3 @@ // add notification click handler to activate terminal window

WebpackBuildNotifierPlugin.prototype.messageFormatter = function(error, filepath) {
WebpackBuildNotifierPlugin.prototype.defaultMessageFormatter = function(error, filepath) {
return filepath + os.EOL + (error.message ? error.message.replace(error.module ? error.module.resource : '', '') : '');

@@ -120,0 +131,0 @@ };

@@ -0,0 +0,0 @@ MIT License

9

package.json
{
"name": "webpack-build-notifier",
"version": "0.1.17",
"version": "0.1.18",
"description": "A Webpack plugin that generates OS notifications for build steps using node-notifier.",

@@ -27,9 +27,8 @@ "main": "index.js",

"ansi-regex": "^2.0.0",
"node-notifier": "^4.1.0",
"strip-ansi": "^3.0.1"
"strip-ansi": "^3.0.1",
"node-notifier": "^5.1.2"
},
"devDependencies": {
"eslint": "^1.1.0",
"node-notifier": "^4.3.1"
"eslint": "^1.1.0"
}
}

@@ -92,2 +92,7 @@ # webpack-build-notifier

This function must return a String.
The default messageFormatter will display the filename which contains the error/warning followed by the
error/warning message.
Note that the message will always be limited to 256 characters.
#### onClick

@@ -110,2 +115,7 @@ A function called when the notification is clicked. By default it activates the Terminal application.

---------
#### 0.1.18
###### _November 30, 2017_
- Updated `node-notifier` package version to latest; enforced max message length to 256 to fix [#20](/../../issues/20).
#### 0.1.17

@@ -112,0 +122,0 @@ ###### _November 6, 2017_

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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