Repository navigation
fs: glob is stable, so should not emit experimental warnings - #58236
Merged
nodejs-github-bot merged 1 commit intoMay 10, 2025
Merged
nodejs-github-bot merged 1 commit into
nodejs-github-bot merged 1 commit into
Conversation
Contributor
Author
|
cc @jasnell |
cjihrig
approved these changes
May 8, 2025
marco-ippolito
approved these changes
May 8, 2025
Collaborator
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58236 +/- ##
==========================================
- Coverage 90.14% 90.12% -0.02%
==========================================
Files 629 629
Lines 186634 186626 -8
Branches 36616 36624 +8
==========================================
- Hits 168236 168203 -33
- Misses 11204 11217 +13
- Partials 7194 7206 +12
🚀 New features to boost your workflow:
|
lpinca
approved these changes
May 9, 2025
Collaborator
Collaborator
|
Landed in 6710c00 |
targos
pushed a commit
that referenced
this pull request
May 16, 2025
PR-URL: #58236 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
May 19, 2025
PR-URL: #58236 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This was referenced May 19, 2025
aduh95
pushed a commit
that referenced
this pull request
May 21, 2025
PR-URL: #58236 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
3 of 4 tasks
bartekczyz
added a commit
to visual-check/visual-check
that referenced
this pull request
Nov 18, 2026
Closes #78. Affected runs now pick stories for changed files that Fallow's graph doesn't hold: visual-check's config, lockfiles, package configs, assets, baselines, and the `affected.selectAll` and `affected.ignore` globs. This follows PRD 11's "Rules by changed file". - **The rules** (`affected-stories/changed-file-rules.ts`), checked in this order: - A match for `affected.ignore` is dropped first, before the graph walk. The `changedFiles` count still includes it. - These select every story, and Fallow isn't called: the config file, a lockfile at any depth (`pnpm-lock.yaml`, `package-lock.json`, `npm-shrinkwrap.json`, `yarn.lock`, `bun.lock`, `bun.lockb`), `pnpm-workspace.yaml`, or a match for `affected.selectAll`. - A `.png` directly in any configured Storybook's baselines folder selects only its story, including a mode's baseline (`<id>.<mode>.png`) and shortened names. The folders are taken before `--storybook` narrows the list, so a baseline of a Storybook outside the run selects nothing. - Package configs: `package.json`, `tsconfig*`, `jsconfig*`, `vite.config.*`, `postcss.config.*`, `.postcssrc*`, `tailwind.config.*`, `next.config.*` and `.env*`. - Assets: images, fonts, and JSON that isn't config. They count only when the graph doesn't hold them. JSON is config when a path segment starts with `.`, or when it's `biome.json(c)`, `turbo.json`, `renovate.json`, `lerna.json` or `nx.json`. - Anything else outside the graph selects nothing, including a README or a deleted source file. - **Package scope** (`package-folder.ts`, `storybook-rules.ts`): - A file's package is the nearest folder with a `package.json`. A changed `package.json`'s package is its own folder, even when the file was deleted. - The root package selects every Storybook. - Otherwise a Storybook gets every story when its `dir` is inside the package, or when walking back from every graph file of the package reaches one of its stories files or its `preview*`/`main*`. - **The graph seam** (`fallow-graph.ts`, `walk-back.ts`): `FindReachedFiles` now also gives `reachedFromFolders(folders)`, which walks the graph already in memory. That's still one Fallow run. The packages to walk are known only once `reached` says which assets the graph holds. - **Globs** use `path.matchesGlob` against the path relative to the config file's folder. A leading `./` is accepted. `*` and `**` skip names that start with `.`; the JSDoc and PRD 03 say so. - **Node 22.17 or later** (`engines`, PRD 01): - `path.matchesGlob` arrived in 22.5. - It printed an experimental warning until 22.17 (nodejs/node#58236). - **Wiring**: - `ResolvedConfig.baselinesFolders` is new. - `run-selection` and `run-cli` pass the config path, `affected` and the baselines folders. - `StoryChoice`'s `stories-files` is now `affected`. It keeps stories by stories file or by ID. - **Tests**: - Unit tests over a real-git monorepo fixture, with every table row covered. The fake graph uses the real walk. - Classification, grouping and package-lookup tests. - Integration tests in `run-cli-affected.test.ts`: - a config file change captures every story without calling the graph; - an ignored file captures nothing; - a baseline change captures only its story; - with `--storybook web`, another Storybook's baseline captures nothing. ## Commits Review rounds added fix and refactor commits on top of the two `feat` commits. Squash on merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #57513
fs.globwas marked as stable, but that was only in the documentation, so if it's considered stable, it should not emit experimental warnings.