mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-31 13:32:18 -04:00
feat(filter-workspace-packages): new optional option added to readProjects (#3847)
close #3726
This commit is contained in:
5
.changeset/modern-gifts-end.md
Normal file
5
.changeset/modern-gifts-end.md
Normal file
@@ -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