denoland / denoland/std

fs/walk do not include folders if exts option is given

Open
#6,736 0 comments 0 reactions 0 assignees View on GitHub
bug needs triage
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Using `fs/walk` or `fs/walkSync`, if `exts` options is given, and `includeDirs: true` (default), the folders name are tested against `exts` extensions what is a non-sense and will most of time exclude the folder (cause 🤷🏻‍♂️ they don't have extension).

**Steps to Reproduce**

```js
walk(path, {
includeDirs: true,
exts: ['js','es','ts']
})
```

**Expected behavior**

When including folders, their name have to be tested against `match` or `skip` but not `exts`

**Environment**

- OS: linux mint
- deno version: 1 & 2
- std version: jsr:@std/fs/1.0.18/walk.ts

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.