Skip to content

Incorrect file name having files with same name but different file type extension #11

Description

@PiyushSoniDev

Hello @ShreyPurohit,

Bug Description

Files with the same base name but different extensions are not being handled correctly.

Current Output

{
  "test": {
    "demo": "png",
    "demo.svg": "svg",
    "demo.tsx": "tsx"
  }
}

Expected Output

{
  "test": {
    "demo": ["png", "svg", "tsx"]
  }
}

Problem

The current implementation maps a filename to a single extension value, which does not properly support multiple files sharing the same base name with different extensions.

This can lead to overwritten values or inconsistent output formatting.

Steps to Reproduce

  1. Create files with the same base name:
    • demo.png
    • demo.svg
    • demo.tsx
  2. Run the extension/file parser.
  3. Observe the generated output.

Expected Behavior

File extensions should be grouped into an array for files sharing the same base filename.

Screenshot

Image

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