From 2941f4ee098df43bb262a58687b1585b71c8486a Mon Sep 17 00:00:00 2001 From: "ARVO\\andrew.koltyakov" Date: Mon, 3 Feb 2020 15:39:39 +0300 Subject: [PATCH] pnpm issue fix, #13 --- package.json | 2 +- src/index.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 911a658..64a2f26 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "generator-sppp", "description": "SharePoint Pull-n-Push - Yeoman generator for client-side development", - "version": "3.8.0", + "version": "3.8.1", "author": "Andrew Koltyakov ", "main": "./app/index.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index fc9fca9..a2f7ae3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -232,8 +232,9 @@ module.exports = class extends Generator { if (this.options['package-manager'] === 'pnpm') { next && await this.utils.execPromise('pnpm --version').then(() => { - installer = (dep: string | string[], opt) => { - const args = ['install'].concat(dep).concat(dargs(opt)); + installer = (dep: string | string[], opt: any) => { + opt = { ...opt, 'shamefully-hoist': true }; + const args = ['add'].concat(dep).concat(dargs(opt)); this.spawnCommandSync('pnpm', args); }; devDepOptions = { 'save-dev': true };