Skip to content

Commit 2cd7a62

Browse files
authored
fix: resolve pacote regression with creating app from a template directory (#5766)
1 parent b229fdf commit 2cd7a62

File tree

3 files changed

+1548
-82
lines changed

3 files changed

+1548
-82
lines changed

lib/services/pacote-service.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { INpmConfigService, INodePackageManager } from "../declarations";
88
import { IProxyService, IFileSystem } from "../common/declarations";
99
import { IInjector } from "../common/definitions/yok";
1010
import { injector } from "../common/yok";
11+
import { Arborist } from "@npmcli/arborist";
1112

1213
export class PacoteService implements IPacoteService {
1314
constructor(
@@ -32,7 +33,8 @@ export class PacoteService implements IPacoteService {
3233
`Calling pacoteService.manifest for packageName: '${packageName}' and options: `,
3334
options
3435
);
35-
const manifestOptions: IPacoteBaseOptions = await this.getPacoteBaseOptions();
36+
const manifestOptions: IPacoteBaseOptions =
37+
await this.getPacoteBaseOptions();
3638

3739
if (options) {
3840
_.extend(manifestOptions, options);
@@ -117,7 +119,7 @@ export class PacoteService implements IPacoteService {
117119

118120
// Add NPM Configuration to our Manifest options
119121
const npmConfig = this.$npmConfigService.getConfig();
120-
const pacoteOptions = _.extend(npmConfig, { cache: cachePath });
122+
const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist });
121123
const proxySettings = await this.$proxyService.getCache();
122124
if (proxySettings) {
123125
_.extend(pacoteOptions, proxySettings);

0 commit comments

Comments
 (0)