Closed jamietre closed 9 years ago
Since the maintainers
field is created and maintained by the registry, defaulting its value on the client side is misleading at best and could inadvertently cause package metadata corruption at worst. It's a part of the contract with the server that existing packages will have that field set, so my inclination is to treat this as a bug in sinopia
, and not the client.
Looked at sinopia a bit - there are definitely some issues with concurrency (that is, no resource locking during package creation process) so seems likely a problem at that end. Thanks for the feedback.
When under load (generating & publishing hundreds of modules with concurrency, against Sinopia)
npm.publish
can crash, perhaps when trying to read a module before it's been published completely.The error is here,
root.maintainers
is undefined:It seems like it could be trivially fixed..
... and it definitely solves my problem, however, I don't know if this is indicative of some other problem, or perhaps even an issue with Sinopia. Without understanding the code base too much, though, it looks like there could be legitimate scenarios where
root.maintainers
is not defined.If there's seems to be a reason why
root.maintainers
isn't checked here I can try to create a reproducible scenario.