From da961eed7887143421ad2118544217bc376539b2 Mon Sep 17 00:00:00 2001 From: neogeek Date: Tue, 29 Oct 2019 23:24:02 -0400 Subject: [PATCH] Added update-notifier package. --- bin/index.js | 6 ++++++ package.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/bin/index.js b/bin/index.js index dd79fc7..c865562 100755 --- a/bin/index.js +++ b/bin/index.js @@ -2,6 +2,10 @@ const os = require('os'); +const updateNotifier = require('update-notifier'); + +const pkg = require('../package.json'); + const getUnityUrls = require('../lib/get-unity-urls'); const osKeyMap = { @@ -13,5 +17,7 @@ const PROCESS_CMD_LINE_ARGS_LENGTH = 2; const requestedVersion = process.argv.slice(PROCESS_CMD_LINE_ARGS_LENGTH).pop(); +updateNotifier({pkg}).notify(); + getUnityUrls(requestedVersion).then(urls => process.stdout.write(`${urls[osKeyMap[os.type()]]}`)); diff --git a/package.json b/package.json index 115d5ac..dcaee9b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "node": ">=12.0" }, "license": "MIT", + "dependencies": { + "update-notifier": "3.0.1" + }, "devDependencies": { "@neogeek/eslint-config-standards": "github:neogeek/eslint-config-standards", "babel-eslint": "10.0.3",