Cleanup: consolidate expandGlobSync wrapper and deno_ral duplicate

Open
#14,094 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Domain
tooling

Research direction

Start with src/core/deno/expand-glob.ts and src/deno_ral/fs.ts, then inspect the four listed call sites, especially src/command/render/template.ts. Compare their expandGlobSync options and verify whether globstar behavior is required. Done means one consistent import path remains, required options are preserved, and relevant checks pass.

Written by the indexing model from the issue text.

Description

maintenance

src/core/deno/expand-glob.ts wraps expandGlobSync from @std/fs to add globstar: true by default. It was created to work around denoland/deno_std#3099, which has since been fixed.

Current state

Two import paths coexist for expandGlobSync:

  1. src/core/deno/expand-glob.ts — wrapper adding globstar: true, used by:

    • src/extension/extension.ts
    • src/command/call/build-ts-extension/cmd.ts
    • src/command/call/typst-gather/cmd.ts
  2. src/deno_ral/fs.ts — re-exports raw @std/fs version (no globstar), used by:

    • src/command/render/template.ts

This means template.ts doesn't get the globstar: true default that other call sites get, which may or may not matter depending on usage.

Suggested cleanup

Since denoland/deno_std#3099 is fixed:

  • Remove src/core/deno/expand-glob.ts wrapper
  • Have all call sites import from deno_ral/fs.ts
  • If globstar: true is still needed, pass it explicitly at call sites or add it to the deno_ral re-export

Discovered while investigating #13927.

Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

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.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.