Skip to content
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

7.11.1 introduces typescript compile error with aggregate-error #235

Closed
AArnott opened this issue Aug 25, 2020 · 3 comments · Fixed by #236
Closed

7.11.1 introduces typescript compile error with aggregate-error #235

AArnott opened this issue Aug 25, 2020 · 3 comments · Fixed by #236

Comments

@AArnott
Copy link
Contributor

AArnott commented Aug 25, 2020

#183 introduced a typescript compile break when it added a use of AggregateError<T> while still referencing aggregate-error ^3.0.1. 3.0.1 does not define a generic AggregateError<T> type, which leads octokit 7.11.1 consumers to encounter this typescript compiler error:

$ tsc
node_modules/@octokit/webhooks/dist-types/types.d.ts:31:51 - error TS2315: Type 'AggregateError' is not generic.

31 export interface WebhookEventHandlerError extends AggregateError<WebhookError> {
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.

Please update project.json to depend on aggregate-error ^3.1.0 to fix the break and release a new npm package.

AArnott added a commit to AArnott/webhooks.js that referenced this issue Aug 25, 2020
This was already encoded in the package-lock.json, but since package.json is the only one that gets published to consumers, it's important for this version update to be expressed in package.json since in fact 3.0.1 leads to a typescript compile error.

Fixes octokit#235
@oscard0m
Copy link
Member

oscard0m commented Aug 25, 2020

Hi @AArnott, thanks for your opened issue. I just run an npm upgrade @octokit/webhooks in my local machine and my package-lock.json was upgraded with latest aggregate-error version (3.1.0). As far as I understand, since @octokit/webhooks requires aggregate-error version ^3.0.1 it should try to install the latest satisfying the semver notation.

  • Could you try running a manual npm upgrade @octokit/webhooks and check if aggregate-error version gets updated in package-lock.json?
  • Could be related to a configuration or a bug on dependabot? (sounds strange since this is something exhaustively used across the community)

Thanks once again for your opened issue :)

@oscard0m
Copy link
Member

Hi @AArnott, thanks for your opened issue. I just run an npm upgrade @octokit/webhooks in my local machine and my package-lock.json was upgraded with latest aggregate-error version (3.1.0). As far as I understand, since @octokit/webhooks requires aggregate-error version ^3.0.1 it should try to install the latest satisfying the semver notation.

  • Could you try running a manual npm upgrade @octokit/webhooks and check if aggregate-error version gets updated in package-lock.json?
  • Could be related to a configuration or a bug on dependabot? (sounds strange since this is something exhaustively used across the community)

Thanks once again for your opened issue :)

@AArnott I've been able to reproduce the issue. Forcing [email protected] in package-lock.json (npm i [email protected]) and later running npm upgrade @octokit/webhooks updates to 7.1.1 but does not upgrade aggreggate-error package to 3.1.0, you are right

AArnott added a commit to AArnott/webhooks.js that referenced this issue Aug 25, 2020
This was already encoded in the package-lock.json, but since package.json is the only one that gets published to consumers, it's important for this version update to be expressed in package.json since in fact 3.0.1 leads to a typescript compile error.

Fixes octokit#235
@gr2m gr2m closed this as completed in #236 Aug 25, 2020
gr2m pushed a commit that referenced this issue Aug 25, 2020
This was already encoded in the package-lock.json, but since package.json is the only one that gets published to consumers, it's important for this version update to be expressed in package.json since in fact 3.0.1 leads to a typescript compile error.

Fixes #235
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 7.11.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 a pull request may close this issue.

2 participants