Build for Node.js 19

This commit is contained in:
Alex Hultman
2022-10-18 18:03:33 +02:00
parent 4cab31e668
commit e3c21bca5b
2 changed files with 3 additions and 6 deletions

View File

@@ -36,9 +36,9 @@ struct node_version {
char *name;
char *abi;
} versions[] = {
{"v14.0.0", "83"},
{"v16.0.0", "93"},
{"v18.0.0", "108"}
{"v18.0.0", "108"},
{"v19.0.0", "111"}
};
/* Downloads headers, creates folders */

View File

@@ -16,12 +16,9 @@
*/
module.exports = (() => {
if (process.versions.modules == 83) {
throw new Error("Your version of Node.js is blacklisted due to gigantic performance regressions. uWS.js will not load.");
}
try {
return require('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node');
} catch (e) {
throw new Error('This version of uWS.js supports only Node.js 14, 16 and 18 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
}
})();
})();