replace escape-string-regexp with tiny-escape#5772
replace escape-string-regexp with tiny-escape#5772ofershap wants to merge 1 commit intomochajs:mainfrom
Conversation
|
|
|
👋 Hi @ofershap, thanks for the pull request! A scan flagged a concern with it. Could you please take a look? [pr-task-completion] This PR's body is missing
Repositories often provide a set of tasks that pull request authors are expected to complete. Those tasks should be marked as completed with a
|
escape-string-regexp v5 is ESM-only, which blocks upgrading from v4 (see mochajs#5746). tiny-escape has the same API and ships both ESM and CJS with TypeScript types. 192 bytes gzipped, zero deps. Made-with: Cursor
dc5c4c3 to
b880931
Compare
|
@ofershap ESM-only is not a blocker for us. Mocha's main branch is for v12 and supports Node 20.19.0+, which allows us to |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5772 +/- ##
=======================================
Coverage 88.74% 88.74%
=======================================
Files 66 66
Lines 4744 4744
Branches 976 976
=======================================
Hits 4210 4210
Misses 534 534 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Once mocha becomes Node >= 24, |
|
Closing out as #5773 is wontfix. Thanks for thinking of us! |
PR Checklist
status: accepting prsNote: #5746 is a Renovate bot PR to bump escape-string-regexp to v5, which can't land because v5 is ESM-only. This PR offers an alternative path that doesn't need the label.
Overview
escape-string-regexpv5 is ESM-only, so the Renovate PR to upgrade from v4 (#5746) can't land while mocha is still CommonJS (#5400).tiny-escapehas the same API and ships both ESM and CJS. 192 bytes gzipped, zero deps, TypeScript types included.This unblocks the upgrade without waiting for the CJS-to-ESM migration.
All tests pass (lint, test-node, test-browser).