[Pkg-javascript-devel] autopkgtest fails on some packages
Jonas Smedegaard
jonas at jones.dk
Thu Sep 23 19:20:10 BST 2021
Quoting Pirate Praveen (2021-09-23 19:13:30)
>
>
> On വ്യാ, സെപ്റ്റം 23 2021 at 11:41:31
> രാവിലെ -0400 -0400, Nicolas Mora <nicolas at babelouest.org>
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20210923/c3b3d956/attachment.sig>
More information about the Pkg-javascript-devel
mailing list