revert: replace all lodash string methods with kasi #4602#4621
revert: replace all lodash string methods with kasi #4602#4621escapedcat merged 2 commits intomasterfrom
Conversation
… and manual (#4602)" This reverts commit a1ef07e. kasi@2.0.1 has a bug where it incorrectly identifies lowercase Cyrillic text as PascalCase/TitleCase, causing the subject-case rule to reject valid lowercase subjects in non-Latin scripts. Restores lodash-based case detection which correctly handles non-Latin alphabets including Cyrillic, Chinese, Arabic, and Hebrew. Related to #4620
Add regression tests for lowercase and uppercase subjects in: - Cyrillic (Russian) - Chinese - Arabic - Hebrew - Mixed Latin + Cyrillic These tests ensure the subject-case rule correctly handles non-Latin alphabets and prevent future regressions like the kasi@2.0.1 bug. Fixes #4620
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
|
/cc @hyperz111 |
|
Oh, I'm sorry for this. But thanks for reverting :) |
|
No worries, happens. If you have time maybe check existing issues in the kasi repo or open one |
User description
Fixes: #4620
PR Type
Bug fix, Tests
Description
Reverted kasi library due to incorrect non-Latin case detection
Restored lodash-based case detection for proper multi-script support
Added comprehensive test coverage for Cyrillic, Chinese, Arabic, Hebrew scripts
Updated dependencies from kasi to individual lodash case utilities
Diagram Walkthrough
File Walkthrough
index.test.ts
Replace kasi with lodash camelCase@commitlint/ensure/src/index.test.ts
kasiimport withlodash.camelcaseto-case.ts
Replace kasi with lodash case utilities@commitlint/ensure/src/to-case.ts
utilities
upperFirst(camelCase(input))upperFirst(input)lodash.startcase, lodash.upperfirst
package.json
Update dependencies from kasi to lodash@commitlint/ensure/package.json
kasi@^2.0.1dependency with individual lodash case utilitiessubject-case.test.ts
Add non-Latin script subject-case tests@commitlint/rules/src/subject-case.test.ts