From 06c4e447096f2145756f272e26938dd3956d33aa Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Thu, 11 May 2017 17:41:06 -0700 Subject: [PATCH 1/5] Make sure we send options for the install_typings in both cases. --- .../TypingsAcquisitionTool/bin/install_typings | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings index 74a83c242..c6b923f9e 100644 --- a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings +++ b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings @@ -18,6 +18,13 @@ var argv = minimist(process.argv.slice(2), { var emitter = new events.EventEmitter(); +var options = { + save: argv.save, + emitter: emitter, + global: true, + cwd: argv.cwd || process.cwd() +}; + var packagesToInstall = argv._; if (!packagesToInstall.length) { @@ -25,12 +32,7 @@ if (!packagesToInstall.length) { typingsTool.installTypingsForProject(options) } else { typingsTool.runAll(packagesToInstall.map(function (name) { - var options = { - save: argv.save, - emitter: emitter, - global: name === "node", // Assume everything else refers to a CommonJS module - cwd: argv.cwd || process.cwd() - }; + options.global = name === "node"; // Assume everything else refers to a CommonJS module return typingsTool.installTypingsForPackage(name, options); })); } From b37d3640edfd8af8ff82df2f48a2a53750f9f5ab Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Fri, 12 May 2017 10:39:01 -0700 Subject: [PATCH 2/5] don't re-use the same object --- .../bin/install_typings | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings index c6b923f9e..a8872a80d 100644 --- a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings +++ b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings @@ -17,22 +17,23 @@ var argv = minimist(process.argv.slice(2), { }); var emitter = new events.EventEmitter(); - -var options = { - save: argv.save, - emitter: emitter, - global: true, - cwd: argv.cwd || process.cwd() -}; - var packagesToInstall = argv._; if (!packagesToInstall.length) { // top level package install - typingsTool.installTypingsForProject(options) + typingsTool.installTypingsForProject({ save: argv.save, + emitter: emitter, + global: true, + cwd: argv.cwd || process.cwd()}) } else { typingsTool.runAll(packagesToInstall.map(function (name) { - options.global = name === "node"; // Assume everything else refers to a CommonJS module + var options = { + save: argv.save, + emitter: emitter, + options.global = name === "node"; // Assume everything else refers to a CommonJS module + cwd: argv.cwd || process.cwd() + }; + return typingsTool.installTypingsForPackage(name, options); })); } From 7f9ebcd5fd99802403e3bdc20df6f321a5609b9e Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Fri, 12 May 2017 11:04:19 -0700 Subject: [PATCH 3/5] Update install_typings That should be a `,` --- .../Product/Nodejs/TypingsAcquisitionTool/bin/install_typings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings index a8872a80d..3cff01e41 100644 --- a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings +++ b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings @@ -1,4 +1,4 @@ -#!/usr/bin/env node +,#!/usr/bin/env node /** Tool to aquire typings used for NTVS IntelliSense. @@ -30,7 +30,7 @@ if (!packagesToInstall.length) { var options = { save: argv.save, emitter: emitter, - options.global = name === "node"; // Assume everything else refers to a CommonJS module + options.global = name === "node", // Assume everything else refers to a CommonJS module cwd: argv.cwd || process.cwd() }; From f00d0a0417811fbc9c574abf49328bd27f721834 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Fri, 12 May 2017 11:05:00 -0700 Subject: [PATCH 4/5] Update install_typings and a property in an object literal --- .../Product/Nodejs/TypingsAcquisitionTool/bin/install_typings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings index 3cff01e41..b6bf17d58 100644 --- a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings +++ b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings @@ -30,7 +30,7 @@ if (!packagesToInstall.length) { var options = { save: argv.save, emitter: emitter, - options.global = name === "node", // Assume everything else refers to a CommonJS module + global: name === "node", // Assume everything else refers to a CommonJS module cwd: argv.cwd || process.cwd() }; From 5dce6735425b1968d2aea711fef1e16fa43282e3 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Fri, 12 May 2017 11:05:40 -0700 Subject: [PATCH 5/5] Update install_typings online editor is the worst --- .../Product/Nodejs/TypingsAcquisitionTool/bin/install_typings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings index b6bf17d58..e4708b6fc 100644 --- a/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings +++ b/Nodejs/Product/Nodejs/TypingsAcquisitionTool/bin/install_typings @@ -1,4 +1,4 @@ -,#!/usr/bin/env node +#!/usr/bin/env node /** Tool to aquire typings used for NTVS IntelliSense.