GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(libnpmpublish): add support for stageId by 43081j · Pull Request #75043 · DefinitelyTyped/DefinitelyTyped Conversation
Contributor
Adds support for the new stageId and associated When
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAdds support for the new stageId and associated `stage` option. When `stage: true`, we _always_ get a `stageId` back. Otherwise, we type it as `stageId?: string` so it can at least still be accessed if we pass a `stage: boolean` in for example.
|
There was an error while loading. Please reload this page.
|
@43081j Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75043,
"author": "43081j",
"headCommitOid": "1837a7a9ff802e7698ce148e613a6b102a126ee2",
"mergeBaseOid": "ce6d550f9ae837b90d47e86cf60228fbd86ba06a",
"lastPushDate": "2026-05-23T13:45:26.000Z",
"lastActivityDate": "2026-06-03T21:40:40.000Z",
"mergeOfferDate": "2026-06-03T17:15:52.000Z",
"mergeRequestDate": "2026-06-03T21:40:40.000Z",
"mergeRequestUser": "43081j",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "libnpmpublish",
"kind": "edit",
"files": [
{
"path": "types/libnpmpublish/index.d.ts",
"kind": "definition"
},
{
"path": "types/libnpmpublish/libnpmpublish-tests.ts",
"kind": "test"
},
{
"path": "types/libnpmpublish/package.json",
"kind": "package-meta-ok"
}
],
"owners": [
"nicolas377",
"Guy-Adler"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "jakebailey",
"date": "2026-06-03T17:15:07.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 4525539578,
"ciResult": "pass"
} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🔔 @nicolas377 @Guy-Adler — please review this PR in the next few days. Be sure to explicitly select |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| declare function publish( | ||
| manifest: PackageJson, | ||
| tarballData: Buffer, | ||
| options: Omit<PublishOptions, "stage"> & { stage: true }, | ||
| ): Promise<Response & { stageId: string }>; | ||
| declare function publish( | ||
| manifest: PackageJson, | ||
| tarballData: Buffer, | ||
| options?: PublishOptions, | ||
| ): Promise<Response & { stageId?: string }>; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is... clever; does this package actually do this elsewhere?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
tagging the stageId on? i don't think so. the publish implementation does it directly iirc
let me know if that's the part you meant
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I mean specifically the part where you are trying to get perfect types here for the output
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
well, before we didn't have any knowledge of stageId but the source library does tag it on.
so the bare minimum is Response & { stageId?: string }. But I figured if we can type it as required when we pass stage: true, it'd help us avoid a bunch of unnecessary type guards or casts.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why isn't it already an optional prop on Response? I think mainly I find the second overload to be the weird one.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
it does, doesn't it?
when stage isn't true we get Response & { stageId?: string } back, no?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No, I mean literally add to Response, so an intersection is not required for the default case
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
because its not our Response , it comes from node-fetch in this case. in the source package it comes from make-fetch-happen.
i'm not sure we should be extending that since we don't own it.
and the stageId is only set by publish - no other function.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That does seem super weird, though; do you know where they do that?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@jakebailey Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Re-ping @nicolas377, @Guy-Adler: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@jakebailey Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@43081j: Everything looks good here. I am ready to merge this PR (at 1837a7a) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@nicolas377, @Guy-Adler: you can do this too.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
ready to merge 🏃 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.