Socket
Socket
Sign inDemoInstall

node-notifier

Package Overview
Dependencies
5
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.2.1 to 5.3.0

160

CHANGELOG.md
# Changelog
### `v5.3.0`
- Re-adds `notifu` update.
### `v5.2.1`
* Rollback `notifu` update as it triggered Avast virus scan.
- Rollback `notifu` update as it triggered Avast virus scan.
### `v5.2.0`
* Updates `terminal-notifier` dependency to `v1.7.2`, fixing memory leak. But not to `v1.8.0` as this breaks how icons work.
* Updates `notifu` with new subtitle "Notification"
* Fix: issue with `appID` by removing default empty string (see README Windows section)
* Fix: link notifier time property to notify-send expire-time flag
- Updates `terminal-notifier` dependency to `v1.7.2`, fixing memory leak. But not to `v1.8.0` as this breaks how icons work.
- Updates `notifu` with new subtitle "Notification"
- Fix: issue with `appID` by removing default empty string (see README Windows section)
- Fix: link notifier time property to notify-send expire-time flag
* Minor change: use a more specific condition for enabling debug logging ([#171](https://github.com/mikaelbr/node-notifier/pull/171))
- Minor change: use a more specific condition for enabling debug logging ([#171](https://github.com/mikaelbr/node-notifier/pull/171))
### `v5.1.2`
* Adds temporary workaround for `terminal-notifier` memory leak as seen in https://github.com/facebook/jest/issues/2999 and https://github.com/julienXX/terminal-notifier/issues/173.
* Add appName option and hide snoreToast if not setted ([#158](https://github.com/mikaelbr/node-notifier/pull/158))
- Adds temporary workaround for `terminal-notifier` memory leak as seen in https://github.com/facebook/jest/issues/2999 and https://github.com/julienXX/terminal-notifier/issues/173.
- Add appName option and hide snoreToast if not setted ([#158](https://github.com/mikaelbr/node-notifier/pull/158))

@@ -35,11 +39,11 @@ ### `v5.0.2`

1. CLI is now removed. Can be found in separate project: https://github.com/mikaelbr/node-notifier-cli. This means you no longer get the `notify` bin when installing `node-notifier`. To get this do `npm i [-g] node-notifier-cli`
2. Changed toaster implementation from `toast.exe` to [Snoretoast](https://github.com/KDE/snoretoast). This means if you are using your custom fork, you need to change. SnoreToast has some better default implemented functionality.
3. [terminal-notifier](https://github.com/julienXX/terminal-notifier) dependency has been bumped to `v1.7.1`. With that there can be changes in the API, and supports now reply and buttons. Output has changed to JSON by default, this means the output of some functions of the terminal-notifier has broken. See https://github.com/julienXX/terminal-notifier for more details. See [README](https://github.com/mikaelbr/node-notifier#usage-notificationcenter) for documentation on how to use the new features, or [an example file](https://github.com/mikaelbr/node-notifier/blob/master/example/macInput.js).
4. `notify` method will now throw error if second argument is something else than function (still optional): [#138](https://github.com/mikaelbr/node-notifier/pull/138).
1. CLI is now removed. Can be found in separate project: https://github.com/mikaelbr/node-notifier-cli. This means you no longer get the `notify` bin when installing `node-notifier`. To get this do `npm i [-g] node-notifier-cli`
2. Changed toaster implementation from `toast.exe` to [Snoretoast](https://github.com/KDE/snoretoast). This means if you are using your custom fork, you need to change. SnoreToast has some better default implemented functionality.
3. [terminal-notifier](https://github.com/julienXX/terminal-notifier) dependency has been bumped to `v1.7.1`. With that there can be changes in the API, and supports now reply and buttons. Output has changed to JSON by default, this means the output of some functions of the terminal-notifier has broken. See https://github.com/julienXX/terminal-notifier for more details. See [README](https://github.com/mikaelbr/node-notifier#usage-notificationcenter) for documentation on how to use the new features, or [an example file](https://github.com/mikaelbr/node-notifier/blob/master/example/macInput.js).
4. `notify` method will now throw error if second argument is something else than function (still optional): [#138](https://github.com/mikaelbr/node-notifier/pull/138).
#### Additions
1. Now supports \*BSD systems: [#142](https://github.com/mikaelbr/node-notifier/pull/142).
2. With the new toaster implementation you can do more! For instance customize sound and close notification. See all options:
1. Now supports \*BSD systems: [#142](https://github.com/mikaelbr/node-notifier/pull/142).
2. With the new toaster implementation you can do more! For instance customize sound and close notification. See all options:

@@ -62,3 +66,3 @@ ```javascript

1. Fixes new lines on messages on Windows: [#123](https://github.com/mikaelbr/node-notifier/issues/123)
1. Fixes new lines on messages on Windows: [#123](https://github.com/mikaelbr/node-notifier/issues/123)

@@ -69,22 +73,22 @@ #### Technical Changes

1. Dependencies bumped
2. Unnecessary dependencies removed (`lodash.deepClone`). Now uses JSON serialize/deserialize instead.
3. Project is auto-formatted by [`prettier`](https://github.com/jlongster/prettier).
4. [Linting is added](https://github.com/mikaelbr/node-notifier/blob/master/.eslintrc)
5. Added way to better debug what is happening by setting `DEBUG` env-var to `true`. See [CONTRIBUTE.md](https://github.com/mikaelbr/node-notifier/blob/master/CONTRIBUTE.md) for more details.
1. Dependencies bumped
2. Unnecessary dependencies removed (`lodash.deepClone`). Now uses JSON serialize/deserialize instead.
3. Project is auto-formatted by [`prettier`](https://github.com/jlongster/prettier).
4. [Linting is added](https://github.com/mikaelbr/node-notifier/blob/master/.eslintrc)
5. Added way to better debug what is happening by setting `DEBUG` env-var to `true`. See [CONTRIBUTE.md](https://github.com/mikaelbr/node-notifier/blob/master/CONTRIBUTE.md) for more details.
### `v4.6.1`
1. Adds npm ignore file, ignoring tests and examples from package.
2. Fixes CI builds.
1. Adds npm ignore file, ignoring tests and examples from package.
2. Fixes CI builds.
### `v4.6.0`
1. Adds support for Icon URL in Growl ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/115))
2. Adds options for passing host and port to cli tool ([reported by @el-davo](https://github.com/mikaelbr/node-notifier/issues/106))
3. Fixes sanitize response on `notify` callback ([by @MadLittleMods](https://github.com/mikaelbr/node-notifier/commit/a44454a11eff452a8b55f9fbe291e189ed088708))
4. Fixes use of new line in messages ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/115))
5. Fixes use of `file:///xxx` protocol icon paths for Windows 8.1 ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/118))
6. Fixes non-TTY usage and piping messages ([reported by @simensen](https://github.com/mikaelbr/node-notifier/issues/109))
7. Updates vendor terminal-notifier version to 1.6.3 ([reported by @kid-icarus](https://github.com/mikaelbr/node-notifier/pull/120))
1. Adds support for Icon URL in Growl ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/115))
2. Adds options for passing host and port to cli tool ([reported by @el-davo](https://github.com/mikaelbr/node-notifier/issues/106))
3. Fixes sanitize response on `notify` callback ([by @MadLittleMods](https://github.com/mikaelbr/node-notifier/commit/a44454a11eff452a8b55f9fbe291e189ed088708))
4. Fixes use of new line in messages ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/115))
5. Fixes use of `file:///xxx` protocol icon paths for Windows 8.1 ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/118))
6. Fixes non-TTY usage and piping messages ([reported by @simensen](https://github.com/mikaelbr/node-notifier/issues/109))
7. Updates vendor terminal-notifier version to 1.6.3 ([reported by @kid-icarus](https://github.com/mikaelbr/node-notifier/pull/120))

@@ -95,3 +99,3 @@ ### `v4.5.0`

1. Adds syntactic sugar for `notify`. Now able to just pass message:
1. Adds syntactic sugar for `notify`. Now able to just pass message:

@@ -106,10 +110,10 @@ ```js

1. Improvements to docs and examples
2. Updates `semver` dependency to support Webpacking with Electron.
1. Improvements to docs and examples
2. Updates `semver` dependency to support Webpacking with Electron.
### `v4.4.0`
1. Changes to exec terminal-notifier through execFile to allow for asar-packages
2. Adds support for remote growl server
3. Adds support for win7 with electron asar-package
1. Changes to exec terminal-notifier through execFile to allow for asar-packages
2. Adds support for remote growl server
3. Adds support for win7 with electron asar-package

@@ -120,8 +124,8 @@ ### `v4.3.1`

1. Adds new stdin CLI options to docs
1. Adds new stdin CLI options to docs
### `v4.3.0`
1. Adds support for piping messages in to CLI.
(With `node-notifier` installed as a CLI `npm i -g node-notifier`)
1. Adds support for piping messages in to CLI.
(With `node-notifier` installed as a CLI `npm i -g node-notifier`)

@@ -136,48 +140,48 @@ ```shell

1. Fixed input arguments to CLI to be strings where they should be strings.
1. Fixed input arguments to CLI to be strings where they should be strings.
### `v4.2.2`
1. Fixed no notification when no message for the CLI. [#58](https://github.com/mikaelbr/node-notifier/pull/58)
2. Changes `which` test to be sync, avoiding some edge cases with multiple notifications.
1. Fixed no notification when no message for the CLI. [#58](https://github.com/mikaelbr/node-notifier/pull/58)
2. Changes `which` test to be sync, avoiding some edge cases with multiple notifications.
### `v4.2.1`
1. Minor fix for docs in CLI usage
1. Minor fix for docs in CLI usage
### `v4.2.0`
1. Adds CLI support.
2. Fixes Debug "HRESULT : 0xC00CE508" exception on Win8. PR [#49](https://github.com/mikaelbr/node-notifier/pull/49)
1. Adds CLI support.
2. Fixes Debug "HRESULT : 0xC00CE508" exception on Win8. PR [#49](https://github.com/mikaelbr/node-notifier/pull/49)
### `v4.1.2`
1. Fixes correct terminal-notifier (own fork https://github.com/mikaelbr/terminal-notifier)
to support activate / click.
1. Fixes correct terminal-notifier (own fork https://github.com/mikaelbr/terminal-notifier)
to support activate / click.
### `v4.1.1`
1. Fixes proper error codes for balloon: #42
2. Removes unused debug files: #41
3. Patches differences between subtitle for notify-send: #43
4. Updates terminal-notifier dependency (removing black borders) #44 #18
1. Fixes proper error codes for balloon: #42
2. Removes unused debug files: #41
3. Patches differences between subtitle for notify-send: #43
4. Updates terminal-notifier dependency (removing black borders) #44 #18
### `v4.1.0`
1. Adds support for changing host and port for Growl.
1. Adds support for changing host and port for Growl.
### `v4.0.3`
1. Fixes Notification center issue with multiple callback events.
2. Fixes error in source code: Fixes long-spaces to proper spaces
1. Fixes Notification center issue with multiple callback events.
2. Fixes error in source code: Fixes long-spaces to proper spaces
### `v4.0.2`
1. Fixes issue with immidiate notifu notifications (with `wait : false`)
2. Fixes issue with boolean flags for notifu.
3. Restructures directories. Making it easier to require notifiers directly.
1. Fixes issue with immidiate notifu notifications (with `wait : false`)
2. Fixes issue with boolean flags for notifu.
3. Restructures directories. Making it easier to require notifiers directly.
### `v4.0.1`
1. Fixes issue with optional callback for notify-send
1. Fixes issue with optional callback for notify-send

@@ -188,3 +192,3 @@ ### `v4.0.0`

1. require('node-notifier') now returns an instance with fallbackable notifications.
1. require('node-notifier') now returns an instance with fallbackable notifications.

@@ -196,5 +200,5 @@ ```js

2. Introduced a `wait` property (default `false`), to get user input for
Notification Center, Windows Toaster, Windows Balloons and Growl. Sadly not
for notify-send.
2. Introduced a `wait` property (default `false`), to get user input for
Notification Center, Windows Toaster, Windows Balloons and Growl. Sadly not
for notify-send.

@@ -209,4 +213,4 @@ ```js

3. All notification instances are now event emitters, emitting events
`click` or `timeout`. This is only applicable if `{ wait: true }`.
3. All notification instances are now event emitters, emitting events
`click` or `timeout`. This is only applicable if `{ wait: true }`.

@@ -221,5 +225,5 @@ ```js

4. WindowsToaster and NotificationCenter now can have sounds by doing `{ sound: true }`.
Default NotificationCenter sound is Bottle. Can still use define sound on
Mac:
4. WindowsToaster and NotificationCenter now can have sounds by doing `{ sound: true }`.
Default NotificationCenter sound is Bottle. Can still use define sound on
Mac:

@@ -235,40 +239,40 @@ ```js

1. Adds Growl as priority over Balloons
1. Adds Growl as priority over Balloons
### `v3.3.0`
1. Adds support for native Windows 7 and earlier (through task bar balloons)
2. Changes growl implementation. Adds better support for GNTP
1. Adds support for native Windows 7 and earlier (through task bar balloons)
2. Changes growl implementation. Adds better support for GNTP
### `v3.2.1`
1. Fixes support for notifications from folders with spaces on Windows.
1. Fixes support for notifications from folders with spaces on Windows.
### `v3.2.0`
1. Adds native Windows 8 support.
1. Adds native Windows 8 support.
### `v3.1.0`
1. Adds Growl as fallback for Mac OS X pre 10.8.
1. Adds Growl as fallback for Mac OS X pre 10.8.
### `v3.0.6`
1. Fixes typo: Changes Growl app name from `Gulp` to `Node`.
1. Fixes typo: Changes Growl app name from `Gulp` to `Node`.
### `v3.0.5`
1. Maps common options between the different notifiers. Allowing for common usage with different notifiers.
1. Maps common options between the different notifiers. Allowing for common usage with different notifiers.
### `v3.0.4`
1. Fixes expires for notify-send (Issue #13)
1. Fixes expires for notify-send (Issue #13)
### `v3.0.2`
1. Fixes version check for Mac OS X Yosemite
1. Fixes version check for Mac OS X Yosemite
### `v3.0.0`
1. Updates terminal-notifier to version 1.6.0; adding support for appIcon and contentImage
2. Removes parsing of output sent from notifier (Notification Center)
1. Updates terminal-notifier to version 1.6.0; adding support for appIcon and contentImage
2. Removes parsing of output sent from notifier (Notification Center)
{
"name": "node-notifier",
"version": "5.2.1",
"description":
"A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)",
"version": "5.3.0",
"description": "A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)",
"main": "index.js",

@@ -40,17 +39,17 @@ "scripts": {

"devDependencies": {
"eslint": "^4.15.0",
"eslint-config-semistandard": "^12.0.0",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"eslint": "^5.0.1",
"eslint-config-semistandard": "^12.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.1.0",
"husky": "^0.14.3",
"jest": "^22.0.6",
"lint-staged": "^6.0.0",
"prettier": "^1.10.2"
"jest": "^23.2.0",
"lint-staged": "^7.1.0",
"prettier": "^1.12.1"
},
"dependencies": {
"growly": "^1.3.0",
"semver": "^5.4.1",
"semver": "^5.5.0",
"shellwords": "^0.1.1",

@@ -60,3 +59,6 @@ "which": "^1.3.0"

"lint-staged": {
"*.{js,json,css,md}": ["prettier --write", "git add"]
"*.{js,json,css,md}": [
"prettier --write",
"git add"
]
},

@@ -63,0 +65,0 @@ "bugs": {

# node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]
Send cross platform native notifications using Node.js. Notification Center for macOS,
notify-osd/libnotify-bin for Linux, Toasters for Windows 8/10, or taskbar Balloons for
`notify-osd`/`libnotify-bin` for Linux, Toasters for Windows 8/10, or taskbar balloons for
earlier Windows versions. Growl is used if none of these requirements are met.
[Works well with electron](#within-electron-packaging).
[Works well with Electron](#within-electron-packaging).

@@ -33,8 +33,8 @@ ![macOS Screenshot](https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/mac.png)

* **macOS**: >= 10.8 or Growl if earlier.
* **macOS**: >= 10.8 for native notifications, or Growl if earlier.
* **Linux**: `notify-osd` or `libnotify-bin` installed (Ubuntu should have this by default)
* **Windows**: >= 8, task bar balloon for Windows < 8. Growl as fallback. Growl takes precedence over Windows balloons.
* **Windows**: >= 8, or task bar balloons for Windows < 8. Growl as fallback. Growl takes precedence over Windows balloons.
* **General Fallback**: Growl
See [documentation and flow chart for reporter choice](./DECISION_FLOW.md)
See [documentation and flow chart for reporter choice](./DECISION_FLOW.md).

@@ -47,5 +47,6 @@ ## Install

## CLI
## <abbr title="Command Line Interface">CLI</abbr>
CLI is moved to separate project: https://github.com/mikaelbr/node-notifier-cli
<abbr title="Command Line Interface">CLI</abbr> has moved to separate project:
<https://github.com/mikaelbr/node-notifier-cli>

@@ -56,3 +57,3 @@ ## Cross-Platform Advanced Usage

[reporter flow chart](./DECISION_FLOW.md). All of the options
below will work in a way or another on all platforms.
below will work in some way or another on all platforms.

@@ -85,8 +86,9 @@ ```javascript

You can also specify what reporter you want to use if you
want to customize it or have more specific options per system.
See documentation for each reporter below.
If you want super fine-grained control, you can customize each reporter individually,
allowing you to tune specific options for different systems.
Example:
See below for documentation on each reporter.
**Example:**
```javascript

@@ -109,6 +111,6 @@ const NotificationCenter = require('node-notifier/notifiers/notificationcenter');

Or if you are using several (or you are lazy):
(note: technically, this takes longer to require)
Or, if you are using several reporters (or you're lazy):
```javascript
// NOTE: Technically, this takes longer to require
const nn = require('node-notifier');

@@ -131,5 +133,5 @@

### Usage NotificationCenter
### Usage: `NotificationCenter`
Same usage and parameter setup as [terminal-notifier](https://github.com/julienXX/terminal-notifier).
Same usage and parameter setup as [**`terminal-notifier`**](https://github.com/julienXX/terminal-notifier).

@@ -142,9 +144,13 @@ Native Notification Center requires macOS version 10.8 or higher. If you have

Wrapping around [terminal-notifier](https://github.com/julienXX/terminal-notifier), you can
do all terminal-notifier can do through properties to the `notify` method. E.g.
if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`, or
if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`. Notification
is the primary focus for this module, so listing and activating do work,
but isn't documented.
Because `node-notifier` wraps around [**`terminal-notifier`**](https://github.com/julienXX/terminal-notifier),
you can do anything `terminal-notifier` can, just by passing properties to the `notify`
method.
For example:
* if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`
* if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`.
Notification is the primary focus of this module, so listing and activating do work,
but they aren't documented.
### All notification options with their defaults:

@@ -164,3 +170,3 @@

subtitle: void 0,
message: void 0,
message: void 0,
sound: false, // Case Sensitive string for location of sound file, or use one of macOS' native sounds (see below)

@@ -185,43 +191,75 @@ icon: 'Terminal Icon', // Absolute Path to Triggering Icon

**Note:** `wait` option is shorthand for `timeout: 5` and doesn't make the notification sticky, but sets
timeout for 5 seconds. Without `wait` or `timeout` notifications are just fired and forgotten Without
given any response. To be able to listen for response (like activation/clicked), you have to define a timeout.
This is not true if you have defined `reply`. If using `reply` it's recommended to set a high timeout or no timeout at all.
----
**For macOS notifications, icon and contentImage, and all forms of reply/actions requires macOS 10.9.**
**Note:** The `wait` option is shorthand for `timeout: 5`. This just sets a timeout
for 5 seconds. It does _not_ make the notification sticky!
Without `wait` or `timeout`, notifications are just fired and forgotten. They don't
wait for any response.
To make notifications wait for a response (like activation/click), you must define
a `timeout`.
_Exception:_ If `reply` is defined, it's recommended to set `timeout` to a either
high value, or to nothing at all.
----
**For macOS notifications: `icon`, `contentImage`, and all forms of `reply`/`actions` require macOS 10.9.**
Sound can be one of these: `Basso`, `Blow`, `Bottle`, `Frog`, `Funk`, `Glass`,
`Hero`, `Morse`, `Ping`, `Pop`, `Purr`, `Sosumi`, `Submarine`, `Tink`.
If sound is simply `true`, `Bottle` is used.
See [specific Notification Center example](./example/advanced.js). Also, [see input example](./example/macInput.js).
If `sound` is simply `true`, `Bottle` is used.
----
**See Also:**
* [Example: specific Notification Centers](./example/advanced.js)
* [Example: input](./example/macInput.js).
----
**Custom Path clarification**
`customPath` takes a value of a relative or absolute path to the binary of your fork/custom version of terminal-notifier.
`customPath` takes a value of a relative or absolute path to the binary of your
fork/custom version of **`terminal-notifier`**.
Example: `./vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier`
**Example:** `./vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier`
### Usage WindowsToaster
### Usage: `WindowsToaster`
**Note:** There are some limitations for images in native Windows 8 notifications:
The image must be a PNG image, and cannot be over 1024x1024 px, or over over 200Kb.
You also need to specify the image by using an absolute path. These limitations are
due to the Toast notification system. A good tip is to use something like
`path.join` or `path.delimiter` to have cross-platform pathing.
* The image must be a PNG image
* The image must be smaller than 1024×1024 px
* The image must be less than 200kb
* The image must be specified using an absolute path
These limitations are due to the Toast notification system. A good tip is to use
something like `path.join` or `path.delimiter` to keep your paths cross-platform.
From [mikaelbr/gulp-notify#90 (comment)](https://github.com/mikaelbr/gulp-notify/issues/90#issuecomment-129333034)
> You can make it work by going to System > Notifications & Actions. The 'toast' app needs to have Banners enabled. (You can activate banners by clicking on the 'toast' app and setting the 'Show notification banners' to On)
> You can make it work by going to System > Notifications & Actions. The 'toast'
> app needs to have Banners enabled. (You can activate banners by clicking on the
> 'toast' app and setting the 'Show notification banners' to On)
----
**Windows 10 Fall Creators Update (Version 1709) Note:**
With the Fall Creators Update Notifications on Windows 10 will only work as expected if the correct appID is specified.
Your appID has to be exactly the same as registered with the install of your app.
You can find the ID of your App by searching the registry for the appID you specified at installation of your app. For example if you are using the squirrel framework your appID will be something like com.squirrel.your.app.
With the Fall Creators Update, Notifications on Windows 10 will only work as
expected if the correct `appID` is specified. Your `appID` must be exactly the same
value that was registered during the installation of your app.
Default behaviour is to have the underlying toaster applicaton as appId. This works as expected, but shows `SnoreToast` as text in the notification.
You can find the ID of your App by searching the registry for the `appID` you
specified at installation of your app. For example: If you use the squirrel
framework, your `appID` will be something like `com.squirrel.your.app`.
[Snoretoast](https://github.com/KDE/snoretoast) is used to get native Windows Toasts!
The default behaviour is to have the underlying toaster applicaton as `appId`.
This works as expected, but shows `SnoreToast` as text in the notification.
[**Snoretoast**](https://github.com/KDE/snoretoast) is used to get native Windows Toasts!
```javascript

@@ -253,3 +291,3 @@ const WindowsToaster = require('node-notifier').WindowsToaster;

### Usage Growl
### Usage: `Growl`

@@ -278,10 +316,9 @@ ```javascript

See more information about using
[growly](https://github.com/theabraham/growly/).
See more information about using [growly](https://github.com/theabraham/growly/).
### Usage WindowsBalloon
### Usage: `WindowsBalloon`
For earlier Windows versions, the taskbar balloons are used (unless
fallback is activated and Growl is running). For balloons, a great
project called [notifu](http://www.paralint.com/projects/notifu/) is used.
For earlier versions of Windows, taskbar balloons are used (unless
fallback is activated and Growl is running). The balloons notifier uses a great
project called [**`notifu`**](http://www.paralint.com/projects/notifu/).

@@ -311,7 +348,7 @@ ```javascript

See full usage on the [project homepage: notifu](http://www.paralint.com/projects/notifu/).
See full usage on the [project homepage: **`notifu`**](http://www.paralint.com/projects/notifu/).
### Usage NotifySend
### Usage: `NotifySend`
Note: notify-send doesn't support the wait flag.
**Note:** `notify-send` doesn't support the `wait` flag.

@@ -336,12 +373,13 @@ ```javascript

See flags and options [on the man pages](http://manpages.ubuntu.com/manpages/gutsy/man1/notify-send.1.html)
See flags and options on the man page [`notify-send(1)`](http://manpages.ubuntu.com/manpages/gutsy/man1/notify-send.1.html)
## Thanks to OSS
`node-notifier` is made possible through Open Source Software. A very special thanks to all the modules `node-notifier` uses.
`node-notifier` is made possible through Open Source Software.
A very special thanks to all the modules `node-notifier` uses.
* [terminal-notifier](https://github.com/julienXX/terminal-notifier)
* [Snoretoast](https://github.com/KDE/snoretoast)
* [notifu](http://www.paralint.com/projects/notifu/)
* [growly](https://github.com/theabraham/growly/)
* [`terminal-notifier`](https://github.com/julienXX/terminal-notifier)
* [`Snoretoast`](https://github.com/KDE/snoretoast)
* [`notifu`](http://www.paralint.com/projects/notifu/)
* [`growly`](https://github.com/theabraham/growly/)

@@ -352,20 +390,42 @@ [![NPM downloads][npm-downloads]][npm-url]

### `SnoreToast` text on Windows
### Windows: `SnoreToast` text
See note on "Windows 10 Fall Creators Update" in Windows section. Short answer, update to your own `appId`.
See note on "Windows 10 Fall Creators Update" in Windows section.
_**Short answer:** update your `appId`._
### Use inside tmux session
When using node-notifier within a tmux session, it can cause a hang in the system. This can be solved by following the steps described in this comment: https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742
When using `node-notifier` within a tmux session, it can cause a hang in the system.
This can be solved by following the steps described in [this comment](https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742)
See more info here: https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801
There’s even more info [here](https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801)
<https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801>.
### Custom icon without terminal icon on macOS
### macOS: Custom icon without Terminal icon
Even if you define an icon in the configuration object for `node-notifier`, you will see a small Terminal icon in the notification (see the example at the top of this document). This is the way notifications on macOS work, it always show the parent icon of the application initiating the notification. For node-notifier, terminal-notifier is the initiator and has Terminal icon defined as its icon. To define your custom icon, you need to fork terminal-notifier and build your custom version with your icon. See this issue for more info: https://github.com/mikaelbr/node-notifier/issues/71
Even if you define an icon in the configuration object for `node-notifier`, you will
see a small Terminal icon in the notification (see the example at the top of this
document).
This is the way notifications on macOS work. They always show the icon of the
parent application initiating the notification. For `node-notifier`, `terminal-notifier`
is the initiator, and it has the Terminal icon defined as its icon.
To define your custom icon, you need to fork `terminal-notifier` and build your
custom version with your icon.
See [Issue #71 for more info](https://github.com/mikaelbr/node-notifier/issues/71)
<https://github.com/mikaelbr/node-notifier/issues/71>.
### Within Electron Packaging
If packaging your Electron app as an `asar`, you will find node-notifier will fail to load. Due to the way asar works, you cannot execute a binary from within an asar. As a simple solution, when packaging the app into an asar please make sure you `--unpack` the vendor folder of node-notifier, so the module still has access to the notification binaries. To do this, you can do so by using the following command:
If packaging your Electron app as an `asar`, you will find `node-notifier` will fail to load.
Due to the way asar works, you cannot execute a binary from within an `asar`.
As a simple solution, when packaging the app into an asar please make sure you
`--unpack` the `vendor/` folder of `node-notifier`, so the module still has access to
the notification binaries.
You can do so with the following command:
```bash

@@ -377,4 +437,11 @@ asar pack . app.asar --unpack "./node_modules/node-notifier/vendor/**"

When using node-notifier inside of webpack, you must add the following snippet to your `webpack.config.js`. The reason this is required, is because node-notifier loads the notifiers from a binary, and so a relative file path is needed. When webpack compiles the modules, it supresses file directories, causing node-notifier to error on certain platforms. To fix/workaround this, you must tell webpack to keep the relative file directories, by doing so, append the following code to your `webpack.config.js`
When using `node-notifier` inside of `webpack`, you must add the snippet below to your `webpack.config.js`.
This is necessary because `node-notifier` loads the notifiers from a binary, so it
needs a relative file path. When webpack compiles the modules, it supresses file
directories, causing `node-notifier` to error on certain platforms.
To fix this, you can configure webpack to keep the relative file directories.
Do so by append the following code to your `webpack.config.js`:
```javascript

@@ -381,0 +448,0 @@ node: {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc