Skip to content

replace escape-string-regexp with tiny-escape#4109

Open
ofershap wants to merge 1 commit intonitrojs:mainfrom
ofershap:replace-escape-string-regexp
Open

replace escape-string-regexp with tiny-escape#4109
ofershap wants to merge 1 commit intonitrojs:mainfrom
ofershap:replace-escape-string-regexp

Conversation

@ofershap
Copy link

@ofershap ofershap commented Mar 14, 2026

tiny-escape has the same API as escape-string-regexp. Ships ESM + CJS with built-in TypeScript types. 192 bytes gzipped, zero deps.

https://npmgraph.js.org/?q=tiny-escape

@ofershap ofershap requested a review from pi0 as a code owner March 14, 2026 12:48
@vercel
Copy link

vercel bot commented Mar 14, 2026

@ofershap is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30889137-b0d8-4657-932b-f02087155608

📥 Commits

Reviewing files that changed from the base of the PR and between ba5147a and b92a5a3.

📒 Files selected for processing (2)
  • package.json
  • src/config/resolvers/imports.ts

📝 Walkthrough

Walkthrough

Replaced the "escape-string-regexp" dependency with "tiny-escape" in both package.json and the corresponding import statement in src/config/resolvers/imports.ts. No functional logic or public API changes detected.

Changes

Cohort / File(s) Summary
Dependency Replacement
package.json, src/config/resolvers/imports.ts
Updated devDependencies from "escape-string-regexp" to "tiny-escape" and updated the corresponding import source in the imports resolver configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title does not follow conventional commits format which requires a type prefix (e.g., 'feat:', 'fix:', 'chore:'). It is missing the required prefix. Update the title to follow conventional commits format, e.g., 'chore: replace escape-string-regexp with tiny-escape'
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, explaining why tiny-escape was chosen over escape-string-regexp with specific benefits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the tone of the review comments and chat replies.

Configure the tone_instructions setting to customize the tone of the review comments and chat replies. For example, you can set the tone to Act like a strict teacher, Act like a pirate and more.

@pi0
Copy link
Member

pi0 commented Mar 14, 2026

nice find! We actually have builtin utils wondering might be best to just refactor and use them https://github.com/nitrojs/nitro/blob/main/src/utils/regex.ts

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.

2 participants