Skip to content

Conversation

didavid61202
Copy link
Collaborator

Fix

fix #160

Updates

  1. Update createRegExp to type-Level function overloading, so the return type string is sanitized if the raw input argument is string type.
  2. Update/Add relevant tests

@vercel
Copy link

vercel bot commented Jan 29, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @danielroe on Vercel.

@danielroe first needs to authorize it.

@what-the-diff
Copy link

what-the-diff bot commented Jan 29, 2023

  • Added export to ExactEscapeChar
  • Changed createRegExp type signature and implementation
  • Sanitize string input in test/index.test.ts

@codecov-commenter
Copy link

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (28a0cbe) compared to base (0b61f78).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #180   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          452       462   +10     
  Branches        81        81           
=========================================
+ Hits           452       462   +10     
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vercel
Copy link

vercel bot commented Jan 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
magic-regexp ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 29, 2023 at 10:25AM (UTC)

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Thank you! ❤️

@danielroe danielroe merged commit 5264256 into unjs:main Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createRegExp not sanitising strings (in type)
3 participants