Closed nichtich closed 4 years ago
Hey, thanks for bringing this up. I understand the idea, however i don't believe this is a good idea for a couple of reasons.
The toolinfo.json
format is based on existing formats like the ones you mention, however, those formats were intended for a developer audience. The audience for toolinfo.json
is broader, it also includes non-technical users. The text for a description
-like field might be completely different for those two audiences.
Every programming language has a different format for packaging, sometimes even multiple ones. Converting those formats 'cleverly' might cause bugs and will introduce extra complexity in the code. Note that some formats, like Pythons setup.py
are far more complex to parse than simple JSON files.
However, there's nothing from stopping you to include the default toolinfo.json
fields in your package.json
and pointing the crawler to that file (if it is hosted over http). The filename is just a convention, the crawler will take any random URL as long as it is valid JSON and contains the necessary fields.
Developers are lazy and try to avoid duplication. Why not allow to point to existing software metadata files to remove the need to create another metadata set that may get out of sync with the primary file?
package.json
(npmjs) fieldsname
title
field. Usename
and remove the optional scope (eveything up to/
)description
homepage
(same asurl
intoolinfo.json
)keywords
(as array of strings instead of comma-separated list)author
with subfieldname
mapped totoolinfo.json
'sauthor
fieldrepository
with subfieldurl
mapped totoolinfo.json
'srepository
field (it's also possible to specify repository via abbreviated string but this is bad practice)composer.json
has almost same structure (some fields are array instead of object)