Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MurzNN opened this issue Jan 14, 2022 · 2 comments
Closed

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

MurzNN opened this issue Jan 14, 2022 · 2 comments
Assignees
Milestone

Comments

@MurzNN
Copy link

MurzNN commented Jan 14, 2022

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.
@MurzNN MurzNN changed the title Bash style brace expansions stops working after upgrade to Bash style brace expansions stops working after upgrade to 3.2.8 Jan 14, 2022
MurzNN added a commit to Murz-forks/preconstruct that referenced this issue Jan 14, 2022
`fast-glob` versions after 3.2.7 have an issue mrmlnc/fast-glob#351
So it's good to temporary limit the version as workaround, until that issue is fixed.
@mrmlnc mrmlnc self-assigned this Jan 14, 2022
@mrmlnc mrmlnc added this to the 3.2.11 milestone Jan 14, 2022
@mrmlnc
Copy link
Owner

mrmlnc commented Jan 14, 2022

@MurzNN, thanks for the report. Will be finally fixed by #353. I think the new version will be available in a couple of hours.

@mrmlnc mrmlnc closed this as completed Jan 14, 2022
@MurzNN
Copy link
Author

MurzNN commented Jan 15, 2022

Yeah, with 3.2.11 it works, thanks for quick fixing!

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

No branches or pull requests

2 participants