Skip to content

path: add escapeGlob and unescapeGlob#61269

Open
Xstoudi wants to merge 11 commits intonodejs:mainfrom
Xstoudi:feat/glob-escape
Open

path: add escapeGlob and unescapeGlob#61269
Xstoudi wants to merge 11 commits intonodejs:mainfrom
Xstoudi:feat/glob-escape

Conversation

@Xstoudi
Copy link
Copy Markdown
Contributor

@Xstoudi Xstoudi commented Jan 4, 2026

path: add escapeGlob and unescapeGlob

Expose minimatch escaping and unescaping capabilities on path module.

Fixes: #61258

This is an implem proposal fix #61258 using minimatch that is already-vendored. Also feel free to -1 the change if you think it doesn't have its place there.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/path

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem. labels Jan 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.70%. Comparing base (ce2ec3d) to head (3671060).
⚠️ Report is 649 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61269      +/-   ##
==========================================
+ Coverage   88.54%   89.70%   +1.15%     
==========================================
  Files         704      695       -9     
  Lines      208734   214198    +5464     
  Branches    40271    41020     +749     
==========================================
+ Hits       184823   192145    +7322     
+ Misses      15932    14114    -1818     
+ Partials     7979     7939      -40     
Files with missing lines Coverage Δ
lib/internal/fs/glob.js 91.69% <100.00%> (+0.31%) ⬆️
lib/path.js 97.51% <100.00%> (+0.02%) ⬆️

... and 381 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.

@avivkeller avivkeller added semver-minor PRs that contain new features and should be released in the next minor version. notable-change PRs with changes that should be highlighted in changelogs. labels Jan 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 4, 2026

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @avivkeller.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

@Xstoudi
Copy link
Copy Markdown
Contributor Author

Xstoudi commented Feb 24, 2026

Hey, no interest?

@nodejs/path

@targos
Copy link
Copy Markdown
Member

targos commented Feb 25, 2026

@nodejs/path @nodejs/fs

@TheOneTheOnlyJJ
Copy link
Copy Markdown
Contributor

I am wondering, why not just expose minimatch? It's already vendored, right?

@Xstoudi
Copy link
Copy Markdown
Contributor Author

Xstoudi commented Apr 1, 2026

Vendoring is an implem detail, not a commitment and I'd prefer to not couple the Node's API to a third-party dependency.

Goal here is to provide stable, cross-platform glob semantic in Node rather than exposing raw minimatch behavior. windowsPathsNoEscape and magicalBraces are good illustrations of this.

@jazelly jazelly added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 2, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 2, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. path Issues and PRs related to the path subsystem. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

path.escapeGlob

7 participants