Skip to content

applyRule does not require a fix field#1139

Merged
vicb merged 2 commits intomainfrom
vicb/astgrep-ups
Apr 10, 2026
Merged

applyRule does not require a fix field#1139
vicb merged 2 commits intomainfrom
vicb/astgrep-ups

Conversation

@vicb
Copy link
Copy Markdown
Contributor

@vicb vicb commented Apr 10, 2026

A few changes in the ASTGrep utils:

  • The fix is not more required in applyRule. That's because you might only be interested in the returned matches
  • The fix can be an empty string (to delete code)
  • Added a parseCode function to parse source code - the existing parse takes a path.

@vicb vicb requested a review from conico974 April 10, 2026 11:43
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: a3dd7ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 35.89% 3953 / 11013
🔵 Statements 35.89% 3953 / 11013
🔵 Functions 57.62% 189 / 328
🔵 Branches 78.97% 1052 / 1332
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/build/patch/astCodePatcher.ts 87.93% 63.63% 60% 87.93% 47-48, 51, 90-91, 101-102
Generated in workflow #1774 for commit a3dd7ea by the Vitest Coverage Report Action

@vicb vicb requested review from james-elicx and sommeeeer April 10, 2026 16:13
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/aws@1139

commit: a3dd7ea

@vicb
Copy link
Copy Markdown
Contributor Author

vicb commented Apr 10, 2026

Thanks for the reviews!

@vicb vicb merged commit 4bdfd29 into main Apr 10, 2026
3 checks passed
@vicb vicb deleted the vicb/astgrep-ups branch April 10, 2026 21:47
@github-actions github-actions bot mentioned this pull request Apr 10, 2026
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.

3 participants