bchr02 / node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.
MIT License
52 stars 32 forks source link

Deprecation errors from GitHub #34

Closed miridius closed 2 years ago

miridius commented 4 years ago

When using this module to upload assets to GitHub releases it's showing a number of deprecation warnings:

DEPRECATED (@octokit/rest): `repos.getReleases()` is deprecated, use `repos.listReleases()`
DEPRECATED (@octokit/rest): callbacks will be removed in v16. Use async/await or Promises instead.
Stage directory path: /home/runner/work/tcn-node/tcn-node/build/stage/v0.3.0-alpha.1
Staged file node-v72-linux-x64.tar.gz found. Proceeding to upload it.
DEPRECATED (@octokit/rest): `repos.uploadAsset()` is deprecated, use `repos.uploadReleaseAsset()`
DEPRECATED (@octokit/rest): "contentType" parameter has been renamed to "headers.content-type"
DEPRECATED (@octokit/rest): "contentLength" parameter has been renamed to "headers.content-length"

I am also seeing a possibly related issue where the files sometimes fail to upload, with output like this:

(node:5231) UnhandledPromiseRejectionWarning: HttpError: request to https://uploads.github.com/repos/covid19risk/tcn-node/releases/25548194/assets?name=node-v72-linux-x64.tar.gz&access_token=*** failed, reason: getaddrinfo EAI_AGAIN uploads.github.com
    at /home/runner/work/tcn-node/tcn-node/node_modules/@octokit/rest/lib/request/request.js:105:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:5231) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5231) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
miridius commented 4 years ago

Regarding the 2nd issue: the EAI_AGAIN error is usually a DNS overloading issue, but we should ideally catch this and retry. However in any case the fact that there is an unhandled promise rejection is something we should look at fixing I think

samizdatco commented 4 years ago

Github have started sending out emails with the heading "[GitHub API] Deprecation notice for authentication via URL query parameters" every time I publish a release.

Apparently support for query-param auth is going away entirely on May 5, 2021: https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param

bchr02 commented 4 years ago

Sorry, I haven’t had too much free time recently. Any chance anyone is willing to send a pull request for correct these issues? Also, if anyone wants to help to maintain this repo please let me know.

daniellockyer commented 3 years ago

@bchr02 Hey! We're going to start using this package over at @TryGhost soon + we'd love to get maintainer access/ownership of this repo to fix it up and publish new versions. Would you still be open to this?

bchr02 commented 3 years ago

I would love to see the community continue this project, so yes I would be open to it.

daniellockyer commented 3 years ago

@bchr02 Perfect! I have accepted your GitHub invitation. Would you be able to invite daniellockyer on NPM to be able to publish?

bchr02 commented 3 years ago

done

daniellockyer commented 3 years ago

Thanks! I'll pencil in some time to check out the issues + PRs, and to fix the repository up. Feel free to send me a message if you have any thoughts 🙂

idan-at commented 2 years ago

any updates about this one? this package fails to release on node 16

daniellockyer commented 2 years ago

This should be resolved once I've merged https://github.com/bchr02/node-pre-gyp-github/pull/40 🙂

daniellockyer commented 2 years ago

Merged and published 🙂