Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

pskfyi/picomatch-basename-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo illustrates an issue with picomatch's basename/matchBase options.

To test:

npm i # install dependencies
node ./test.js

Results

Glob Pattern: **/subdir/*.bar
Target 1: subdir/foo.bar
Target 2: dir/subdir/foo.bar

Testing minimatch w/ matchBase = false
  Target 1 matches: true
  Target 2 matches: true

Testing minimatch w/ matchBase = true
  Target 1 matches: true
  Target 2 matches: true

Testing picomatch w/ matchBase = false
  Target 1 matches: true
  Target 2 matches: true

Testing picomatch w/ matchBase = true
  Target 1 matches: false
  Target 2 matches: false

Testing picomatch w/ basename = false
  Target 1 matches: true
  Target 2 matches: true

Testing picomatch w/ basename = true
  Target 1 matches: false
  Target 2 matches: false

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published