Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): make regexps constants #5595

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

timreichen
Copy link
Contributor

  • moves regexps outside function and makes them constants.
  • adds named capturing group to VALUE_REGEXP instead of testing and splitting value afterwards.
  • reduces code block with the same regexp check.

@timreichen timreichen requested a review from kt3k as a code owner July 31, 2024 15:52
@github-actions github-actions bot added the cli label Jul 31, 2024
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.36%. Comparing base (b213d54) to head (a94bc87).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5595   +/-   ##
=======================================
  Coverage   96.36%   96.36%           
=======================================
  Files         465      465           
  Lines       37506    37513    +7     
  Branches     5527     5528    +1     
=======================================
+ Hits        36144    36151    +7     
  Misses       1320     1320           
  Partials       42       42           

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

Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

LGTM

@iuioiua iuioiua enabled auto-merge (squash) July 31, 2024 23:54
@iuioiua iuioiua merged commit f632632 into denoland:main Jul 31, 2024
11 checks passed
@timreichen timreichen deleted the cli-regexp-constants branch August 1, 2024 00:10
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.

2 participants