* feat: implement state machine for chat synchronization and buffer management
* test: Add Jest configuration and tests for connection deadlock handling
- Created a Jest configuration file to set up testing environment.
- Implemented utility functions for creating isolated authentication sessions and mocking WebSocket connections.
- Added a test case to ensure that the connection does not deadlock when history sync is disabled, verifying the correct handling of message events.
* feat: add GitHub Actions workflow for running tests
* chore: sort import lint
* fix: implement timeout handling for AwaitingInitialSync state in chat socket, maybe fix memory leak
* feat: enhance chat synchronization by refining AwaitingInitialSync handling and adding history sync checks
**Fix Windows path issue in `build` script**
**Issue**
The `build` script in `package.json` was written as:
```json
"build": "tsc -P tsconfig.build.json && tsc-esm-fix --tsconfig='tsconfig.build.json' --ext='.js'"
```
This works on Unix-based systems (macOS/Linux) but **breaks on Windows**, throwing an error:
```
Error: ENOENT: no such file or directory, open 'C:\path\to\project\'tsconfig.build.json''
```
> The single quotes `'` are treated **literally** on Windows CMD/PowerShell, resulting in a malformed path (e.g., `'tsconfig.build.json'` instead of `tsconfig.build.json`).
**Fixes**
Updated the script to remove single quotes around the `--tsconfig` and `--ext` arguments:
```json
"build": "tsc -P tsconfig.build.json && tsc-esm-fix --tsconfig=tsconfig.build.json --ext=.js"
```
**Result**
```
PS C:\Users\Astro\Documents\GitHub\Baileys> npm run build
> baileys@6.7.18 build
> tsc -P tsconfig.build.json && tsc-esm-fix --tsconfig=tsconfig.build.json --ext=.js
PS C:\Users\Astro\Documents\GitHub\Baileys>
```
* replace assert with
* assert with
* more ts way for version
* fix: remove JSON import assert syntax for Node.js compatibility
- Replace JSON imports with generated .js imports
- Fixes compatibility between Node.js versions (assert vs with syntax)
- Maintains same functionality while avoiding syntax issues
* feat: implement basic newsletter functionality with socket integration and event handling
* feat: enhance media handling for newsletters with raw media upload support
* feat: working updatePicture, removePicure, adminCount, mute, Unmute
* fix: fetchMessages
* chore: cleanup
* fix: update newsletter metadata path and query ID for consistency. newsletterMetadata works now
* chore: enhance newsletter metadata parsing and error handling
* fix: correct DELETE QueryId value in Newsletter.ts
* chore: split mex stuffs to own file
* chore: remove as any
* Add support for custom profile picture dimensions
The updateProfilePicture and generateProfilePicture functions now accept an optional dimensions parameter, allowing custom width and height for profile pictures. This provides more flexibility for image resizing beyond the default 640x640 size.
* minor corrections
Replaces 'w' and 'h' with 'width' and 'height' in profile picture related functions for improved clarity and consistency.
* fix lint
* chore: change version web
* fix: enhance pairing response validation and adjust HMAC handling for hosted devices
* refactor: remove unused 'from' attribute in chatstate message
* feat: update chatstate message to conditionally set 'from' attribute based on server type
When extracting duration from an audio file provided as a file path,
use music-metadata's parseFile method instead of manually creating a
read stream and using parseStream.
parseFile utilizes random access, which can significantly improve
performance over streaming in many cases. However, actual speed gains
depend on the file format and the structure of tag headers.
Co-authored-by: Borewit <Borewit@users.noreply.github.com>