-
Notifications
You must be signed in to change notification settings - Fork 927
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
Replace deprecated String.prototype.substr() #876
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Qix-
approved these changes
Mar 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
1 task
gagoar
pushed a commit
to gagoar/github-app-installation-token
that referenced
this pull request
Feb 19, 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 | |---|---|---|---|---|---| | [debug](https://github.com/debug-js/debug) | [`4.3.3` -> `4.3.4`](https://renovatebot.com/diffs/npm/debug/4.3.3/4.3.4) | [![age](https://badges.renovateapi.com/packages/npm/debug/4.3.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/debug/4.3.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/debug/4.3.4/compatibility-slim/4.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/debug/4.3.4/confidence-slim/4.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>debug-js/debug</summary> ### [`v4.3.4`](https://github.com/debug-js/debug/releases/tag/4.3.4) [Compare Source](https://github.com/debug-js/debug/compare/4.3.3...4.3.4) #### What's Changed - Add section about configuring JS console to show debug messages by [@​gitname](https://github.com/gitname) in [debug-js/debug#866 - Replace deprecated String.prototype.substr() by [@​CommanderRoot](https://github.com/CommanderRoot) in [debug-js/debug#876 #### New Contributors - [@​gitname](https://github.com/gitname) made their first contribution in [debug-js/debug#866 - [@​CommanderRoot](https://github.com/CommanderRoot) made their first contribution in [debug-js/debug#876 **Full Changelog**: debug-js/debug@4.3.3...4.3.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **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/gagoar/github-app-installation-token). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTQuMiIsInVwZGF0ZWRJblZlciI6IjM0LjI4LjAifQ==--> Co-authored-by: Renovate Bot <bot@renovateapp.com>
kodiakhq bot
pushed a commit
to X-oss-byte/Canary-nextjs
that referenced
this pull request
Sep 27, 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 | |---|---|---|---|---|---| | [debug](https://github.com/debug-js/debug) | [`4.1.1` -> `4.3.4`](https://renovatebot.com/diffs/npm/debug/4.1.1/4.3.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/debug/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/debug/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/debug/4.1.1/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/debug/4.1.1/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/debug](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | [`4.1.5` -> `4.1.9`](https://renovatebot.com/diffs/npm/@types%2fdebug/4.1.5/4.1.9) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fdebug/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fdebug/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fdebug/4.1.5/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fdebug/4.1.5/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>debug-js/debug (debug)</summary> ### [`v4.3.4`](https://github.com/debug-js/debug/releases/tag/4.3.4) [Compare Source](https://github.com/debug-js/debug/compare/4.3.3...4.3.4) #### What's Changed - Add section about configuring JS console to show debug messages by [@​gitname](https://github.com/gitname) in [debug-js/debug#866 - Replace deprecated String.prototype.substr() by [@​CommanderRoot](https://github.com/CommanderRoot) in [debug-js/debug#876 #### New Contributors - [@​gitname](https://github.com/gitname) made their first contribution in [debug-js/debug#866 - [@​CommanderRoot](https://github.com/CommanderRoot) made their first contribution in [debug-js/debug#876 **Full Changelog**: debug-js/debug@4.3.3...4.3.4 ### [`v4.3.3`](https://github.com/debug-js/debug/releases/tag/4.3.3) [Compare Source](https://github.com/debug-js/debug/compare/4.3.2...4.3.3) ### Patch Release 4.3.3 This is a documentation-only release. Further, the repository was transferred. Please see notes below. - **Migrates repository from https://github.com/visionmedia/debug to https://github.com/debug-js/debug**. Please see notes below as to why this change was made. - Updates repository maintainership information - Updates the copyright (no license terms change has been made) - Removes accidental epizeuxis ([#​828](https://github.com/debug-js/debug/issues/828)) - Adds README section regarding usage in child procs ([#​850](https://github.com/debug-js/debug/issues/850)) Thank you to [@​taylor1791](https://github.com/taylor1791) and [@​kristofkalocsai](https://github.com/kristofkalocsai) for their contributions. *** ### Repository Migration Information I've formatted this as a FAQ, please feel free to open an issue for any additional question and I'll add the response here. ##### Q: What impact will this have on me? In most cases, you shouldn't notice any change. The only exception I can think of is if you pull code directly from https://github.com/visionmedia/debug, e.g. via a `"debug": "visionmedia/debug"`-type version entry in your package.json - in which case, you should *still* be fine due to the automatic redirection Github sets up, but you should also update any references as soon as possible. ##### Q: What are the security implications of this change? If you pull code directly from the old URL, you should update the URL to https://github.com/debug-js/debug as soon as possible. The old organization has *many* approved owners and thus a new repository could (in theory) be created at the old URL, circumventing Github's automatic redirect that is in place now and serving malicious code. I ([@​qix-](https://github.com/qix-)) also wouldn't have access to that repository, so while I don't think it would happen, it's still something to consider. Even in such a case, however, the officially released package on npm (`debug`) would *not* be affected. That package is still very much under control (even more than it used to be). ##### Q: What should I do if I encounter an issue related to the migration? [Search the issues first](https://github.com/debug-js/debug/issues?q=label%3Amigration+) to see if someone has already reported it, and *then* open a new issue if someone has not. ##### Q: Why was this done as a 'patch' release? Isn't this breaking? No, it shouldn't be breaking. The package on npm shouldn't be affected (aside from this patch release) and any references to the old repository should automatically redirect. Thus, according to all of the "APIs" (loosely put) involved, nothing should have broken. I understand there are a lot of edge cases so please open issues as needed so I can assist in any way necessary. ##### Q: Why was the repository transferred? I'll just list them off in no particular order. - The old organization was defunct and abandoned. - I was not an owner of the old organization and thus could not ban the non-trivial amount of spam users or the few truly abusive users from the org. This hindered my ability to properly maintain this package. - The `debug` ecosystem intends to grow beyond a single package, and since new packages could not be created in the old org (nor did it make sense for them to live there), a new org made the most sense - especially from a security point of view. - The old org has way, *way* too many approved members with push access, for which there was nothing I could do. This presented a pretty sizable security risk given that many packages in recent years have fallen victim to backdoors and the like due to lax security access. ##### Q: Was this approved? [Yes.](https://twitter.com/tjholowaychuk/status/1451500306311811106)[<sup>\[archive\]</sup>](https://archive.fo/OQwfn) ##### Q: Do I need to worry about another migration sometime in the future? No. ### [`v4.3.2`](https://github.com/debug-js/debug/releases/tag/4.3.2) [Compare Source](https://github.com/debug-js/debug/compare/4.3.1...4.3.2) ### Patch release 4.3.2 - Caches enabled statuses on a per-logger basis to speed up `.enabled` checks ([#​799](https://github.com/debug-js/debug/issues/799)) Thank you [@​omg](https://github.com/omg)! ### [`v4.3.1`](https://github.com/debug-js/debug/releases/tag/4.3.1) [Compare Source](https://github.com/debug-js/debug/compare/4.3.0...4.3.1) ### Patch release 4.3.1 - Fixes a ReDOS regression ([#​458](https://github.com/debug-js/debug/issues/458)) - see [#​797](https://github.com/debug-js/debug/issues/797) for details. ### [`v4.3.0`](https://github.com/debug-js/debug/releases/tag/4.3.0) [Compare Source](https://github.com/debug-js/debug/compare/4.2.0...4.3.0) ### Minor release - **Deprecated `debugInstance.destroy()`**. Future major versions will not have this method; please remove it from your codebases as it currently does nothing. - Fixed quoted percent sign - Fixed memory leak within debug instances that are created dynamically ### [`v4.2.0`](https://github.com/debug-js/debug/compare/68b4dc8d8549d3924673c38fccc5d594f0a38da1...80ef62a3af4df95250d77d64edfc3d0e1667e7e8) [Compare Source](https://github.com/debug-js/debug/compare/4.1.1...4.2.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] 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://developer.mend.io/github/X-oss-byte/Canary-nextjs).
kodiakhq bot
pushed a commit
to X-oss-byte/Nextjs
that referenced
this pull request
Oct 1, 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 | |---|---|---|---|---|---| | [debug](https://github.com/debug-js/debug) | [`4.1.1` -> `4.3.4`](https://renovatebot.com/diffs/npm/debug/4.1.1/4.3.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/debug/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/debug/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/debug/4.1.1/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/debug/4.1.1/4.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/debug](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | [`4.1.5` -> `4.1.9`](https://renovatebot.com/diffs/npm/@types%2fdebug/4.1.5/4.1.9) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fdebug/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fdebug/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fdebug/4.1.5/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fdebug/4.1.5/4.1.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>debug-js/debug (debug)</summary> ### [`v4.3.4`](https://github.com/debug-js/debug/releases/tag/4.3.4) [Compare Source](https://github.com/debug-js/debug/compare/4.3.3...4.3.4) #### What's Changed - Add section about configuring JS console to show debug messages by [@​gitname](https://github.com/gitname) in [debug-js/debug#866 - Replace deprecated String.prototype.substr() by [@​CommanderRoot](https://github.com/CommanderRoot) in [debug-js/debug#876 #### New Contributors - [@​gitname](https://github.com/gitname) made their first contribution in [debug-js/debug#866 - [@​CommanderRoot](https://github.com/CommanderRoot) made their first contribution in [debug-js/debug#876 **Full Changelog**: debug-js/debug@4.3.3...4.3.4 ### [`v4.3.3`](https://github.com/debug-js/debug/releases/tag/4.3.3) [Compare Source](https://github.com/debug-js/debug/compare/4.3.2...4.3.3) ### Patch Release 4.3.3 This is a documentation-only release. Further, the repository was transferred. Please see notes below. - **Migrates repository from https://github.com/visionmedia/debug to https://github.com/debug-js/debug**. Please see notes below as to why this change was made. - Updates repository maintainership information - Updates the copyright (no license terms change has been made) - Removes accidental epizeuxis ([#​828](https://github.com/debug-js/debug/issues/828)) - Adds README section regarding usage in child procs ([#​850](https://github.com/debug-js/debug/issues/850)) Thank you to [@​taylor1791](https://github.com/taylor1791) and [@​kristofkalocsai](https://github.com/kristofkalocsai) for their contributions. *** ### Repository Migration Information I've formatted this as a FAQ, please feel free to open an issue for any additional question and I'll add the response here. ##### Q: What impact will this have on me? In most cases, you shouldn't notice any change. The only exception I can think of is if you pull code directly from https://github.com/visionmedia/debug, e.g. via a `"debug": "visionmedia/debug"`-type version entry in your package.json - in which case, you should *still* be fine due to the automatic redirection Github sets up, but you should also update any references as soon as possible. ##### Q: What are the security implications of this change? If you pull code directly from the old URL, you should update the URL to https://github.com/debug-js/debug as soon as possible. The old organization has *many* approved owners and thus a new repository could (in theory) be created at the old URL, circumventing Github's automatic redirect that is in place now and serving malicious code. I ([@​qix-](https://github.com/qix-)) also wouldn't have access to that repository, so while I don't think it would happen, it's still something to consider. Even in such a case, however, the officially released package on npm (`debug`) would *not* be affected. That package is still very much under control (even more than it used to be). ##### Q: What should I do if I encounter an issue related to the migration? [Search the issues first](https://github.com/debug-js/debug/issues?q=label%3Amigration+) to see if someone has already reported it, and *then* open a new issue if someone has not. ##### Q: Why was this done as a 'patch' release? Isn't this breaking? No, it shouldn't be breaking. The package on npm shouldn't be affected (aside from this patch release) and any references to the old repository should automatically redirect. Thus, according to all of the "APIs" (loosely put) involved, nothing should have broken. I understand there are a lot of edge cases so please open issues as needed so I can assist in any way necessary. ##### Q: Why was the repository transferred? I'll just list them off in no particular order. - The old organization was defunct and abandoned. - I was not an owner of the old organization and thus could not ban the non-trivial amount of spam users or the few truly abusive users from the org. This hindered my ability to properly maintain this package. - The `debug` ecosystem intends to grow beyond a single package, and since new packages could not be created in the old org (nor did it make sense for them to live there), a new org made the most sense - especially from a security point of view. - The old org has way, *way* too many approved members with push access, for which there was nothing I could do. This presented a pretty sizable security risk given that many packages in recent years have fallen victim to backdoors and the like due to lax security access. ##### Q: Was this approved? [Yes.](https://twitter.com/tjholowaychuk/status/1451500306311811106)[<sup>\[archive\]</sup>](https://archive.fo/OQwfn) ##### Q: Do I need to worry about another migration sometime in the future? No. ### [`v4.3.2`](https://github.com/debug-js/debug/releases/tag/4.3.2) [Compare Source](https://github.com/debug-js/debug/compare/4.3.1...4.3.2) ### Patch release 4.3.2 - Caches enabled statuses on a per-logger basis to speed up `.enabled` checks ([#​799](https://github.com/debug-js/debug/issues/799)) Thank you [@​omg](https://github.com/omg)! ### [`v4.3.1`](https://github.com/debug-js/debug/releases/tag/4.3.1) [Compare Source](https://github.com/debug-js/debug/compare/4.3.0...4.3.1) ### Patch release 4.3.1 - Fixes a ReDOS regression ([#​458](https://github.com/debug-js/debug/issues/458)) - see [#​797](https://github.com/debug-js/debug/issues/797) for details. ### [`v4.3.0`](https://github.com/debug-js/debug/releases/tag/4.3.0) [Compare Source](https://github.com/debug-js/debug/compare/4.2.0...4.3.0) ### Minor release - **Deprecated `debugInstance.destroy()`**. Future major versions will not have this method; please remove it from your codebases as it currently does nothing. - Fixed quoted percent sign - Fixed memory leak within debug instances that are created dynamically ### [`v4.2.0`](https://github.com/debug-js/debug/compare/68b4dc8d8549d3924673c38fccc5d594f0a38da1...80ef62a3af4df95250d77d64edfc3d0e1667e7e8) [Compare Source](https://github.com/debug-js/debug/compare/4.1.1...4.2.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] 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://developer.mend.io/github/X-oss-byte/Nextjs).
This was referenced Jun 21, 2024
This was referenced Jun 21, 2024
This was referenced Aug 30, 2024
This was referenced Sep 1, 2024
This was referenced Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.