Skip to content

Commit

Permalink
feat: add createCheckPackageOptions to createCheckPackageWithWorkspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Mar 5, 2022
1 parent 2e6c323 commit 5168959
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/check-package-with-workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import fs from 'fs';
import path from 'path';
import glob from 'glob';
import type { OnlyWarnsFor } from 'utils/shouldOnlyWarnFor';
import type { CheckPackageApi } from './check-package';
import type {
CheckPackageApi,
CreateCheckPackageOptions,
} from './check-package';
import { createCheckPackage } from './check-package';
import {
checkDirectDuplicateDependencies,
Expand Down Expand Up @@ -39,8 +42,12 @@ export interface CheckPackageWithWorkspacesApi {

export function createCheckPackageWithWorkspaces(
pkgDirectoryPath = '.',
createCheckPackageOptions: CreateCheckPackageOptions = {},
): CheckPackageWithWorkspacesApi {
const checkPackage = createCheckPackage(pkgDirectoryPath);
const checkPackage = createCheckPackage(
pkgDirectoryPath,
createCheckPackageOptions,
);
const { pkg, pkgDirname, pkgPathName } = checkPackage;

const pkgWorkspaces: string[] | undefined =
Expand Down Expand Up @@ -68,7 +75,10 @@ export function createCheckPackageWithWorkspaces(

const checksWorkspaces = new Map<string, CheckPackageApi>(
workspacePackagesPaths.map((subPkgDirectoryPath) => {
const checkPkg = createCheckPackage(subPkgDirectoryPath);
const checkPkg = createCheckPackage(
subPkgDirectoryPath,
createCheckPackageOptions,
);
return [checkPkg.pkg.name, checkPkg];
}),
);
Expand Down

0 comments on commit 5168959

Please sign in to comment.