@neelegirl/baileys 2.1.7 → 2.1.8

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/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  | Package | Version | Main goal |
21
21
  |---|---:|---|
22
- | `@neelegirl/baileys` | `2.1.7` | Stable Neelegirl fork with preserved project-specific runtime behavior |
22
+ | `@neelegirl/baileys` | `2.1.8` | Stable Neelegirl fork with preserved project-specific runtime behavior |
23
23
 
24
24
  [Installation](#installation) · [Quickstart](#quickstart) · [Protected logic](#protected-logic) · [Device and LID notes](#device-and-lid-notes) · [Verified exports](#verified-exports) · [Release notes](#release-notes)
25
25
 
@@ -32,7 +32,7 @@
32
32
  - [Overview](#overview)
33
33
  - [Why this fork exists](#why-this-fork-exists)
34
34
  - [Protected logic](#protected-logic)
35
- - [What was updated in 2.1.6](#what-was-updated-in-216)
35
+ - [What was updated in 2.1.8](#what-was-updated-in-218)
36
36
  - [Installation](#installation)
37
37
  - [Imports](#imports)
38
38
  - [Quickstart](#quickstart)
@@ -83,6 +83,21 @@ The following logic was explicitly treated as protected during maintenance:
83
83
 
84
84
  Nothing in those areas was blindly replaced with upstream code.
85
85
 
86
+ ## What was updated in 2.1.8
87
+
88
+ ### Runtime hotfixes
89
+
90
+ - fixed `lru-cache` compatibility so the local CommonJS build works with both direct-class and named-export variants
91
+ - unblocked `LIDMappingStore` initialization during real bot startup
92
+ - unblocked the migrated session cache and retry caches that rely on the same constructor shape
93
+ - kept QR flow, `NEELE` message-ID logic, and project-specific device/watch handling untouched
94
+
95
+ ### Verified after the hotfix
96
+
97
+ - multi-session startup completed successfully in the local Neelegirl runtime
98
+ - LID/device watch output continued to work after the patch
99
+ - the package now starts without the `LRUCache is not a constructor` crash seen before this release
100
+
86
101
  ## What was updated in 2.1.6
87
102
 
88
103
  ### Runtime compatibility
@@ -1614,6 +1629,12 @@ This README is intentionally longer than a minimal package page because users of
1614
1629
 
1615
1630
  ## Release notes
1616
1631
 
1632
+ ### 2.1.8
1633
+
1634
+ - runtime hotfix release for CommonJS `lru-cache` compatibility in the current Neelegirl environment
1635
+ - fixed constructor resolution used by LID mapping and retry cache initialization
1636
+ - dependency range aligned to `@neelegirl/libsignal@^1.0.12`
1637
+
1617
1638
  ### 2.1.7
1618
1639
 
1619
1640
  - documentation expansion release
@@ -4,7 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true })
4
4
 
5
5
  const libsignal = require("@neelegirl/libsignal")
6
6
  const { PreKeyWhisperMessage } = require("@neelegirl/libsignal/src/protobufs")
7
- const { LRUCache } = require("lru-cache")
7
+ const LRUCacheModule = require("lru-cache")
8
+ const LRUCache = LRUCacheModule.LRUCache || LRUCacheModule
8
9
  const WASignalGroup_1 = require("./WASignalGroup")
9
10
  const lid_mapping_1 = require("./lid-mapping")
10
11
  const Utils_1 = require("../Utils")
@@ -2,7 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", { value: true })
4
4
 
5
- const { LRUCache } = require("lru-cache")
5
+ const LRUCacheModule = require("lru-cache")
6
+ const LRUCache = LRUCacheModule.LRUCache || LRUCacheModule
6
7
  const WABinary_1 = require("../WABinary")
7
8
 
8
9
  class LIDMappingStore {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessageRetryManager = void 0;
4
4
  const lru_cache_1 = require("lru-cache");
5
+ const LRUCache = lru_cache_1.LRUCache || lru_cache_1;
5
6
  /** Number of sent messages to cache in memory for handling retry receipts */
6
7
  const RECENT_MESSAGES_SIZE = 512;
7
8
  const MESSAGE_KEY_SEPARATOR = '\u0000';
@@ -11,7 +12,7 @@ const PHONE_REQUEST_DELAY = 3000;
11
12
  class MessageRetryManager {
12
13
  constructor(logger, maxMsgRetryCount) {
13
14
  this.logger = logger;
14
- this.recentMessagesMap = new lru_cache_1.LRUCache({
15
+ this.recentMessagesMap = new LRUCache({
15
16
  max: RECENT_MESSAGES_SIZE,
16
17
  ttl: 5 * 60 * 1000,
17
18
  ttlAutopurge: true,
@@ -24,11 +25,11 @@ class MessageRetryManager {
24
25
  }
25
26
  });
26
27
  this.messageKeyIndex = new Map();
27
- this.sessionRecreateHistory = new lru_cache_1.LRUCache({
28
+ this.sessionRecreateHistory = new LRUCache({
28
29
  ttl: RECREATE_SESSION_TIMEOUT * 2,
29
30
  ttlAutopurge: true
30
31
  });
31
- this.retryCounters = new lru_cache_1.LRUCache({
32
+ this.retryCounters = new LRUCache({
32
33
  ttl: 15 * 60 * 1000,
33
34
  ttlAutopurge: true,
34
35
  updateAgeOnGet: true
@@ -176,4 +177,3 @@ exports.MessageRetryManager = MessageRetryManager;
176
177
  //# sourceMappingURL=message-retry-manager.js.map
177
178
 
178
179
 
179
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neelegirl/baileys",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "CommonJS Neelegirl Baileys fork with preserved QR/NEELE logic and selective WhiskeySockets/Baileys compatibility updates",
5
5
  "keywords": [
6
6
  "whatsapp",
@@ -44,7 +44,7 @@
44
44
  "@adiwajshing/keyed-db": "^0.2.4",
45
45
  "@cacheable/node-cache": "^1.5.4",
46
46
  "@hapi/boom": "^9.1.3",
47
- "@neelegirl/libsignal": "^1.0.11",
47
+ "@neelegirl/libsignal": "^1.0.12",
48
48
  "async-mutex": "^0.5.0",
49
49
  "audio-decode": "^2.1.3",
50
50
  "axios": "^1.3.3",