@neelegirl/baileys
v2.2.0
Published
Conservative Neelegirl-maintained CommonJS WhatsApp Web client based on WhiskeySockets/Baileys with preserved QR, NEELE message IDs and device/LID handling.
Maintainers
Readme
@neelegirl/baileys
Conservative Neelegirl-maintained CommonJS WhatsApp Web client based on WhiskeySockets/Baileys, prepared for local use and publish review without removing project-specific behavior.
Reference Status
- Public reference checked on 2026-03-20 against
WhiskeySockets/Baileysmaster - Reference HEAD:
d0779026958ca607e4efd4abef8ba89d581e7027 - Public upstream package version at that snapshot:
7.0.0-rc.9
This package is not a blind mirror of upstream. It intentionally keeps Neelegirl-specific runtime behavior and CommonJS packaging where that is required for compatibility with the local stack.
What Was Explicitly Preserved
- QR code flow and terminal QR handling
NEELEmessage-ID special handling- Neelegirl-specific device and message labeling behavior
- Existing WhatsApp Web focused socket defaults and event flow
- Legacy auth helpers already shipped in this package:
useMultiFileAuthState,useSingleFileAuthState,useMongoFileAuthState - Existing store helpers already shipped in this package:
makeInMemoryStore,makeCacheManagerStore
What Was Updated Conservatively In 2.2.0
- Fixed WA Web version fetching so
fetchLatestWaWebVersion()can parsesw.jscorrectly - Preserved the
NEELEmessage-ID path while correcting helper edge cases - Forwarded alternative addressing fields more cleanly in decoded message keys:
remoteJidAlt,participantAlt,addressingMode - Hardened LID migration calls so custom repositories do not fail noisily
- Cleaned publish metadata:
recursive
files, explicitexports, corrected package description - Rewrote the README to match the code that is actually present
What Was Not Adopted From Upstream
- No full ESM-only migration
- No Node 20 only engine jump
- No blind replacement of Neelegirl QR, ID, logging or device logic
- No forced adoption of every new upstream internal module
Installation
npm install @neelegirl/baileysQuick Start
const {
default: makeWASocket,
Browsers,
DisconnectReason,
fetchLatestBaileysVersion,
useMultiFileAuthState
} = require('@neelegirl/baileys')
const { Boom } = require('@hapi/boom')
async function start() {
const { state, saveCreds } = await useMultiFileAuthState('./auth_info')
const { version } = await fetchLatestBaileysVersion()
const sock = makeWASocket({
version,
auth: state,
printQRInTerminal: true,
browser: Browsers.ubuntu('Chrome')
})
sock.ev.on('creds.update', saveCreds)
sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
if (connection === 'close') {
const shouldReconnect =
(lastDisconnect?.error instanceof Boom
? lastDisconnect.error.output?.statusCode
: undefined) !== DisconnectReason.loggedOut
if (shouldReconnect) {
start().catch(console.error)
}
return
}
if (connection === 'open') {
console.log('WhatsApp Web connection opened')
}
})
}
start().catch(console.error)Pairing And QR Notes
printQRInTerminal: truekeeps the QR flow activerequestPairingCode(phoneNumber, customCode?)is available on the socket- This package keeps the existing Neelegirl QR and pairing behavior instead of replacing it with upstream packaging changes
Addressing And Device Notes
The package keeps Neelegirl-specific message and device handling and now forwards the additional addressing fields more consistently:
key.remoteJidkey.remoteJidAltkey.participantkey.participantAltkey.addressingMode
This is relevant for PN/LID mixed environments, Web-specific event handling and group/member tagging behavior.
Exports Available In This Package
- Root entry:
require('@neelegirl/baileys') - Compatibility root subpath:
require('@neelegirl/baileys/lib') - WAProto subpath:
require('@neelegirl/baileys/WAProto')
Primary runtime exports include:
makeWASocketprotoBrowsersfetchLatestBaileysVersionfetchLatestWaWebVersionuseMultiFileAuthStateuseSingleFileAuthStateuseMongoFileAuthStatemakeInMemoryStoremakeCacheManagerStore
Requirements
- Node.js
>=16.0.0 - A WhatsApp account that is allowed to link a Web client
Limits And Honesty Notes
- This package does not claim to be a 1:1 upstream 7.x layout
- This package does not bundle every new upstream internal module
- This README does not claim unsupported helpers such as
createSmartMessageQueue()
License
MIT
