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

docs(regexp): update module example to get full jsr score #4796

Merged
merged 3 commits into from
May 21, 2024

Conversation

satyarohith
Copy link
Member

@satyarohith satyarohith commented May 21, 2024

This PR adds an example at the module level to attain full score on JSR https://jsr.io/@std/regexp/score

@satyarohith satyarohith requested a review from kt3k as a code owner May 21, 2024 11:03
Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.94%. Comparing base (8fc19d9) to head (b8495a2).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4796      +/-   ##
==========================================
+ Coverage   91.88%   91.94%   +0.05%     
==========================================
  Files         486      487       +1     
  Lines       41337    41385      +48     
  Branches     5325     5326       +1     
==========================================
+ Hits        37984    38052      +68     
+ Misses       3296     3276      -20     
  Partials       57       57              

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

regexp/escape.ts Outdated
Comment on lines 5 to 6
* This module contains functions to escape strings for use in regular expressions.
* @module
Copy link
Member

Choose a reason for hiding this comment

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

Does an example make sense here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can copy over the example from the docs of only exported function but it might depend on where this data is rendered on JSR? I see that only mod.ts is rendered on the main page

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually it doesn't make sense to mark escape.ts as an entrypoint considering that there is only one function exported and it's also re-exported from mod.ts

I added an example anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, true. Because std/regexp currently only has one API, setting regexp.ts as entrypoint doesn't make much sense..

Copy link
Member Author

Choose a reason for hiding this comment

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

@kt3k I can open a separate PR to remove it if there is no versioning issue.

Copy link
Member

Choose a reason for hiding this comment

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

I'll discuss this with Asher tomorrow. Leave it as is for now (Probably maintainers will handle this if necessary). For now I created an issue #4802

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. Thanks @satyarohith!

@satyarohith satyarohith enabled auto-merge (squash) May 21, 2024 15:27
@satyarohith satyarohith merged commit 376f4da into main May 21, 2024
12 checks passed
@satyarohith satyarohith deleted the update_regexp_module branch May 21, 2024 16:43
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.

None yet

3 participants