-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose provenance transparency url #6428
feat: expose provenance transparency url #6428
Conversation
196ada5
to
76dc9c3
Compare
I think attaching the metadata to the response object is the cleanest way to get that information back to the consumer. Good choice. The non-409 retry block needs the same logic. |
Thanks @wraithgar, applied that change |
Co-authored-by: Gar <[email protected]>
@wraithgar Thank you! |
No, thank you! This'll go out w/ the next cli release (currently scheduled for May 17) |
@JamesHenry correct me if I'm wrong but I think this change was never applied to Lerna itself, right? I assume you were waiting for an official |
I was able to add support for provenance in
lerna
yesterday (now available in v6.6.2) butlibnpmpublish
currently only emits a log with the transparency log URL, it does not expose it as data for us to use.This is a particularly a problem for lerna, because we often deal with publishing many packages concurrently. These publish requests are kicked off eagerly in parallel, and so it is currently not possible to reconcile the logs to their originating package.
The presence of this URL data would allow me to easily differentiate between packages which were published with provenance and those which weren't, as well as recreate the log on the lerna side.
For now the best I can do via log interception is gather up the unique URLs and print them at the very end:
I have gone for a rather rudimentary "bolt it on the npmFetch response" approach here, but it would definitely get me what I need. Let me know if you want to rename the property or apply it within some other existing structure on the response in some way.
References