Skip to content

fs: glob is stable, so should not emit experimental warnings - #58236

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
theoludwig:fs/glob-stable-no-emit-experimental-warning
May 10, 2025
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
theoludwig:fs/glob-stable-no-emit-experimental-warning

Conversation

@theoludwig

Copy link
Copy Markdown
Contributor

In #57513 fs.glob was marked as stable, but that was only in the documentation, so if it's considered stable, it should not emit experimental warnings.

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem. labels May 8, 2025
@theoludwig

Copy link
Copy Markdown
Contributor Author

cc @jasnell

@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. lts-watch-v22.x PRs that may need to be released in v22.x labels May 8, 2025
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 8, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented May 8, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.12%. Comparing base (e38ce27) to head (2a9f442).
Report is 270 commits behind head on main.

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     
Files with missing lines Coverage Δ
lib/fs.js 98.26% <ø> (-0.01%) ⬇️
lib/internal/fs/promises.js 98.23% <ø> (-0.01%) ⬇️
lib/path.js 96.02% <ø> (-0.07%) ⬇️

... and 39 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label May 10, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 10, 2025
@nodejs-github-bot
nodejs-github-bot merged commit 6710c00 into nodejs:main May 10, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 6710c00

@theoludwig
theoludwig deleted the fs/glob-stable-no-emit-experimental-warning branch May 10, 2025 16:49
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>
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>
@aduh95 aduh95 added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed lts-watch-v22.x PRs that may need to be released in v22.x labels Jun 10, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. backported-to-v22.x PRs backported to the v22.x-staging branch. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants