Skip to content

Commit

Permalink
api: stop ignoring packageManager option (#807)
Browse files Browse the repository at this point in the history
fixes #804
  • Loading branch information
joaomoreno authored Jan 3, 2023
1 parent 7d31d86 commit 8b49e9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export function publish(options: IPublishOptions = {}): Promise<any> {
* @public
*/
export function listFiles(options: IListFilesOptions = {}): Promise<string[]> {
return _listFiles(options);
return _listFiles({
...options,
useYarn: options.packageManager === PackageManager.Yarn,
dependencies: options.packageManager !== PackageManager.None,
});
}

/**
Expand Down
5 changes: 1 addition & 4 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1622,10 +1622,7 @@ export function createDefaultProcessors(manifest: Manifest, options: IPackageOpt
];
}

function getDependenciesOption(options: {
readonly dependencies?: boolean;
readonly useYarn?: boolean;
}): 'npm' | 'yarn' | 'none' | undefined {
function getDependenciesOption(options: IListFilesOptions): 'npm' | 'yarn' | 'none' | undefined {
if (options.dependencies === false) {
return 'none';
}
Expand Down

0 comments on commit 8b49e9d

Please sign in to comment.