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

chore: replace deprecated String.prototype.substr() #336

Merged
merged 1 commit into from
May 9, 2023
Merged

chore: replace deprecated String.prototype.substr() #336

merged 1 commit into from
May 9, 2023

Conversation

CommanderRoot
Copy link
Contributor

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

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

.substr() is deprecated so we replace it with .slice() or substring()
Both work similarily but aren't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Patch coverage: 83.33% and project coverage change: +0.27 🎉

Comparison is base (c960801) 95.06% compared to head (7bd9c33) 95.33%.

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     
Impacted Files Coverage Δ
lib/Resolver.js 89.04% <50.00%> (+1.04%) ⬆️
lib/AliasPlugin.js 100.00% <100.00%> (ø)
lib/DescriptionFilePlugin.js 100.00% <100.00%> (ø)
lib/DescriptionFileUtils.js 96.92% <100.00%> (ø)
lib/ResolverFactory.js 98.56% <100.00%> (+1.42%) ⬆️
lib/getPaths.js 100.00% <100.00%> (ø)

... 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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TheLarkInn TheLarkInn merged commit b967209 into webpack:main May 9, 2023
17 of 18 checks passed
@TheLarkInn
Copy link
Member

TheLarkInn commented May 9, 2023

@CommanderRoot congrats on your first time contribution to enhanced-resolve! 🎉 Thank you for the PR.

renovate bot added a commit to Unleash/unleash that referenced this pull request May 20, 2023
[![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
[@&#8203;CommanderRoot](https://togithub.com/CommanderRoot) in
[webpack/enhanced-resolve#336

#### Bugfixes

- Significantly improve type coverage & definitions for `resolve` by
[@&#8203;43081j](https://togithub.com/43081j) in
[webpack/enhanced-resolve#357
- Fix bug where `aliasFields` was not being applied to package `exports`
field by [@&#8203;alexander-akait](https://togithub.com/alexander-akait)
in
[webpack/enhanced-resolve#380

#### Dependencies & Maintenance

- Update `checkout`, `setup-node`, and `codecov` github actions by
[@&#8203;snitin315](https://togithub.com/snitin315) in
[webpack/enhanced-resolve#378

#### New Contributors

- [@&#8203;CommanderRoot](https://togithub.com/CommanderRoot) made their
first contribution in
[webpack/enhanced-resolve#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants