Skip to content

refactor(filecheck): drop index.html support and fs-extra#44608

Draft
caugner wants to merge 2 commits into
mainfrom
refine-filecheck
Draft

refactor(filecheck): drop index.html support and fs-extra#44608
caugner wants to merge 2 commits into
mainfrom
refine-filecheck

Conversation

@caugner

@caugner caugner commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Refactor the filecheck script:

  • Remove index.html support, so only the adjacent index.md is considered when checking whether an attachment is referenced.
  • Replace fs-extra with node:fs/promises and drop the dependency.

Motivation

All documents migrated to index.md long ago, so the index.html fallback is dead code. node:fs/promises covers everything we used fs-extra for, so the extra dependency is no longer needed.

Additional details

  • Test fixtures are consolidated into a single md directory, dropping the now-redundant duplicate "not mentioned" test.
  • fse.exists → a small pathExists helper wrapping fs.access; fse.copyFileSyncfs.copyFile; fse.removeSyncfs.rm(..., { recursive: true, force: true }).

Related issues and pull requests

caugner added 2 commits June 30, 2026 17:28
We migrated all documents to `index.md` long ago, so only the adjacent
`index.md` is considered when checking whether an attachment is
referenced. Consolidate the test fixtures into a single `md` directory
accordingly.
`node:fs/promises` covers everything we used `fs-extra` for: a small
`pathExists` helper wraps `fs.access`, `fse.copyFileSync` becomes
`fs.copyFile`, and `fse.removeSync` becomes `fs.rm` with `recursive` and
`force`. Drop the `fs-extra` dependency.
@github-actions github-actions Bot added system [PR only] Infrastructure and configuration for the project size/m [PR only] 51-500 LoC changed labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m [PR only] 51-500 LoC changed system [PR only] Infrastructure and configuration for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants