webpack-build-notifier
Advanced tools
Comparing version 2.0.1 to 2.1.0
# Changelog | ||
#### 2.1.0 | ||
###### _June 23, 2020_ | ||
- Upgraded dependencies to latest; fixed warning/error handling for child compilers ([#53](/../../issues/53)). | ||
#### 2.0.1 | ||
###### _May 23, 2020_ | ||
- Fixed bug where setting *sound* to *false* had no effect ([#51](/../../issues/51)). | ||
- Fixed bug where setting _sound_ to _false_ had no effect ([#51](/../../issues/51)). | ||
#### 2.0.0 | ||
###### _October 15, 2019_ | ||
@@ -14,2 +22,3 @@ | ||
#### 1.2.2 | ||
###### _October 15, 2019_ | ||
@@ -20,7 +29,9 @@ | ||
#### 1.2.1 | ||
###### _October 15, 2019_ | ||
- Added *showDuration* config option for [#48](/../../issues/48). | ||
- Added _showDuration_ config option for [#48](/../../issues/48). | ||
#### 1.1.1 | ||
###### _August 29, 2019_ | ||
@@ -31,2 +42,3 @@ | ||
#### 1.1.0 | ||
###### _August 10, 2019_ | ||
@@ -37,2 +49,3 @@ | ||
#### 1.0.3 | ||
###### _June 4, 2019_ | ||
@@ -43,7 +56,9 @@ | ||
#### 1.0.2 | ||
###### _May 3, 2019_ | ||
- Corrected *sound* TS types. | ||
- Corrected _sound_ TS types. | ||
#### 1.0.1 | ||
###### _April 16, 2019_ | ||
@@ -54,2 +69,3 @@ | ||
#### 1.0.0 | ||
###### _April 16, 2019_ | ||
@@ -60,2 +76,3 @@ | ||
#### 0.1.32 | ||
###### _April 16, 2019_ | ||
@@ -66,2 +83,3 @@ | ||
#### 0.1.31 | ||
###### _March 20, 2019_ | ||
@@ -72,2 +90,3 @@ | ||
#### 0.1.30 | ||
###### _October 7, 2018_ | ||
@@ -78,8 +97,10 @@ | ||
#### 0.1.29 | ||
###### _August 21, 2018_ | ||
- Fix for [#30](/../../issues/30), compilation notifications no longer ignore *sound* option. | ||
- Added new config option: *compilationSound* | ||
- Fix for [#30](/../../issues/30), compilation notifications no longer ignore _sound_ option. | ||
- Added new config option: _compilationSound_ | ||
#### 0.1.28 | ||
###### _June 30, 2018_ | ||
@@ -90,2 +111,3 @@ | ||
#### 0.1.27 | ||
###### _June 1, 2018_ | ||
@@ -96,7 +118,9 @@ | ||
#### 0.1.26 | ||
###### _May 31, 2018_ | ||
- Added two new config options: *notifyOptions* and *onTimeout* per [#26](/../../issues/26). | ||
- Added two new config options: _notifyOptions_ and _onTimeout_ per [#26](/../../issues/26). | ||
#### 0.1.25 | ||
###### _April 18, 2018_ | ||
@@ -107,2 +131,3 @@ | ||
#### 0.1.24 | ||
###### _April 15, 2018_ | ||
@@ -113,2 +138,3 @@ | ||
#### 0.1.23 | ||
###### _February 21, 2018_ | ||
@@ -119,2 +145,3 @@ | ||
#### 0.1.22 | ||
###### _January 16, 2018_ | ||
@@ -125,2 +152,3 @@ | ||
#### 0.1.21 | ||
###### _December 13, 2017_ | ||
@@ -131,2 +159,3 @@ | ||
#### 0.1.19 | ||
###### _December 13, 2017_ | ||
@@ -137,2 +166,3 @@ | ||
#### 0.1.18 | ||
###### _November 30, 2017_ | ||
@@ -143,14 +173,17 @@ | ||
#### 0.1.17 | ||
###### _November 6, 2017_ | ||
- Added notification hook for webpack "watch-run" compilation event to show notifications when the compilation process has started. | ||
Added *suppressCompileStart* and *compileIcon* configuration options to support this. This notification will not be shown by default; | ||
set *suppressCompileStart* to *false* to enable. | ||
Added _suppressCompileStart_ and _compileIcon_ configuration options to support this. This notification will not be shown by default; | ||
set _suppressCompileStart_ to _false_ to enable. | ||
#### 0.1.16 | ||
###### _July 25, 2017_ | ||
- Updated *suppressSuccess* configuration option to support "always" and "initial" values. | ||
- Updated _suppressSuccess_ configuration option to support "always" and "initial" values. | ||
#### 0.1.15 | ||
###### _July 17, 2017_ | ||
@@ -161,13 +194,15 @@ | ||
#### 0.1.14 | ||
###### _June 14, 2017_ | ||
- Added *warningSound* configuration option. | ||
- Added _warningSound_ configuration option. | ||
#### 0.1.13 | ||
###### _October 19, 2016_ | ||
- Added *messageFormatter* configuration option to allow custom formatting of notification message. | ||
- Added _messageFormatter_ configuration option to allow custom formatting of notification message. | ||
#### 0.1.12 | ||
#### 0.1.12 | ||
###### _July 25, 2016_ | ||
@@ -177,4 +212,4 @@ | ||
#### 0.1.11 | ||
#### 0.1.11 | ||
###### _July 16, 2016_ | ||
@@ -185,24 +220,29 @@ | ||
#### 0.1.10 | ||
###### _July 14, 2016_ | ||
- Added reference to *[strip-ansi](https://www.npmjs.com/package/strip-ansi)* NPM package to remove CLI color formatting from notifications. | ||
- Added reference to _[strip-ansi](https://www.npmjs.com/package/strip-ansi)_ NPM package to remove CLI color formatting from notifications. | ||
#### 0.1.9 | ||
###### _July 5, 2016_ | ||
- Added new *onClick* configuration option to allow for specifying of notification click behavior. | ||
- Added new _onClick_ configuration option to allow for specifying of notification click behavior. | ||
#### 0.1.8 | ||
###### _February 17, 2016_ | ||
- Added new *successSound* and *failureSound* configuration options to allow different sounds depending upon the notification type. The *sound* configuration is still supported, but these two new options will take precedence. | ||
- Added new _successSound_ and _failureSound_ configuration options to allow different sounds depending upon the notification type. The _sound_ configuration is still supported, but these two new options will take precedence. | ||
#### 0.1.7 | ||
###### _January 18, 2016_ | ||
- Fixed *sound* configuration option to allow "false" value to disable sound. | ||
- Fixed _sound_ configuration option to allow "false" value to disable sound. | ||
#### 0.1.6 | ||
###### _December 17, 2015_ | ||
- Added *suppressWarning* configuration option. | ||
- Added _suppressWarning_ configuration option. |
@@ -36,2 +36,3 @@ import { Config } from './types'; | ||
private readonly registerSnoreToast; | ||
private readonly getFirstWarningOrError; | ||
} |
@@ -81,4 +81,4 @@ "use strict"; | ||
if (results.hasErrors()) { | ||
var error = results.compilation.errors[0]; | ||
var errorFilePath = error.module && error.module.rawRequest ? error.module.rawRequest : ''; | ||
var error = _this.getFirstWarningOrError(results.compilation, 'errors'); | ||
var errorFilePath = error.module && error.module.resource ? error.module.resource : ''; | ||
notify = true; | ||
@@ -93,4 +93,4 @@ compilationStatus = types_1.CompilationStatus.ERROR; | ||
else if (!_this.suppressWarning && results.hasWarnings()) { | ||
var warning = results.compilation.warnings[0]; | ||
var warningFilePath = warning.module && warning.module.rawRequest ? warning.module.rawRequest : ''; | ||
var warning = _this.getFirstWarningOrError(results.compilation, 'warnings'); | ||
var warningFilePath = warning.module && warning.module.resource ? warning.module.resource : ''; | ||
notify = true; | ||
@@ -185,2 +185,15 @@ compilationStatus = types_1.CompilationStatus.WARNING; | ||
}; | ||
this.getFirstWarningOrError = function (compilation, type) { | ||
/* istanbul ignore else */ | ||
if (compilation.children && compilation.children.length) { | ||
for (var i = 0; i < compilation.children.length; i++) { | ||
var warningsOrErrors = compilation.children[i][type]; | ||
/* istanbul ignore else */ | ||
if (warningsOrErrors && warningsOrErrors[0]) { | ||
return warningsOrErrors[0]; | ||
} | ||
} | ||
} | ||
return compilation[type][0]; | ||
}; | ||
Object.assign(this, cfg); | ||
@@ -187,0 +200,0 @@ if (this.sound) { |
{ | ||
"name": "webpack-build-notifier", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "A Webpack plugin that generates OS notifications for build steps using node-notifier.", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.js", | ||
"test": "jest", | ||
"test:ci": "jest --coverageReporters=text-lcov | coveralls", | ||
"test:ci": "jest --coverage && coveralls < coverage/lcov.info", | ||
"test-watch": "jest --runInBand --watch" | ||
@@ -39,20 +39,24 @@ }, | ||
"dependencies": { | ||
"node-notifier": "6.0.0", | ||
"strip-ansi": "^5.2.0" | ||
"node-notifier": "7.0.1", | ||
"strip-ansi": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^24.0.19", | ||
"@types/node-notifier": "^5.4.0", | ||
"@types/jest": "^25.2.3", | ||
"@types/node-notifier": "^6.0.1", | ||
"@types/strip-ansi": "^5.2.1", | ||
"@types/webpack": "^4.39.3", | ||
"babel-jest": "^24.9.0", | ||
"copyfiles": "^2.1.1", | ||
"jest": "^24.9.0", | ||
"rimraf": "^3.0.0", | ||
"ts-jest": "^24.1.0", | ||
"tslint": "^5.20.0", | ||
"@types/webpack": "^4.41.13", | ||
"autoprefixer": "^9.8.1", | ||
"babel-jest": "^26.0.1", | ||
"copyfiles": "^2.2.0", | ||
"css-loader": "^3.6.0", | ||
"extract-css-chunks-webpack-plugin": "^4.7.5", | ||
"jest": "^26.0.1", | ||
"postcss-loader": "^3.0.0", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^26.0.0", | ||
"tslint": "^6.1.2", | ||
"tslint-config-airbnb": "^5.11.2", | ||
"typescript": "^3.9.3", | ||
"webpack": "^4.41.2" | ||
"webpack": "^4.43.0" | ||
} | ||
} |
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
113389
432
17
+ Addedansi-regex@5.0.1(transitive)
+ Addednode-notifier@7.0.1(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addeduuid@7.0.3(transitive)
+ Addedwhich@2.0.2(transitive)
- Removedansi-regex@4.1.1(transitive)
- Removednode-notifier@6.0.0(transitive)
- Removedsemver@6.3.1(transitive)
- Removedstrip-ansi@5.2.0(transitive)
- Removedwhich@1.3.1(transitive)
Updatednode-notifier@7.0.1
Updatedstrip-ansi@^6.0.0