Skip to content

Conversation

@eser
Copy link
Contributor

@eser eser commented Dec 24, 2025

Summary

  • Updates parseArgs() to accept readonly string[] in addition to string[]
  • This allows passing readonly arrays (e.g., as const arrays or frozen arrays) without type errors
  • Backwards compatible change - existing code continues to work

Motivation

Currently, passing a readonly array to parseArgs() causes a TypeScript error, even though the function doesn't mutate the input array. This change makes the API more flexible and aligns with the actual behavior of the function.

Test plan

  • Existing tests pass (deno task ok)
  • Manually verified that readonly arrays can now be passed to parseArgs()

@eser eser requested a review from kt3k as a code owner December 24, 2025 18:50
@CLAassistant
Copy link

CLAassistant commented Dec 24, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the cli label Dec 24, 2025
@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.16%. Comparing base (dcfb5b3) to head (c9543c0).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6911      +/-   ##
==========================================
+ Coverage   94.14%   94.16%   +0.01%     
==========================================
  Files         583      583              
  Lines       42806    42792      -14     
  Branches     6815     6815              
==========================================
- Hits        40301    40294       -7     
+ Misses       2455     2447       -8     
- Partials       50       51       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit 232ad45 into denoland:main Dec 25, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants