nhb-toolbox 4.13.10 → 4.13.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ All notable changes to the package will be documented here.
6
6
 
7
7
  ---
8
8
 
9
+ ## [4.13.11] - 2025-08-06
10
+
11
+ - **Fixed** an issue with `getZodiacSign` method in `Chronos` that could not return correct *Vedic* sign.
12
+
9
13
  ## [4.13.10] - 2025-08-02
10
14
 
11
15
  - **Updated** docs for `isPlural` and `isSingular` methods in `Pluralizer`.
@@ -171,7 +175,7 @@ All notable changes to the package will be documented here.
171
175
 
172
176
  ### 🕧 Updates for Chronos
173
177
 
174
- - **Reduced** bloat by moving _rarely used_ `Chronos` methods to plugin system.
178
+ - **Reduced** bloat by moving *rarely used* `Chronos` methods to plugin system.
175
179
  - **Changed** plugin import paths as `import { somePlugin } from nhb-toolbox/plugins/somePlugin` format so the users can assume the path easily.
176
180
  - **Updated** parameter type for `isBusinessHour` method: instead of multiple parameters can accept one options object now.
177
181
 
@@ -278,5 +282,5 @@ All notable changes to the package will be documented here.
278
282
  ### Improved
279
283
 
280
284
  - 🌲 Full **tree-shaking support** for ESM builds (CommonJS remains unaffected).
281
- - 🌲 _From the beginning the library was tree-shakable_ but now it's **properly tree-shakable** for ESM builds.
285
+ - 🌲 *From the beginning the library was tree-shakable* but now it's **properly tree-shakable** for ESM builds.
282
286
  - 📦 CommonJS (`cjs`) build remains unaffected and stable.
@@ -15,7 +15,7 @@ const zodiacPlugin = (ChronosClass) => {
15
15
  month = this.isoMonth;
16
16
  date = this.date;
17
17
  }
18
- const signs = custom ?? constants_1.ZODIAC_PRESETS[preset];
18
+ const signs = [...(custom ?? constants_1.ZODIAC_PRESETS[preset])].sort((a, b) => a[1][0] * 100 + a[1][1] - (b[1][0] * 100 + b[1][1]));
19
19
  for (let i = signs.length - 1; i >= 0; i--) {
20
20
  const [sign, [m, d]] = signs[i];
21
21
  if (month > m || (month === m && date >= d)) {
@@ -1 +1 @@
1
- {"version":3,"file":"zodiacPlugin.d.ts","sourceRoot":"","sources":["../../../../src/date/plugins/zodiacPlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG1D,KAAK,WAAW,GAAG,cAAc,YAAY,EAAE,OAAO,CAAC;AAEvD,OAAO,QAAQ,YAAY,CAAC;IAC3B,UAAU,OAAO;QAChB;;;;WAIG;QACH,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC;KACnD;CACD;AAED,gDAAgD;AAChD,eAAO,MAAM,YAAY,GAAI,cAAc,WAAW,KAAG,IA4BxD,CAAC"}
1
+ {"version":3,"file":"zodiacPlugin.d.ts","sourceRoot":"","sources":["../../../../src/date/plugins/zodiacPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG1D,KAAK,WAAW,GAAG,cAAc,YAAY,EAAE,OAAO,CAAC;AAEvD,OAAO,QAAQ,YAAY,CAAC;IAC3B,UAAU,OAAO;QAChB;;;;WAIG;QACH,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC;KACnD;CACD;AAED,gDAAgD;AAChD,eAAO,MAAM,YAAY,GAAI,cAAc,WAAW,KAAG,IAiCxD,CAAC"}
@@ -12,7 +12,7 @@ export const zodiacPlugin = (ChronosClass) => {
12
12
  month = this.isoMonth;
13
13
  date = this.date;
14
14
  }
15
- const signs = custom ?? ZODIAC_PRESETS[preset];
15
+ const signs = [...(custom ?? ZODIAC_PRESETS[preset])].sort((a, b) => a[1][0] * 100 + a[1][1] - (b[1][0] * 100 + b[1][1]));
16
16
  for (let i = signs.length - 1; i >= 0; i--) {
17
17
  const [sign, [m, d]] = signs[i];
18
18
  if (month > m || (month === m && date >= d)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "4.13.10",
3
+ "version": "4.13.11",
4
4
  "description": "A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -47,8 +47,10 @@
47
47
  "eslint-config-prettier": "^10.1.5",
48
48
  "eslint-plugin-prettier": "^5.4.1",
49
49
  "globals": "^16.2.0",
50
+ "husky": "^9.1.7",
50
51
  "jest": "^29.7.0",
51
- "nhb-scripts": "^1.8.23",
52
+ "lint-staged": "^16.1.4",
53
+ "nhb-scripts": "^1.8.41",
52
54
  "prettier": "^3.5.3",
53
55
  "ts-jest": "^29.3.4",
54
56
  "typescript": "^5.8.3",