Le Dimanche, Novembre 20, 2022 22:38 CET, Israel Galadima <izzygalad...@gmail.com> a écrit: > Hello Yadd, > > I've dropped the chalk component. > > However, I noticed that when I ran node -p require('chalk') in the package > folder without the chalk component I got this chalk object > > [Function: chalk] createChalk { level: 2 } > > And when I ran node -p require('chalk') in the package folder with the > chalk component I got this chalk object > > [Function (anonymous)] Chalk { > constructor: [Function (anonymous)], > Instance: [class ChalkClass], > supportsColor: { level: 2, hasBasic: true, has256: true, has16m: false > }, > stderr: [Function (anonymous)] Chalk { > constructor: [Function(anonymous)], > Instance: [class ChalkClass], > supportsColor: { level: 2, hasBasic: true, has256: true, has16m: > false } > } > } > > Both requires don't return the same chalk object. > > And there are files in the package that use properties from the chalk > object returned with the chalk component. An example is in src/instances.ts > > const colors = new chalk.Instance({ level }); > > Instance is only a property in the chalk object when we use the chalk > component. It will be unavailable if we choose to exclude the chalk > component.
Yes, Debian has chalk 5 while this package requires chalk 4 and API are different. However, this works in many cases (Debian package builds a commonjs file using rollup because chalk 5 is ES only) I pushed your package to NEW queue. Thanks for your work ! Cheers, Yadd -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel