lukeed / lukeed/uvu

Ignore `.d.ts` files through uvu's CLI

Open
#236 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3k
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Assuming the regex listed in the docs is correct, it appears as though .d.ts files are not ignored by the pattern.

This is a tad problematic for users like myself who might have a .d.ts file sitting around in their test directories, but aren't using TypeScript for their tests, and therefore have no intention of adding a loader for it. I'm simply using it to store rather unwieldy typedefs that JSDoc would make a pain to express, but it seems uvu attempts to load these files, resulting in the expected: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /.../tests/global.d.ts.

Is there any reason to not skip over .d.ts files, beyond growing regex complexity?

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with docs/cli.md#matching and reproduce the scan with a .d.ts file in a test directory. Then locate the CLI's matching rule, add coverage for this extension, and confirm uvu no longer attempts to load it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.