Quoting Pirate Praveen (2021-09-23 19:13:30) > > > On വ്യാ, സെപ്റ്റം 23 2021 at 11:41:31 > രാവിലെ -0400 -0400, Nicolas Mora <[email protected]> > wrote: > > What is the issue when a package has "type: module"? > > node-i18next-http-backend has it Is it a concern somehow? > > That indicates it is an ES module and only newer versions of nodejs > has support for it. I think nodejs 14 in experimental supports it, so > it may be fine to upload to experimental.
More detailed, ES modules was experimentally supported since Node.js v8.5, and since v14 it is considered stable. A good thorough explanation of using a mixture of old-style CommonJS and new-style ES modules: https://medium.com/@giltayar/native-es-modules-in-nodejs-status-and-future-directions-part-i-ee5ea3001f71 A nice relatively short post about migrating a project from CJS to ESM (from a fan of mine): https://ar.al/2021/01/27/commonjs-to-esm-in-node.js/ ES modules is a JavaScript language feature introduced with ES6 a.k.a. ES2015. NodeJS was invented before ES6 and have used another less efficient modularizing method called CommonJS (or CJS). https://en.wikipedia.org/wiki/ECMAScript#ES2015 - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature
-- Pkg-javascript-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
