pkgsrc/lang/nodejs
adam f189f904ab nodejs: updated to 21.1.0
Version 21.1.0 (Current)

Notable Changes

Automatically detect and run ESM syntax

The new flag --experimental-detect-module can be used to automatically run ES modules when their syntax can be detected. For “ambiguous” files, which are .js or extensionless files with no package.json with a type field, Node.js will parse the file to detect ES module syntax; if found, it will run the file as an ES module, otherwise it will run the file as a CommonJS module. The same applies to string input via --eval or STDIN.

We hope to make detection enabled by default in a future version of Node.js. Detection increases startup time, so we encourage everyone — especially package authors — to add a type field to package.json, even for the default "type": "commonjs". The presence of a type field, or explicit extensions such as .mjs or .cjs, will opt out of detection.


vm: fix V8 compilation cache support for vm.Script

Previously repeated compilation of the same source code using vm.Script stopped hitting the V8 compilation cache after v16.x when support for importModuleDynamically was added to vm.Script, resulting in a performance regression that blocked users (in particular Jest users) from upgrading from v16.x.

The recent fixes landed in v21.1.0 allow the compilation cache to be hit again for vm.Script when --experimental-vm-modules is not used even in the presence of the importModuleDynamically option, so that users affected by the performance regression can now upgrade. Ongoing work is also being done to enable compilation cache support for vm.CompileFunction.
2023-11-02 13:18:15 +00:00
..
patches nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00
application.mk nodejs: fix copy-pasto in a comment 2022-05-05 13:06:50 +00:00
buildlink3.mk nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00
DESCR
distinfo nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00
Makefile nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00
Makefile.common nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00
nodeversion.mk nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00
options.mk nodejs: updated to 19.2.0 2022-12-03 17:07:13 +00:00
PLIST nodejs: updated to 21.1.0 2023-11-02 13:18:15 +00:00