Skip to content

fix(alias): insert string alias replacements literally - #2029

Open
btea wants to merge 1 commit into
rollup:masterfrom
btea:fix/alias-literal-replacement
Open

btea wants to merge 1 commit into
rollup:masterfrom
btea:fix/alias-literal-replacement

Conversation

@btea

@btea btea commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Rollup Plugin Name: {alias}

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

When "find" is a string, the replacement was passed directly as the second argument of String.replace, so special replacement patterns were expanded: a replacement of "$$" produced a single "$", "$&" inserted the matched substring, etc.

@btea
btea requested a review from shellscape as a code owner October 8, 2026 13:05
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes string alias replacement to handle special characters.

This PR appears safe to merge.

What we checked:

  • RegExp replacements still work: Only string matches use the new callback. RegExp matches still pass the replacement string directly to replace.

Reviews (1) 路 Last reviewed commit: "fix(alias): insert string alias replacem..." 路 Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant