Skip to content

Add missing @octokit/request-error to package.json #605

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

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

jeffwidman
Copy link
Member

@jeffwidman jeffwidman commented Mar 21, 2025

src/main.ts includes the import:

import { RequestError } from '@octokit/request-error'

However, we weren't explicitly requiring this in package.json. It was implicitly coming in via @actions/github import, but best to be explicit about it.

Discovered via:

npm install -g npm-check
npm-check

Which reported the following error:

@octokit/request-error             😟  PKG ERR!  Not in the package.json. Found in: /src/main.test.ts, /src/main.ts

Note: There is a newer v6 version of @octokit/request-error available. However, it threw a type error due a breaking change. So for now I only bumped to the v5 version, and we can fix the upgrade later. It's a step in the right direction to at least make this import explicit.

@jeffwidman jeffwidman requested a review from a team as a code owner March 21, 2025 05:51
@jeffwidman jeffwidman force-pushed the add-missing-octokit-package-to-package.json branch from efb3d71 to f2a6022 Compare March 21, 2025 05:56
`src/main.ts` includes the import:
```javascript
import { RequestError } from '@octokit/request-error'
```

However, we weren't explicitly requiring this in `package.json`.
It was implicitly coming in via `@actions/github` import, but best
to be explicit about it.

Discovered via:
```shell
npm install -g npm-check
npm-check
```

Which reported the following error:
```
@octokit/request-error             😟  PKG ERR!  Not in the package.json. Found in: /src/main.test.ts, /src/main.ts
```

Note: There is a _much_ newer version of `@octokit/request-error` available.
However, that threw some type errors due to breaking changes.
This `2.1.0` version was already pinned as a transitive dependency
in `package-lock.json`, so I went with that for now.
@jeffwidman jeffwidman force-pushed the add-missing-octokit-package-to-package.json branch from f2a6022 to 4b5bbe2 Compare March 21, 2025 05:58
@jeffwidman jeffwidman force-pushed the add-missing-octokit-package-to-package.json branch from 3486687 to acbb0b0 Compare March 21, 2025 06:05
Comment on lines 26 to +27
"@actions/github": "^5.1.1",
"@octokit/request-error": "^5.1.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two probably will generally upgrade in lock-step since @actions/github is a hydrated wrapper around @octokit.

@jeffwidman jeffwidman merged commit af0958c into main Mar 21, 2025
8 checks passed
@jeffwidman jeffwidman deleted the add-missing-octokit-package-to-package.json branch March 21, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants