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

Broken group resolving #263

Closed
ondratra opened this issue Feb 27, 2020 · 4 comments
Closed

Broken group resolving #263

ondratra opened this issue Feb 27, 2020 · 4 comments

Comments

@ondratra
Copy link

Group resolving is broken in the newest version 3.2.2. The feature was working well in older versions (at least in 3.1.1). Issue #257 was probably not fixed.

Actual behavior

No files found when using somePath/(option1|option2)/*.extension.

Expected behavior

Files found.

Steps to reproduce

const glob = require('fast-glob')

async function test() {
  const files1 = await glob([
    __dirname + '/testContent/(subfolder1|subfolder2)/*.js'
  ])
  const files2 = await glob([
    __dirname + '/testContent/subfolder1/*.js',
    __dirname + '/testContent/subfolder2/*.js',
  ])

  console.log(files1, files2)
}

test()

Assuming that some files exist in relevant paths, variables files1 and files2 should be the same, but they are not.

Code sample

Sandbox with the problem can be found here https://repl.it/@ondratra/fast-glob-bug .

@mrmlnc mrmlnc self-assigned this Feb 27, 2020
@mrmlnc mrmlnc added this to the 3.2.3 milestone Feb 27, 2020
@mrmlnc
Copy link
Owner

mrmlnc commented Feb 28, 2020

After picomatch.scan the last part of the pattern has forward slash and we cannot match part of filepath.

[..., '(subfolder1|subfolder2)/*.js']

@mrmlnc
Copy link
Owner

mrmlnc commented Mar 13, 2020

Blocked by micromatch/picomatch#65

@mrmlnc mrmlnc removed this from the 3.2.3 milestone Mar 21, 2020
@mrmlnc
Copy link
Owner

mrmlnc commented Mar 21, 2020

Fixed by picomatch@2.2.2.

In the simplest case, run this command to get the latest versions of dependencies:

npm i fast-glob

@mrmlnc mrmlnc closed this as completed Mar 21, 2020
@ondratra
Copy link
Author

It just noticed there is no package-lock.json in the project. You should consider adding it for better dependency management.

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