package!: set new Node version minimum

breaking change
This commit is contained in:
Rajeh Taher
2025-03-06 04:24:04 +02:00
parent 99142aac96
commit 396297c897
2 changed files with 18 additions and 10 deletions

10
engine-requirements.js Normal file
View File

@@ -0,0 +1,10 @@
const major = parseInt(process.versions.node.split('.')[0], 10);
if (major < 20) {
console.error(
`\n❌ This package requires Node.js 20+ to run reliably.\n` +
` You are using Node.js ${process.versions.node}.\n` +
` Please upgrade to Node.js 20+ to proceed.\n`
);
process.exit(1);
}

View File

@@ -1,23 +1,17 @@
{
"name": "baileys",
"version": "6.7.16",
"description": "WhatsApp API",
"description": "A WebSockets library for interacting with WhatsApp Web",
"keywords": [
"whatsapp",
"js-whatsapp",
"whatsapp-api",
"whatsapp-web",
"whatsapp-chat",
"whatsapp-group",
"automation",
"multi-device"
"automation"
],
"homepage": "https://github.com/WhiskeySockets/Baileys",
"repository": {
"url": "git@github.com:WhiskeySockets/Baileys.git"
},
"license": "MIT",
"author": "Adhiraj Singh",
"author": "Rajeh Taher",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
@@ -38,6 +32,7 @@
"lint:fix": "yarn lint --fix",
"prepack": "tsc",
"prepare": "tsc",
"preinstall": "node ./engine-requirements.js",
"release": "release-it",
"test": "jest"
},
@@ -100,5 +95,8 @@
"optional": true
}
},
"packageManager": "yarn@1.22.19"
"packageManager": "yarn@1.22.19",
"engines": {
"node": ">=20.0.0"
}
}