Skip to content

build(deps-dev)!: replace glob with native glob#574

Open
Fdawgs wants to merge 1 commit into
mainfrom
test/index-glob
Open

build(deps-dev)!: replace glob with native glob#574
Fdawgs wants to merge 1 commit into
mainfrom
test/index-glob

Conversation

@Fdawgs
Copy link
Copy Markdown
Owner

@Fdawgs Fdawgs commented May 18, 2026

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

Copilot AI review requested due to automatic review settings May 18, 2026 15:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with glob from node:fs/promises.
  • Bumped the minimum supported Node.js version to >=22.17.0 and 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 filed looks like a typo and makes the intent less clear. Consider renaming it to something like file, filePath, or filename for readability.
		for await (const filed of glob("*.{emf,wmf,png}")) {
			await unlink(filed);

README.md:116

  • The example now deletes *.png in 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 set cwd for glob), or avoid including broad *.png matches 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.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread test/index.test.js Outdated
@Fdawgs Fdawgs force-pushed the test/index-glob branch 2 times, most recently from ab40d1e to 5726c90 Compare May 19, 2026 10:04
BREAKING CHANGE: minimum node version increased from 20 to 22.17.0
@Fdawgs Fdawgs force-pushed the test/index-glob branch from 5726c90 to 09b8a61 Compare May 21, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants