-
Notifications
You must be signed in to change notification settings - Fork 205
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
fix(@octokit/request-error) Fixes depreciation error when accessing error.headers #2064
fix(@octokit/request-error) Fixes depreciation error when accessing error.headers #2064
Conversation
… modifies error headers accordingly
Any chance of getting the above PR merged in? |
+1 on getting this PR merged sometime soon |
Can you fix lint and update the PR? |
Codecov Report
@@ Coverage Diff @@
## main #2064 +/- ##
==========================================
- Coverage 80.19% 80.17% -0.02%
==========================================
Files 66 66
Lines 5413 5413
Branches 1263 1263
==========================================
- Hits 4341 4340 -1
- Misses 709 710 +1
Partials 363 363
Continue to review full report at Codecov.
|
Any update? |
I'm not sure how to get past this Codecov check. There's no longer any change to the |
🚀 PR was released in |
Note : I don't think that has been addressed as I am still seeing it in 10.36.5. Is it possible to re-open the issue ? The current warning is identical to the warning reported above. % yarn --silent auto version
Deprecation: [@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.
at RequestError.get (/Users/nicolasphilippe/Mperativ/GitHub/auto/node_modules/@octokit/core/node_modules/@octokit/request/node_modules/@octokit/request-error/dist-src/index.js:50:32)
at /Users/nicolasphilippe/Mperativ/GitHub/auto/packages/core/src/git.ts:171:24
at /Users/nicolasphilippe/Mperativ/GitHub/auto/node_modules/before-after-hook/lib/add.js:37:18
at Git.getUserByUsername (/Users/nicolasphilippe/Mperativ/GitHub/auto/packages/core/src/git.ts:480:20)
minor % yarn list --pattern auto
yarn list v1.22.18
warning package.json: No license field
warning No license field
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
├─ @auto-it/[email protected]
└─ [email protected]
✨ Done in 0.25s. The problem seems to come from this statement in git.ts, since commenting that out will remove the warning : this.github.hook.error("request", (error) => {
if (error) {
// narrow down the type
if ("headers" in error && error.request.headers.authorization) {
delete error.request.headers.authorization;
delete error.headers.authorization; <-------- error.headers deprecated
}
} The PR doesn't seem to modify this file at all. I am not totally sure what the best course of action is here so please @hipstersmoothie advise. |
What Changed
Updated @octokit/plugin-enterprise-compatibility to version 1.3.0 and modified the way error headers are accessed accordingly.
Why
A depreciation warning was being thrown by
@octokit/request-error
.Issue 2049
Todo:
Change Type
Indicate the type of change your pull request is:
documentation
patch
minor
major
🐤 Download canary assets:
auto-linux--canary.2064.25372.gz
auto-macos--canary.2064.25372.gz
auto-win.exe--canary.2064.25372.gz
📦 Published PR as canary version:
under canary scope @[email protected]
✨ Test out this PR locally via: