[Pkg-javascript-devel] How to ship DefinitelyTyped's type definitions?
Bastien ROUCARIES
roucaries.bastien at gmail.com
Wed May 16 16:45:22 BST 2018
On Fri, May 11, 2018 at 10:26 PM, Julien Puydt <julien.puydt at laposte.net> wrote:
> Hi,
>
> as you may know, more and more JS projects incorporate some TypeScript
> these days. This requires some definitions because the typing is
> stronger, so we have:
> (1) projects adding typing for what they provide, and that means we
> should now ship that too ;
> (2) projects depending on typing for external deps, which don't provide
> it yet.
>
> How is (2) even possible, you might ask? In typical JS-frenzy, people
> start using definitions for projects not yet providing them by using a
> repository which provides those *outside of the relevant upstream*.
>
> Here it is:
> https://github.com/DefinitelyTyped/DefinitelyTyped
> (providing more than 4000 type definitions)
>
> If you see some "@types/foo" in the depends of a JS-package, that might
> be one of those.
>
> So what can we do? I see several trails onward :
Can I suggest in all the case something pragmatic ? Could I suggest
that package providing types for node-foo should be named
nodetypes-foo (without hyphen in order to avoid conflict with node
package)
If node-foo include type it is only needed to add "Provides:
nodetypes-foo (= ${Source:Version})" in node-foo.
Can someone suggest a policy file change ?
The same tips could be used for libjs-foo lib BTW. I have done that
for node-normalize.css for instance. It avoid small package and is
ftpmaster friendly
Bastien
>
> (1) Package that as a big source package providing a single big binary
> package.
> Good: simple
> Bad: a huge dependency
>
> (2) Package that as a big source package providing thousands of binary
> packages.
> Good: no huge dependency
> Bad: huge number of binary packages for little data
>
> (3) Modify Debian packages of upstreams not providing definitions on a
> case-by-case basis, shipping them in debian/.
> Good: we ship only what we need, and when upstreams take the defs, we
> just ship what they included and drop what we added (just like
> DefinitelyTyped drops their definitions in that case)
> Bad: we drift away from upstream, and need to check for latest
> versions of those separately by hand as long as upstream doesn't bundle
> the definitions themselves.
>
> What do you think about it?
>
> Snark on #debian-js
>
> --
> Pkg-javascript-devel mailing list
> Pkg-javascript-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
More information about the Pkg-javascript-devel
mailing list