Skip to content

feat: add isValidScriptlet api#213

Merged
DylanPiercey merged 1 commit intomainfrom
is-valid-scriptlet
Feb 16, 2026
Merged

feat: add isValidScriptlet api#213
DylanPiercey merged 1 commit intomainfrom
is-valid-scriptlet

Conversation

@DylanPiercey
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: b502c10

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

This PR includes changesets to release 1 package
Name Type
htmljs-parser Minor

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
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.98%. Comparing base (1c38190) to head (b502c10).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #213      +/-   ##
==========================================
+ Coverage   91.96%   91.98%   +0.02%     
==========================================
  Files          28       28              
  Lines        1443     1448       +5     
  Branches      327      327              
==========================================
+ Hits         1327     1332       +5     
  Misses         54       54              
  Partials       62       62              

☔ 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.

@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces a new public validation API function isValidScriptlet for validating scriptlet code. The implementation adds isValidScriptlet(code: string) in src/util/validators.ts alongside an internal helper prepareScriptlet that configures expression handling. The function is exported from src/index.ts and includes a corresponding test suite covering single-line expressions, continuation lines, ternary operations, and group termination scenarios. A changeset entry documents the minor version bump.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch is-valid-scriptlet

Comment @coderabbitai help to get the list of available commands and usage tips.

@DylanPiercey DylanPiercey merged commit f64e525 into main Feb 16, 2026
10 checks passed
@DylanPiercey DylanPiercey deleted the is-valid-scriptlet branch February 16, 2026 01:50
@github-actions github-actions bot mentioned this pull request Feb 16, 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.

1 participant