Skip to content

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

Open
@devingfx

Description

@devingfx

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions