js-utils-kit@5.0.0
Major Changes
-
#167
42bed98Thanks @teneplaysofficial! - Enforce stricter case validation rules via shared regex packageChanges
CAMEL_CASE_REGEXnow requires at least one uppercase transition- Previously valid:
"hello" - Now invalid:
"hello" - Still valid:
"helloWorld"
- Previously valid:
PASCAL_CASE_REGEXnow requires at least two segments- Previously valid:
"Hello" - Now invalid:
"Hello" - Still valid:
"HelloWorld"
- Previously valid:
- Migrated to
@js-utils-kit/regexfor all regex patterns - Enforced stricter rules for:
camelCasePascalCasesnake_casekebab-case
Affected exports
CAMEL_CASE_REGEXPASCAL_CASE_REGEXisCamelCaseisPascalCase
Impact
- These changes modify validation behavior and will cause some previously valid inputs to fail.
- Downstream consumers must audit usages of:
isCamelCaseisPascalCase- direct usage of the regex constants
-
#174
004efdbThanks @teneplaysofficial! - Improve and Relocate CommonJS DetectionThe previous
hasCommonJSFilenameutility has been removed from@js-utils-kit/fsand replaced with a more robustisCommonJShelper in@js-utils-kit/env. Unlike the old implementation, which only checked for__filename, the new version uses multiple runtime signals (module.exports,require,exports,__filename, and__dirname) to provide a more reliable indication of a CommonJS environment. Update your imports to useisCommonJSfrom@js-utils-kit/env.- import { hasCommonJSFilename } from '@js-utils-kit/fs'; + import { isCommonJS } from '@js-utils-kit/env'; - if (hasCommonJSFilename) { + if (isCommonJS) { console.log('Running in CommonJS environment'); } else { console.log('Running in ESM environment'); }
-
#174
004efdbThanks @teneplaysofficial! - Remove deprecatedmergeObjfunction and replace it withdeepMerge.
Minor Changes
- #167
42bed98Thanks @teneplaysofficial! - Introduce regex utilities package
Patch Changes
-
#177
d6af860Thanks @teneplaysofficial! - RefactordetectPMto usename != nullfor consistent null/undefined handling in conditional spreading. -
#174
004efdbThanks @teneplaysofficial! - Simplify Email Validation Using Centralized Regex- Replaces manual email parsing and validation logic with a single regex-based approach using
EMAIL_REGEX. This reduces complexity and improves maintainability by delegating validation responsibility to a centralized regex. - Updates Typedoc to reflect the new behavior:
- Removes explicit local and domain length enforcement from the function
- Clarifies that validation is fully handled by the regex
- Adds support and documentation for custom regex overrides
- No breaking changes, but validation behavior may differ slightly due to removal of manual checks.
- Replaces manual email parsing and validation logic with a single regex-based approach using
-
Updated dependencies [
42bed98,004efdb,d6af860,004efdb,004efdb,42bed98]:- @js-utils-kit/core@5.0.0