[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to deal with source maps (was Re: Typescript definitions in binary packages)



On Thu, Aug 28, 2025 at 09:33:53PM +0200, Yadd wrote:
> On 8/28/25 19:51, Jérémy Lal wrote:
> > [...]
> >     Thanks for this analysis.  In node-htmlparser2, for example, we find
> >     files such as
> > 
> >     /usr/share/nodejs/htmlparser2/lib/Tokenizer.d.ts.map
> >     /usr/share/nodejs/htmlparser2/lib/Tokenizer.js.map
> >     /usr/share/nodejs/htmlparser2/lib/esm/Tokenizer.d.ts.map
> >     /usr/share/nodejs/htmlparser2/lib/esm/Tokenizer.js.map
> > 
> >     These refer to the sources being in ../src or ../../src respectively;
> >     these are not included in the Debian package.
> > 
> >     I don't have any view on whether we want source maps or even the
> >     sources in our packages.
> > 
> > 
> > Could anyone from the javascript team think about it ?
> 
> The upstream package is distributed as this (except that sourcemaps links
> points to raw.githubusercontent.com). This bug is fixed in 10.0.0

Thanks Yadd!

There are two other packages showing a similar behaviour:
node-domutils and node-entities.  The errors/warnings are given below
again for reference.  Are these due to similar causes?

Best wishes,

   Julian


Failed to parse source map from '/usr/share/nodejs/domutils/src/feeds.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/feeds.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/helpers.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/helpers.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/index.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/index.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/legacy.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/legacy.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/manipulation.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/manipulation.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/querying.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/querying.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/stringify.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/stringify.ts'
Failed to parse source map from '/usr/share/nodejs/domutils/src/traversal.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/domutils/src/traversal.ts'

Failed to parse source map from '/usr/share/nodejs/entities/src/decode_codepoint.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/decode_codepoint.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/decode.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/decode.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/encode.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/encode.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/escape.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/escape.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/generated/decode-data-html.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/generated/decode-data-html.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/generated/decode-data-xml.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/generated/decode-data-xml.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/generated/encode-html.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/generated/encode-html.ts'
Failed to parse source map from '/usr/share/nodejs/entities/src/index.ts' file: Error: ENOENT: no such file or directory, open '/usr/share/nodejs/entities/src/index.ts'


Reply to: