Skip to content

brace-expansion v4.0.0 breaks expansion with bracketsΒ #87

Closed

Description

@Gerrit0

The performance improvement done in 278132b broke expansion of strings including brackets.

t.test("bracket", t => {
  t.plan(1)
  const exp = expand("src/{\\[ui\\],abc}/*.ts")
  // fails, actual is ["src/.ui./*.ts", "src/abc/*.ts"]
  t.same(exp, ["src/\\[ui\\]/*.ts", "src/abc/*.ts"])
})

This is inconsistent with how bash works:

$ echo src/{\\[ui\\],abc}/*.ts
src/\[ui\]/*.ts src/abc/*.ts

Activity

  1. added a commit that references this issue on Feb 22, 2026
    a511fec
  2. Gerrit0 commented on Feb 22, 2026

    @Gerrit0
    ContributorAuthor

    Related - there is a benchmark script referenced in package.json that I wanted to run after making this change, but it doesn't appear to have been committed to the repository.

  3. juliangruber commented on Feb 27, 2026

    @juliangruber
    Owner
    + brace-expansion@5.0.4
    
  4. added a commit that references this issue on Feb 27, 2026
    243c491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions