fs.DuplexCollection byGlob returns wrong result

Open
#363 1 comment 0 reactions 1 assignee View on GitHub

@RandomByte is already working on this.

Since Nov 22, 2019.

Assessment

This issue has not been assessed yet.

Description

module/ui5-builder

Hello guys,
I created a small sample, using the ui5-tooling with simple configuration and custom task.
I tried to exclude all files from processing, except for two types of files (.lit.js and .hbs), look at the ui5.yaml.
But, this seems to cause an issue in my custom task, when I try to execute
workspace.byGlob("/resources/*.hbs") - it matches not only .hbs files, but the .lit.js files as well.

Expected Behavior

workspace.byGlob("/resources/*.hbs") to match .hbs files only.

Current Behavior

workspace.byGlob("/resources/*.hbs") matches not just .hbs files, but .lit.js as well.

Steps to reproduce the issue

  1. Clone repository https://github.com/ilhan007/ui5-tooling-customtask-sample
  2. Run npm install in the root
  3. Run npm run build
  4. Explore the build log - the result from workspace.byGlob("/resources/*.hbs") is logged and you can see that it finds not just .hbs files. Or, You can add debugger in the task at this line:https://github.com/ilhan007/ui5-tooling-customtask-sample/blob/master/lib/task.js#L5

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 1.12.1
  • Node.js Version: 12.13.0
  • npm Version: 6.12
  • OS/Platform: macOS 10.15 Catalina

Affected components (if known)

Dominant language
JavaScript
Stars
511
Forks
83
Avg merge
1d 5h
Merged PRs (30d)
55

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UI5/cli

All issues in UI5/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.