[Pkg-javascript-devel] Bug#1010602: Bug#1010602: Bug#1010602: pkg-js-tools should run require test when node#exports#require is specified in package.json

Pirate Praveen praveen at onenetbeyond.org
Thu May 5 15:21:16 BST 2022



On വ്യാ, മേയ് 5 2022 at 03:54:04 വൈകു +0200 
+0200, Yadd <yadd at debian.org> wrote:
> On 05/05/2022 15:49, Pirate Praveen wrote:
>> 
>> 
>> On വ്യാ, മേയ് 5 2022 at 03:46:30 വൈകു +0200 
>> +0200, Yadd <yadd at debian.org> wrote:
>>> On 05/05/2022 11:53, Pirate Praveen wrote:
>>>> Package: pkg-js-tools
>>>> Version: 0.14.19
>>>> 
>>>> An example is istextorbinary module it has both esm and cjs 
>>>> versions and so require test should not be skipped even though 
>>>> type: module is present.
>>>> 
>>>>   "type": "module",
>>>>   "main": "edition-es2019/index.js",
>>>>   "exports": {
>>>>     "node": {
>>>>       "import": "./edition-es2019-esm/index.js",
>>>>       "require": "./edition-es2019/index.js"
>>>>     },
>>> 
>>> Hi,
>>> 
>>> could you give me the repository link ?
>> 
>> This is a new package and I need some more work before I can push 
>> it. For now you can just try with npm2deb create istextorbinary I 
>> think.
> 
> Could you give me the link to a complete "exports" syntax ? It seems 
> there are many ways to declare CJS files
> 

This is the official documentation for conditional exports syntax

https://nodejs.org/api/packages.html#conditional-exports
> 



More information about the Pkg-javascript-devel mailing list