fix(apply-release-plan): avoid using String.prototype.replace#1725
fix(apply-release-plan): avoid using String.prototype.replace#1725Andarist merged 7 commits intochangesets:mainfrom
String.prototype.replace#1725Conversation
🦋 Changeset detectedLatest commit: f31a4f4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1725 +/- ##
=======================================
Coverage ? 80.69%
=======================================
Files ? 54
Lines ? 2264
Branches ? 680
=======================================
Hits ? 1827
Misses ? 432
Partials ? 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return; | ||
| } | ||
| const newChangelog = fileData.replace("\n", data); | ||
| const [header, ...oldChangelogLines] = fileData.split("\n"); |
There was a problem hiding this comment.
Let's use indexOf('\n') + .slice(...) + data + .slice(...)
There was a problem hiding this comment.
Thanks! I've changed the implementation. PTAL~
| fileData.slice(0, firstNewlineIdx) + | ||
| "\n" + |
There was a problem hiding this comment.
Doesn't this end up adding an extra newline that wasn't in the original newChangelog?
close: #1724