-
Notifications
You must be signed in to change notification settings - Fork 190
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
chore: replace deprecated String.prototype.substr() #336
Conversation
.substr() is deprecated so we replace it with .slice() or substring() Both work similarily but aren't deprecated Signed-off-by: Tobias Speicher <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
==========================================
+ Coverage 95.06% 95.33% +0.27%
==========================================
Files 39 40 +1
Lines 1620 1908 +288
==========================================
+ Hits 1540 1819 +279
- Misses 80 89 +9
... and 4 files with indirect coverage changes 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 in Codecov by Sentry. |
@CommanderRoot congrats on your first time contribution to enhanced-resolve! 🎉 Thank you for the PR. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [enhanced-resolve](https://togithub.com/webpack/enhanced-resolve) | [`5.13.0` -> `5.14.0`](https://renovatebot.com/diffs/npm/enhanced-resolve/5.13.0/5.14.0) | [![age](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/compatibility-slim/5.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/confidence-slim/5.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>webpack/enhanced-resolve</summary> ### [`v5.14.0`](https://togithub.com/webpack/enhanced-resolve/releases/tag/v5.14.0) [Compare Source](https://togithub.com/webpack/enhanced-resolve/compare/v5.13.0...v5.14.0) #### Features - Replace deprecated String.prototype.substr() by [@​CommanderRoot](https://togithub.com/CommanderRoot) in [https://github.com/webpack/enhanced-resolve/pull/336](https://togithub.com/webpack/enhanced-resolve/pull/336) #### Bugfixes - Significantly improve type coverage & definitions for `resolve` by [@​43081j](https://togithub.com/43081j) in [https://github.com/webpack/enhanced-resolve/pull/357](https://togithub.com/webpack/enhanced-resolve/pull/357) - Fix bug where `aliasFields` was not being applied to package `exports` field by [@​alexander-akait](https://togithub.com/alexander-akait) in [https://github.com/webpack/enhanced-resolve/pull/380](https://togithub.com/webpack/enhanced-resolve/pull/380) #### Dependencies & Maintenance - Update `checkout`, `setup-node`, and `codecov` github actions by [@​snitin315](https://togithub.com/snitin315) in [https://github.com/webpack/enhanced-resolve/pull/378](https://togithub.com/webpack/enhanced-resolve/pull/378) #### New Contributors - [@​CommanderRoot](https://togithub.com/CommanderRoot) made their first contribution in [https://github.com/webpack/enhanced-resolve/pull/336](https://togithub.com/webpack/enhanced-resolve/pull/336) **Full Changelog**: webpack/enhanced-resolve@v5.13.0...v5.14.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/Unleash/unleash). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ni4zIiwidXBkYXRlZEluVmVyIjoiMzUuOTYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains a:
Motivation / Use-Case
String.prototype.substr() is deprecated so we replace it with String.prototype.slice() or String.prototype.substring() which work similarily but aren't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.
Breaking Changes
None
Additional Info