Skip to content

feat: integrate ast-grep#111

Open
pionxzh wants to merge 3 commits intomainfrom
ast-grep
Open

feat: integrate ast-grep#111
pionxzh wants to merge 3 commits intomainfrom
ast-grep

Conversation

@pionxzh
Copy link
Copy Markdown
Owner

@pionxzh pionxzh commented Feb 14, 2024

This PR introduces ast-grep as a new rule provider. We can implement some one-to-one rules with ast-grep, which brings better performance.

I'm not sure if this is a good move since the perf says JS is also fast on these one-to-one rules. The total execution time diff is not that obvious. I will have to do more tests with samples of different sizes.

Related: #35

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wakaru ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 11:31pm

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 14, 2024

Codecov Report

❌ Patch coverage is 68.28087% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.55%. Comparing base (74641f5) to head (677862f).
⚠️ Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
...nminify/src/transformations/module-mapping.grep.ts 0.00% 36 Missing ⚠️
packages/unminify/src/transformations/node.ts 0.00% 34 Missing ⚠️
packages/shared/src/astGrepRule.ts 76.47% 24 Missing ⚠️
packages/unminify/src/nodejs.ts 0.00% 22 Missing ⚠️
packages/unminify/src/transformations/index.ts 0.00% 8 Missing ⚠️
packages/shared/src/runner.ts 70.00% 6 Missing ⚠️
packages/unminify/src/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
- Coverage   89.18%   88.55%   -0.64%     
==========================================
  Files         100      109       +9     
  Lines       12294    12699     +405     
  Branches     1624     1637      +13     
==========================================
+ Hits        10964    11245     +281     
- Misses       1277     1400     +123     
- Partials       53       54       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@0xdevalias
Copy link
Copy Markdown

Related to old mentions of ast-grep in this thread; they recently refactored in a way that it can be built to support other AST parsing backends than just treesitter:

Originally posted by @0xdevalias in j4k0xb/webcrack#24 (comment)

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.

2 participants