Skip to content

remove dead exports and stale polyfill comment#393

Merged
brianmhunt merged 1 commit into
mainfrom
claude/inspiring-fermat-xHjwa
May 29, 2026
Merged

remove dead exports and stale polyfill comment#393
brianmhunt merged 1 commit into
mainfrom
claude/inspiring-fermat-xHjwa

Conversation

@brianmhunt

@brianmhunt brianmhunt commented May 29, 2026

Copy link
Copy Markdown
Member

$(cat <<'EOF'

Summary

  • Remove export from innerParse and parseOuterMatch in packages/provider.mustache/src/mustacheParser.ts — both are internal helpers that are never re-exported from index.ts; knip flags them as unused exports (issue knip: resolve remaining unused-export and duplicate-export warnings (Phase 6) #366)
  • Delete the commented-out Array.isArray polyfill in packages/filter.punches/spec/filterBehavior.ts — author-marked "can be remove", zero runtime effect

Test plan

  • bun run verify passes (lint + typecheck + build + tests)
  • bun run knip no longer reports innerParse or parseOuterMatch as unused exports

https://claude.ai/code/session_014spdok9YkrWpXWJ8kZ3C8H
EOF
)


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Removed unused commented code snippets from test files.
    • Refined internal function visibility to strengthen module encapsulation and reduce public API surface.

Review Change Stack

- Drop unexported internal helpers innerParse and parseOuterMatch from
  mustacheParser.ts; neither is re-exported from index.ts and knip
  flags both as unused exports (issue #366)
- Delete commented-out Array.isArray polyfill in filter.punches spec;
  author-noted it as removable and it has no runtime effect

https://claude.ai/code/session_014spdok9YkrWpXWJ8kZ3C8H
Copilot AI review requested due to automatic review settings May 29, 2026 13:13
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 86318d32-300a-4e3f-aae7-f9e5b530885b

📥 Commits

Reviewing files that changed from the base of the PR and between 795e85b and bb4141d.

📒 Files selected for processing (2)
  • packages/filter.punches/spec/filterBehavior.ts
  • packages/provider.mustache/src/mustacheParser.ts
💤 Files with no reviewable changes (1)
  • packages/filter.punches/spec/filterBehavior.ts

📝 Walkthrough

Walkthrough

This pull request removes dead code and narrows the public API surface of the mustache parser module. A commented-out polyfill is deleted from the filter spec, and two internal generator functions are made non-exported while the public parseInterpolation export remains unchanged.

Changes

Spec cleanup and API visibility

Layer / File(s) Summary
Remove dead code from spec
packages/filter.punches/spec/filterBehavior.ts
Commented-out Array.isArray polyfill block is removed following the declare let ko declaration.
Narrow internal parser API
packages/provider.mustache/src/mustacheParser.ts
innerParse and parseOuterMatch generator functions lose their export keyword and become internal implementation details; parseInterpolation remains the public entry point.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A polyfill sleeps, no more to speak,
Two functions hide, internal and meek,
The API breathes cleaner air,
Tighter boundaries everywhere.
CodeRabbit says: refactor with care! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main changes: removing dead exports (innerParse and parseOuterMatch) and a stale polyfill comment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/inspiring-fermat-xHjwa

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Cleanup PR removing unused exports flagged by knip and a stale commented-out polyfill, part of issue #366 Phase 6 cleanup.

Changes:

  • Drop export from internal helpers innerParse and parseOuterMatch in the mustache parser (only parseInterpolation is consumed externally).
  • Remove a commented-out Array.isArray polyfill block from the filter.punches spec.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/provider.mustache/src/mustacheParser.ts Demote innerParse and parseOuterMatch to module-private functions.
packages/filter.punches/spec/filterBehavior.ts Delete dead commented-out Array.isArray polyfill.

@brianmhunt
brianmhunt merged commit 339c90b into main May 29, 2026
11 checks passed
@brianmhunt
brianmhunt deleted the claude/inspiring-fermat-xHjwa branch May 29, 2026 13:19
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