Skip to content

Commit

Permalink
fix: resolve pacote regression with creating app from a template dire…
Browse files Browse the repository at this point in the history
…ctory (#5766)
  • Loading branch information
edusperoni authored Oct 23, 2023
1 parent b229fdf commit 2cd7a62
Show file tree
Hide file tree
Showing 3 changed files with 1,548 additions and 82 deletions.
6 changes: 4 additions & 2 deletions lib/services/pacote-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { INpmConfigService, INodePackageManager } from "../declarations";
import { IProxyService, IFileSystem } from "../common/declarations";
import { IInjector } from "../common/definitions/yok";
import { injector } from "../common/yok";
import { Arborist } from "@npmcli/arborist";

export class PacoteService implements IPacoteService {
constructor(
Expand All @@ -32,7 +33,8 @@ export class PacoteService implements IPacoteService {
`Calling pacoteService.manifest for packageName: '${packageName}' and options: `,
options
);
const manifestOptions: IPacoteBaseOptions = await this.getPacoteBaseOptions();
const manifestOptions: IPacoteBaseOptions =
await this.getPacoteBaseOptions();

if (options) {
_.extend(manifestOptions, options);
Expand Down Expand Up @@ -117,7 +119,7 @@ export class PacoteService implements IPacoteService {

// Add NPM Configuration to our Manifest options
const npmConfig = this.$npmConfigService.getConfig();
const pacoteOptions = _.extend(npmConfig, { cache: cachePath });
const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist });
const proxySettings = await this.$proxyService.getCache();
if (proxySettings) {
_.extend(pacoteOptions, proxySettings);
Expand Down
Loading

0 comments on commit 2cd7a62

Please sign in to comment.