Skip to content

Bash style brace expansions stops working after upgrade to 3.2.8 #351

@MurzNN

Description

@MurzNN

Environment

  • OS Version: Ubuntu Linux 20.04
  • Node.js Version: v14.18.3

Actual behavior

fast-glob should see all files listed in brace expansions.

Expected behavior

fast-glob didn't see files in brace expansions.

Steps to reproduce

  1. Create test environment:
mkdir test; touch test/file1.txt test/file2.txt test/file3.txt; yarn add fast-glob
  1. Create test file test.js with contents like this:
const fg = require('fast-glob');

console.log('direct', fg.sync([
  "test/file1.txt",
  "test/file2.txt",
  "test/file3.txt",
]));

console.log('expansions', fg.sync([
  "test/{file1.txt,file2.txt}",
  "test/file3.txt",
]));
  1. Launch the script via node test.js and see the output with missing files:
direct [ 'test/file1.txt', 'test/file2.txt', 'test/file3.txt' ]
expansions [ 'test/file3.txt' ]
  1. Downgrade fast-glob to 3.2.7 and relaunch the script:
$ yarn add fast-glob@3.2.7
$ node ./test.js 
direct [ 'test/file1.txt', 'test/file2.txt', 'test/file3.txt' ]
expansions [ 'test/file3.txt', 'test/file1.txt', 'test/file2.txt' ]

You should see that expansions starts working!

  1. Upgrade to fast-glob to 3.2.8 and even 3.2.10 and see that expansions stop working.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions