refactor(ensure): replace all lodash string methods with kasi and manual#4602
Conversation
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 |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||
|
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. |
|
:D I'm not always at the computer |
|
Thanks! |
|
Ok, maybe the problem in #4596 is on |
… 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
* Revert "refactor(ensure): replace all lodash string methods with kasi 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 * test(rules): add non-Latin script coverage for subject-case rule 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
This PR contains the following updates: | Package | Type | Update | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [alpine/helm](https://github.com/alpine-docker/helm) ([changelog](https://github.com/helm/helm)) | | patch | `3.20.0` → `3.20.1` |  |  | | [alpine/helm](https://github.com/alpine-docker/helm) ([changelog](https://github.com/helm/helm)) | container | patch | `3.20.0` → `3.20.1` |  |  | | [commitlint/commitlint](https://github.com/conventional-changelog/commitlint) | container | minor | `20.4.1` → `20.5.1` |  |  | | [docker.io/thegeeklab/git-sv](https://github.com/thegeeklab/git-sv) | container | patch | `2.0.9` → `2.0.11` |  |  | | [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) | devDependencies | minor | [`^0.47.0` → `^0.48.0`](https://renovatebot.com/diffs/npm/markdownlint-cli/0.47.0/0.48.0) |  |  | --- ### Release Notes <details> <summary>conventional-changelog/commitlint (commitlint/commitlint)</summary> ### [`v20.5.1`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2051-2026-03-31) [Compare Source](conventional-changelog/commitlint@v20.5.0...v20.5.1) ##### Bug Fixes - **cz-commitlint:** add VS16 to single character emojis ([#​4666](conventional-changelog/commitlint#4666)) ([9e3e2d3](conventional-changelog/commitlint@9e3e2d3)) - **cz-commitlint:** handle modifiers correctly ([#​4667](conventional-changelog/commitlint#4667)) ([5a3ebf5](conventional-changelog/commitlint@5a3ebf5)) - update dependency global-directory to v5 ([#​4671](conventional-changelog/commitlint#4671)) ([a300d32](conventional-changelog/commitlint@a300d32)) ##### Reverts - Revert "fix: update dependency global-directory to v5 ([#​4671](conventional-changelog/commitlint#4671))" ([#​4677](conventional-changelog/commitlint#4677)) ([0f124c9](conventional-changelog/commitlint@0f124c9)), closes [#​4671](conventional-changelog/commitlint#4671) [#​4677](conventional-changelog/commitlint#4677) ### [`v20.5.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2050-2026-03-15) [Compare Source](conventional-changelog/commitlint@v20.4.4...v20.5.0) ##### Bug Fixes - **cli:** validate that --cwd directory exists before execution ([#​4658](conventional-changelog/commitlint#4658)) ([cf80f75](conventional-changelog/commitlint@cf80f75)), closes [#​4595](conventional-changelog/commitlint#4595) - **load:** resolve async config exports in CJS projects ([#​4659](conventional-changelog/commitlint#4659)) ([fce263f](conventional-changelog/commitlint@fce263f)), closes [#​4557](conventional-changelog/commitlint#4557) - **resolve-extends:** always resolve extended parser presets for proper merging ([#​4647](conventional-changelog/commitlint#4647)) ([e9ef76c](conventional-changelog/commitlint@e9ef76c)), closes [#​4640](conventional-changelog/commitlint#4640) ##### Features - **cz-commitlint:** add exclamation mark support for breaking changes ([#​4655](conventional-changelog/commitlint#4655)) ([3b124a7](conventional-changelog/commitlint@3b124a7)) #### [20.4.4](conventional-changelog/commitlint@v20.4.3...v20.4.4) (2026-03-12) ##### Bug Fixes - **is-ignored:** strip CI skip markers from release commits ([#​4637](conventional-changelog/commitlint#4637)) ([56a6fd0](conventional-changelog/commitlint@56a6fd0)) - **read:** update git-raw-commits to v5 API ([#​4638](conventional-changelog/commitlint#4638)) ([bd6ab41](conventional-changelog/commitlint@bd6ab41)) - **types:** allow context parameter in QualifiedRuleConfig functions ([#​4636](conventional-changelog/commitlint#4636)) ([17537ae](conventional-changelog/commitlint@17537ae)), closes [#​4357](conventional-changelog/commitlint#4357) #### [20.4.3](conventional-changelog/commitlint@v20.4.2...v20.4.3) (2026-03-03) ##### Bug Fixes - footer parser does not escape special chars for regex [#​4560](conventional-changelog/commitlint#4560) ([#​4634](conventional-changelog/commitlint#4634)) ([8ff7c7f](conventional-changelog/commitlint@8ff7c7f)) - npx usage [#​613](conventional-changelog/commitlint#613) ([#​4630](conventional-changelog/commitlint#4630)) ([1644f1e](conventional-changelog/commitlint@1644f1e)), closes [#​3](conventional-changelog/commitlint#3) [#​1](conventional-changelog/commitlint#1) [#​2](conventional-changelog/commitlint#2) [#​4](conventional-changelog/commitlint#4) [#​5](conventional-changelog/commitlint#5) [#​7](conventional-changelog/commitlint#7) [#​6](conventional-changelog/commitlint#6) - **types:** incorrect types for rule options ([#​4633](conventional-changelog/commitlint#4633)) ([77b85f2](conventional-changelog/commitlint@77b85f2)) #### [20.4.2](conventional-changelog/commitlint@v20.4.1...v20.4.2) (2026-02-19) ##### Bug Fixes - **config-nx-scopes:** add unique names to fixture projects ([#​4622](conventional-changelog/commitlint#4622)) ([5635cf0](conventional-changelog/commitlint@5635cf0)) - **rules:** ignore cherry-picks in signed-off-by ([#​4625](conventional-changelog/commitlint#4625)) ([691a52d](conventional-changelog/commitlint@691a52d)) #### [20.4.1](conventional-changelog/commitlint@v20.4.0...v20.4.1) (2026-02-02) ##### Reverts - replace all lodash string methods with kasi [#​4602](conventional-changelog/commitlint#4602) ([#​4621](conventional-changelog/commitlint#4621)) ([5326ab9](conventional-changelog/commitlint@5326ab9)), closes [#​4620](conventional-changelog/commitlint#4620) [#​4620](conventional-changelog/commitlint#4620) ### [`v20.4.4`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2044-2026-03-12) [Compare Source](conventional-changelog/commitlint@v20.4.3...v20.4.4) ##### Bug Fixes - **is-ignored:** strip CI skip markers from release commits ([#​4637](conventional-changelog/commitlint#4637)) ([56a6fd0](conventional-changelog/commitlint@56a6fd0)) - **read:** update git-raw-commits to v5 API ([#​4638](conventional-changelog/commitlint#4638)) ([bd6ab41](conventional-changelog/commitlint@bd6ab41)) - **types:** allow context parameter in QualifiedRuleConfig functions ([#​4636](conventional-changelog/commitlint#4636)) ([17537ae](conventional-changelog/commitlint@17537ae)), closes [#​4357](conventional-changelog/commitlint#4357) ### [`v20.4.3`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2043-2026-03-03) [Compare Source](conventional-changelog/commitlint@v20.4.2...v20.4.3) ##### Bug Fixes - footer parser does not escape special chars for regex [#​4560](conventional-changelog/commitlint#4560) ([#​4634](conventional-changelog/commitlint#4634)) ([8ff7c7f](conventional-changelog/commitlint@8ff7c7f)) - npx usage [#​613](conventional-changelog/commitlint#613) ([#​4630](conventional-changelog/commitlint#4630)) ([1644f1e](conventional-changelog/commitlint@1644f1e)), closes [#​3](conventional-changelog/commitlint#3) [#​1](conventional-changelog/commitlint#1) [#​2](conventional-changelog/commitlint#2) [#​4](conventional-changelog/commitlint#4) [#​5](conventional-changelog/commitlint#5) [#​7](conventional-changelog/commitlint#7) [#​6](conventional-changelog/commitlint#6) - **types:** incorrect types for rule options ([#​4633](conventional-changelog/commitlint#4633)) ([77b85f2](conventional-changelog/commitlint@77b85f2)) ### [`v20.4.2`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2042-2026-02-19) [Compare Source](conventional-changelog/commitlint@v20.4.1...v20.4.2) ##### Bug Fixes - **config-nx-scopes:** add unique names to fixture projects ([#​4622](conventional-changelog/commitlint#4622)) ([5635cf0](conventional-changelog/commitlint@5635cf0)) - **rules:** ignore cherry-picks in signed-off-by ([#​4625](conventional-changelog/commitlint#4625)) ([691a52d](conventional-changelog/commitlint@691a52d)) </details> <details> <summary>thegeeklab/git-sv (docker.io/thegeeklab/git-sv)</summary> ### [`v2.0.11`](https://github.com/thegeeklab/git-sv/releases/tag/v2.0.11) [Compare Source](thegeeklab/git-sv@v2.0.10...v2.0.11) #### v2.0.11 (2026-03-29) ##### Bug Fixes - parse multiline breaking changes correctly ([#​297](thegeeklab/git-sv#297)) ([`7898fb6`](thegeeklab/git-sv@7898fb6)) - **deps:** update module github.com/rs/zerolog to v1.35.0 ([#​294](thegeeklab/git-sv#294)) ([`2a091dd`](thegeeklab/git-sv@2a091dd)) ##### Others - **deps:** bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 ([#​296](thegeeklab/git-sv#296)) ([`909ad60`](thegeeklab/git-sv@909ad60)) - improve test coverage ([#​295](thegeeklab/git-sv#295)) ([`de86f6c`](thegeeklab/git-sv@de86f6c)) - **deps:** update dependency golangci/golangci-lint to v2.11.4 ([#​293](thegeeklab/git-sv#293)) ([`e5663e5`](thegeeklab/git-sv@e5663e5)) - **docker:** update docker.io/library/golang:1.26.1 docker digest to [`595c784`](thegeeklab/git-sv@595c784) ([#​292](thegeeklab/git-sv#292)) ([`21374a6`](thegeeklab/git-sv@21374a6)) - **docker:** update docker.io/library/golang:1.26.1 docker digest to [`c42e4d7`](thegeeklab/git-sv@c42e4d7) ([#​291](thegeeklab/git-sv#291)) ([`d7c21aa`](thegeeklab/git-sv@d7c21aa)) ##### CI Pipeline - use trivy image from ghcr ([`4261c0f`](thegeeklab/git-sv@4261c0f)) ### [`v2.0.10`](https://github.com/thegeeklab/git-sv/releases/tag/v2.0.10) [Compare Source](thegeeklab/git-sv@v2.0.9...v2.0.10) #### v2.0.10 (2026-03-12) ##### Bug Fixes - **deps:** update module github.com/urfave/cli/v3 to v3.7.0 ([#​287](thegeeklab/git-sv#287)) ([`fa50899`](thegeeklab/git-sv@fa50899)) - **deps:** update module github.com/urfave/cli/v3 to v3.6.2 ([#​274](thegeeklab/git-sv#274)) ([`db378fd`](thegeeklab/git-sv@db378fd)) - **deps:** update module github.com/goccy/go-yaml to v1.19.2 ([#​270](thegeeklab/git-sv#270)) ([`c0e650d`](thegeeklab/git-sv@c0e650d)) - **deps:** update module github.com/goccy/go-yaml to v1.19.1 ([#​266](thegeeklab/git-sv#266)) ([`b7974ba`](thegeeklab/git-sv@b7974ba)) ##### Others - **deps:** update dependency golangci/golangci-lint to v2.11.3 ([#​290](thegeeklab/git-sv#290)) ([`bfc4e71`](thegeeklab/git-sv@bfc4e71)) - **deps:** update golang patch version ([#​289](thegeeklab/git-sv#289)) ([`e17551c`](thegeeklab/git-sv@e17551c)) - **docker:** update docker.io/library/golang:1.26.0 docker digest to [`fb612b7`](thegeeklab/git-sv@fb612b7) ([#​288](thegeeklab/git-sv#288)) ([`3474fb1`](thegeeklab/git-sv@3474fb1)) - **docker:** update docker.io/library/golang:1.26.0 docker digest to [`9edf713`](thegeeklab/git-sv@9edf713) ([#​286](thegeeklab/git-sv#286)) ([`f72ce98`](thegeeklab/git-sv@f72ce98)) - **docker:** update docker.io/library/golang:1.26.0 docker digest to [`a9c4aac`](thegeeklab/git-sv@a9c4aac) ([#​285](thegeeklab/git-sv#285)) ([`886ff59`](thegeeklab/git-sv@886ff59)) - **deps:** update dependency golangci/golangci-lint to v2.10.1 ([#​283](thegeeklab/git-sv#283)) ([`009cee1`](thegeeklab/git-sv@009cee1)) - **deps:** update docker.io/lycheeverse/lychee docker tag to v0.23 ([#​284](thegeeklab/git-sv#284)) ([`d67f814`](thegeeklab/git-sv@d67f814)) - **deps:** update golang version ([#​279](thegeeklab/git-sv#279)) ([`562e6b6`](thegeeklab/git-sv@562e6b6)) - **deps:** update dependency golangci/golangci-lint to v2.9.0 ([#​282](thegeeklab/git-sv#282)) ([`0fa44b0`](thegeeklab/git-sv@0fa44b0)) - **docker:** update docker.io/library/golang:1.25.7 docker digest to [`85c0ab0`](thegeeklab/git-sv@85c0ab0) ([#​280](thegeeklab/git-sv#280)) ([`15e0180`](thegeeklab/git-sv@15e0180)) - **deps:** update golang patch version ([#​278](thegeeklab/git-sv#278)) ([`57eb5f1`](thegeeklab/git-sv@57eb5f1)) - **docker:** update docker.io/library/golang:1.25.6 docker digest to [`06d1251`](thegeeklab/git-sv@06d1251) ([#​277](thegeeklab/git-sv#277)) ([`d3620b6`](thegeeklab/git-sv@d3620b6)) - **docker:** update docker.io/library/alpine:3.23 docker digest to [`2510918`](thegeeklab/git-sv@2510918) ([#​276](thegeeklab/git-sv#276)) ([`17b4167`](thegeeklab/git-sv@17b4167)) - fix lychee and use yaml file extension ([`cadbc7b`](thegeeklab/git-sv@cadbc7b)) - **docker:** update docker.io/library/golang:1.25.6 docker digest to [`ce63a16`](thegeeklab/git-sv@ce63a16) ([#​275](thegeeklab/git-sv#275)) ([`ede5c73`](thegeeklab/git-sv@ede5c73)) - **deps:** update golang patch version ([#​273](thegeeklab/git-sv#273)) ([`9937fcf`](thegeeklab/git-sv@9937fcf)) - **docker:** update docker.io/library/golang:1.25.5 docker digest to [`8bbd140`](thegeeklab/git-sv@8bbd140) ([#​272](thegeeklab/git-sv#272)) ([`3938585`](thegeeklab/git-sv@3938585)) - **deps:** update dependency golangci/golangci-lint to v2.8.0 ([#​271](thegeeklab/git-sv#271)) ([`411d457`](thegeeklab/git-sv@411d457)) - **docker:** update docker.io/library/golang:1.25.5 docker digest to [`6cc2338`](thegeeklab/git-sv@6cc2338) ([#​269](thegeeklab/git-sv#269)) ([`4b858a5`](thegeeklab/git-sv@4b858a5)) - **docker:** update docker.io/library/golang:1.25.5 docker digest to [`31c1e53`](thegeeklab/git-sv@31c1e53) ([#​268](thegeeklab/git-sv#268)) ([`bc5174b`](thegeeklab/git-sv@bc5174b)) - **docker:** update docker.io/library/alpine:3.23 docker digest to [`865b95f`](thegeeklab/git-sv@865b95f) ([#​267](thegeeklab/git-sv#267)) ([`5b2b90e`](thegeeklab/git-sv@5b2b90e)) - **docker:** update docker.io/library/golang:1.25.5 docker digest to [`36b4f45`](thegeeklab/git-sv@36b4f45) ([#​265](thegeeklab/git-sv#265)) ([`d20165f`](thegeeklab/git-sv@d20165f)) - **docker:** update docker.io/library/golang:1.25.5 docker digest to [`a22b2e6`](thegeeklab/git-sv@a22b2e6) ([#​264](thegeeklab/git-sv#264)) ([`c54bb89`](thegeeklab/git-sv@c54bb89)) - **docker:** update docker.io/library/golang:1.25.5 docker digest to [`68ee6df`](thegeeklab/git-sv@68ee6df) ([#​263](thegeeklab/git-sv#263)) ([`caafd3d`](thegeeklab/git-sv@caafd3d)) - **deps:** update dependency golangci/golangci-lint to v2.7.2 ([#​262](thegeeklab/git-sv#262)) ([`c23a505`](thegeeklab/git-sv@c23a505)) ##### CI Pipeline - drop notify workflow ([`df67269`](thegeeklab/git-sv@df67269)) - unify golangci config ([`f450ce8`](thegeeklab/git-sv@f450ce8)) - drop prealloc linter ([`f6354f7`](thegeeklab/git-sv@f6354f7)) </details> <details> <summary>igorshubovych/markdownlint-cli (markdownlint-cli)</summary> ### [`v0.48.0`](https://github.com/igorshubovych/markdownlint-cli/releases/tag/v0.48.0) [Compare Source](igorshubovych/markdownlint-cli@v0.47.0...v0.48.0) - Update all dependencies via `Dependabot` </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Only on Sunday and Saturday (`* * * * 0,6`) - Automerge - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNi4yIiwidXBkYXRlZEluVmVyIjoiNDMuMTA0LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImtpbmQvZGVwZW5kZW5jeSJdfQ==--> Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/99 Reviewed-by: DaanSelen <135789+daanselen@noreply.gitea.com> Co-authored-by: Renovate Bot <renovate-bot@gitea.com> Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
User description
Description
Replace all
lodashstring methods withkasiand manual code. Extracted from #4596.Motivation and Context
kasiis lighter than 5 lodash string method packages.Usage examples
How Has This Been Tested?
I run test in each changed packages (
@commitlint/ensure).Types of changes
Checklist:
PR Type
Enhancement
Description
Replace 5 lodash string packages with lighter kasi library
Update imports from individual lodash modules to kasi
Simplify pascal-case and sentence-case implementations
Remove unnecessary @types/lodash dependencies
Diagram Walkthrough
File Walkthrough
index.test.ts
Update camelCase import and usage@commitlint/ensure/src/index.test.ts
toCamelCasefromlodash.camelcase
camelCase()function call withtoCamelCase()to-case.ts
Replace lodash with kasi for case conversion@commitlint/ensure/src/to-case.ts
toPascalCasedirectlypackage.json
Update dependencies to use kasi@commitlint/ensure/package.json