changed-files-ignore-pattern option #3794
ibezkrovnyi
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Sounds good but the setting should be probably more explicit. |
Beta Was this translation helpful? Give feedback.
1 reply
-
It should be replaced with: const changedFiles = micromatch.not(diff.split("\n"), changedFilesIgnorePatterns, {
dot: true,
});
Could you please let me know what do you think about the above? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
pnpm already has option
test-pattern
, which already does filtration of packages with globs if only files matching to specified test-patterns were changed.It would be great if pnpm had more generic option similar to Microsoft Lage's
ignore
option to filter out changed projects, where only specified files were changed.https://github.com/microsoft/lage/blob/6d6c6be3180ab10938b08a941fb4ed0e9ffa0394/src/types/ConfigOptions.ts#L30-L31
Use cases:
.gitlab-ci.yaml
:ignore[]=.gitlab-ci.yaml
(need to pass dot option to micromatch)CODEOWNERS
in any folder:ignore[]=**/CODEOWNERS
(orignore[]=CODEOWNERS
, but first looks more explicit).github
folder:ignore[]=.github
(orignore[]=.github/**
, again - dot option is required)ignore[]=**/*.md
(orignore[]=*.md
, but then there will be no way to specify only root-level files)ignore[]={**/scripts,**/reports,**/cache}
ignore[]=test/react-*/**
ignore[]=**/tests/**
ignore[]=tooling/pipeline-scripts
This can be option
ignore[]
which expects array of globs, or it can be some advanced syntax for--filter
(pnpm already is able to filter/exclude packages by folders, but currently it expects folder===package I think)I think, it should be relative to the workspace root directory, so glob
*.md
matches root-level md files, globtooling/pipeline-scripts
matches root-level path/tooling/pipeline-scripts
and**/tests
matches directorytests
in any folder including root-level.Beta Was this translation helpful? Give feedback.
All reactions