[Pkg-javascript-devel] Typescript and Debian directories

Yadd yadd at debian.org
Wed May 5 11:11:10 BST 2021


Le 05/05/2021 à 12:07, Yadd a écrit :
> Le 05/05/2021 à 11:04, Jérémy Lal a écrit :
>> Hello, i'm all right patching typescript, but that would mean local
>> installs of typescript
>> wouldn't find the modules anyway.

Of course, but local install means a `npm install`. The problem is for
JS Team: each node-typescript reverse-dependency requires hard work to
find which module to copy or link

>> So... do you know if a local user install of typescript is going to want
>> to discover global modules ?
>>
>> If not, then it's okay to patch typescript and i think i can do it...
> 
> It just requires a debian/links in node-typescript (or in nodejs):
> 
> usr/share/nodejs usr/share/node_modules
> usr/lib/nodejs   usr/lib/node_modules
> usr/lib/${DEB_HOST_MULTIARCH}/nodejs
> usr/lib/${DEB_HOST_MULTIARCH}/node_modules
> 
>> Jérémy
>>
>>
>> Le mer. 5 mai 2021 à 09:50, Yadd <yadd at debian.org
>> <mailto:yadd at debian.org>> a écrit :
>>
>>     Hi all,
>>
>>     as you probably already know, Typescript has a poor module search
>>     support. That's why pkg-js-tools supports
>>     debian/nodejs/ext{copies,links}.
>>
>>     Symlinks (debian/nodejs/extlinks) would be the better solution, but when
>>     a linked module has to include another, Typescript can't find it because
>>     it recursively search for a node_modules directory, starting in
>>     /usr/share/nodejs/<module>. Then each module that requires another has
>>     to be copied (debian/nodejs/extcopies), and recursively all dependencies
>>     (example:
>>     https://salsa.debian.org/js-team/node-jest/-/blob/master/debian/nodejs/extcopies
>>     <https://salsa.debian.org/js-team/node-jest/-/blob/master/debian/nodejs/extcopies>).
>>
>>     I tried to patch Typescript without success.
>>
>>     We could simplify this by creating "node_modules => nodejs" symlinks in
>>     /usr/share, /usr/lib, /usr/lib/arch. Then no need to copy modules, only
>>     few of them should be declared in debian/nodejs/extlinks.
>>
>>     Is it an acceptable solution ? Where to store these symlinks, nodejs or
>>     typescript ?
>>
>>     Cheers,
>>     Yadd
>>
>>     -- 
>>     Pkg-javascript-devel mailing list
>>     Pkg-javascript-devel at alioth-lists.debian.net
>>     <mailto:Pkg-javascript-devel at alioth-lists.debian.net>
>>     https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
>>     <https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel>
>>
> 



More information about the Pkg-javascript-devel mailing list