diff --git a/common/changes/just-scripts/installed-stack_2019-04-05-20-36.json b/common/changes/just-scripts/installed-stack_2019-04-05-20-36.json new file mode 100644 index 00000000..b20da555 --- /dev/null +++ b/common/changes/just-scripts/installed-stack_2019-04-05-20-36.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "just-scripts", + "comment": "Find installed stack from scripts folder in monorepo", + "type": "patch" + } + ], + "packageName": "just-scripts", + "email": "kchau@microsoft.com" +} \ No newline at end of file diff --git a/packages/just-scripts/src/monorepo/getOutdatedStacks.ts b/packages/just-scripts/src/monorepo/getOutdatedStacks.ts index 50fa448d..01059f0f 100644 --- a/packages/just-scripts/src/monorepo/getOutdatedStacks.ts +++ b/packages/just-scripts/src/monorepo/getOutdatedStacks.ts @@ -12,7 +12,7 @@ export interface OutdatedInfo { export async function getOutdatedStacks(rootPath: string) { const scriptsPath = path.join(rootPath, 'scripts'); - const installedStacks = findInstalledStacks(rootPath); + const installedStacks = findInstalledStacks(scriptsPath); const outdatedJson: any = await new Promise((resolve, reject) => { const cp = spawn('npm', ['outdated', '--json'], { cwd: scriptsPath, stdio: 'pipe' }); diff --git a/packages/just-scripts/src/tasks/addPackageTask.ts b/packages/just-scripts/src/tasks/addPackageTask.ts index 50cb8da3..9cc31e20 100644 --- a/packages/just-scripts/src/tasks/addPackageTask.ts +++ b/packages/just-scripts/src/tasks/addPackageTask.ts @@ -34,7 +34,7 @@ export function addPackageTask(): TaskFunction { // TODO: do validation that the path is indeed a monorepo - const installedStacks = findInstalledStacks(rootPath); + const installedStacks = findInstalledStacks(path.join(rootPath, 'scripts')); // TODO: autosuggest just-stack-* packages from npmjs.org let response = await prompts({