feat(filter-workspace-packages): new optional option added to readProjects (#3847)
close #3726
This commit is contained in:
1 parent
9821c0289b
commit
dcc9cb7463
3 files changed
+8
-2
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/filter-workspace-packages": minor
|
||||
---
|
||||
|
||||
New optional option added to `readProjects()`: engineStrict.
|
||||
@@ -67,7 +67,7 @@ async function getChangedDirsSinceCommit (commit: string, workingDir: string, te
|
||||
const patterns = changedFilesIgnorePattern.filter(
|
||||
(pattern) => pattern.length
|
||||
)
|
||||
const changedFiles = patterns.length
|
||||
const changedFiles = (patterns.length > 0)
|
||||
? micromatch.not(allChangedFiles, patterns, {
|
||||
dot: true,
|
||||
})
|
||||
|
||||
@@ -33,11 +33,12 @@ export async function readProjects (
|
||||
workspaceDir: string,
|
||||
pkgSelectors: PackageSelector[],
|
||||
opts?: {
|
||||
engineStrict?: boolean
|
||||
linkWorkspacePackages?: boolean
|
||||
changedFilesIgnorePattern?: string[]
|
||||
}
|
||||
) {
|
||||
const allProjects = await findWorkspacePackages(workspaceDir, {})
|
||||
const allProjects = await findWorkspacePackages(workspaceDir, { engineStrict: opts?.engineStrict })
|
||||
const { selectedProjectsGraph } = await filterPkgsBySelectorObjects(
|
||||
allProjects,
|
||||
pkgSelectors,
|
||||
|
||||
Reference in new issue
Block a user