Skip to content

fix: handle consecutive single-letter camel-case segments - #1550

Open
Aahan0605 wants to merge 2 commits into
google:mainfrom
Aahan0605:fix/camel-case-single-letter-segments
Open

Aahan0605 wants to merge 2 commits into
google:mainfrom
Aahan0605:fix/camel-case-single-letter-segments

Conversation

@Aahan0605

Copy link
Copy Markdown

Fixes camel-case conversion when consecutive segments contain a single letter.

The previous expression consumed both letters around a separator. The second letter was then unavailable as the leading match for the next separator, so A_B_C became aB_c and a-b-c became aB-c. A lookbehind keeps the preceding-letter constraint without consuming that letter. Leading underscores retain their existing behavior.

Adds regression cases for underscore, hyphen, mixed-length, and leading-underscore inputs; rebuilds the utility bundle and refreshes the three affected size budgets with npm run build:size-limit.

Validation:

  • New regression failed against the original bundle (aB_c !== aBC); all 12 utility tests pass with the fix.
  • npm run build, test:types, fmt:check, test:license, and test:size passed.
  • The built utility was smoke-tested on Node 12.
  • Full coverage is not verified: a Linux run completed with 263 passing, 3 failing, and 1 skipped tests. Failures were a checkout-directory suffix assumption and two environment-generated chalk export expectations. Those local conditions were corrected, but Docker then failed with disk I/O errors. A native retry reached its 90-second limit. CI still needs to confirm the full suite.

This draft was generated by an AI coding agent at the account owner's request. Human review and any required CLA/signature steps remain pending. The project's non-AI-only review attestation is intentionally left unchecked.

  • Setup Set the latest Node.js LTS version.
  • Build Built and verified the bundle update.
  • Tests All project tests pass (focused checks pass; full coverage remains unverified).
  • Docs No public API change requiring documentation.
  • Sign Commits have verified signatures.
  • CoC Human contributor review pending.
  • Review This PR represents original work and is not solely generated by AI tools.

@google-cla

google-cla Bot commented Nov 12, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Aahan0605
Aahan0605 marked this pull request as ready for review November 12, 2026 15:09

This branch has not been deployed

No deployments
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