build(deps-dev)!: replace glob with native glob#574
Open
Fdawgs wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the dev dependency on the glob package by switching test/docs usage to Node’s native node:fs/promises glob, and updates the project’s supported Node.js baseline accordingly.
Changes:
- Replaced
glob(npm package) usage in tests withglobfromnode:fs/promises. - Bumped the minimum supported Node.js version to
>=22.17.0and updated.nvmrc. - Updated CI matrix and README example to reflect native globbing usage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/index.test.js | Switches test cleanup from glob package to native fs/promises glob. |
| README.md | Updates the “Removing images” example to use native fs/promises glob and adjusts accompanying text. |
| package.json | Raises Node engine requirement and removes glob from devDependencies. |
| .nvmrc | Aligns local dev Node version with the new minimum requirement. |
| .github/workflows/ci.yml | Removes Node 20 from the CI test matrix to match the new engine floor. |
Comments suppressed due to low confidence (2)
test/index.test.js:66
- The loop variable name
filedlooks like a typo and makes the intent less clear. Consider renaming it to something likefile,filePath, orfilenamefor readability.
for await (const filed of glob("*.{emf,wmf,png}")) {
await unlink(filed);
README.md:116
- The example now deletes
*.pngin the current working directory, which can accidentally remove unrelated PNG files if users run this from a directory that contains images. Consider scoping deletion to a dedicated working/output directory (e.g., run conversion in a temp dir and setcwdforglob), or avoid including broad*.pngmatches in the example unless you can reliably narrow the pattern to UnRTF-generated files.
// Remove leftover test files
for await (const filed of glob("*.{emf,wmf,png}")) {
await unlink(filed);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ab40d1e to
5726c90
Compare
BREAKING CHANGE: minimum node version increased from 20 to 22.17.0
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.
BREAKING CHANGE: minimum node version increased from 20 to 22.17.0
Not in a massive rush to merge this as it's just for tests and not functionality.
Checklist
npm test