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

fix(typescript): workaround for trouble with aggregate-error type exports (#245) #270

Merged
merged 6 commits into from
Sep 19, 2020

Conversation

gr2m
Copy link
Contributor

@gr2m gr2m commented Sep 18, 2020

resolves #245
resolves #270

thanks @andrewbranch /cc @dominguezcelada

@gr2m gr2m added Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only labels Sep 18, 2020
andrewbranch
andrewbranch previously approved these changes Sep 18, 2020
Copy link

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

You’ll want to try a pika build and check that the dist output looks like you expect, but I think this should work.

src/middleware/middleware.ts Outdated Show resolved Hide resolved
@gr2m
Copy link
Contributor Author

gr2m commented Sep 18, 2020

You’ll want to try a pika build and check that the dist output looks like you expect, but I think this should work.

I use pika-ci to generate previews of the to-be-published assets. It can be downloaded here:
https://github.pika.dev/octokit/webhooks.js/pr/270. It all looks good as far as I can tell?

@gr2m
Copy link
Contributor Author

gr2m commented Sep 18, 2020

@dominguezcelada are you happy with these changes?

@robcresswell can you please check if that resolves #245 for you? To test this PR, you can npm install https://github.pika.dev/octokit/webhooks.js/pr/270

@andrewbranch
Copy link

Tested by throwing that bundle into my node_modules. Looks good 🌟

@oscard0m
Copy link
Member

Tested in a local repo I was playing with. Running tsc succeeds now.

I created a new issue to make sure we do a followup on this (since the existing one will be closed when we merge this): #271

@@ -47,3 +46,12 @@ export interface WebhookEventHandlerError extends AggregateError<WebhookError> {
*/
errors: WebhookError[];
}

declare class AggregateError<T extends Error = Error>
Copy link
Member

@oscard0m oscard0m Sep 19, 2020

Choose a reason for hiding this comment

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

Even though is a temporary fix, we should mention and give credit to the original repo? #248 (comment) @gr2m

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oopsies sorry I missed your comment. You are right. I'll send a follow up pR

Copy link
Member

@oscard0m oscard0m left a comment

Choose a reason for hiding this comment

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

Looks good to me. Only check small comment

@gr2m gr2m merged commit d2c90ac into master Sep 19, 2020
@gr2m gr2m deleted the 245/workaround branch September 19, 2020 18:19
@github-actions
Copy link
Contributor

🎉 This PR is included in version 7.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

ankeetmaini referenced this pull request in ankeetmaini/webhooks.js Sep 21, 2020
* master:
  build(deps-dev): bump typescript from 4.0.2 to 4.0.3
  build(deps): bump debug from 4.1.1 to 4.2.0
  build(deps-dev): bump ts-jest from 26.3.0 to 26.4.0
  build(types): add credit and license information for `aggregate-error` (#272)
  fix(typescript): workaround for trouble with aggregate-error type exports (#245) (#270)
  build(deps-dev): bump @types/node from 14.10.3 to 14.11.1
  build(deps-dev): bump semantic-release from 17.1.1 to 17.1.2
  build(deps-dev): bump @types/jest from 26.0.13 to 26.0.14 (#264)
  build(deps-dev): bump @types/node from 14.10.2 to 14.10.3 (#265)
  build(deps-dev): bump @types/node from 14.10.1 to 14.10.2 (#262)
  build(deps-dev): bump prettier from 2.1.1 to 2.1.2 (#263)
  build(deps-dev): bump @types/prettier from 2.1.0 to 2.1.1
  build(deps-dev): bump @octokit/webhooks-definitions from 3.12.0 to 3.13.0
  build(deps-dev): bump @types/node from 14.10.0 to 14.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TypeScript] v7.11.2 has a hard requirement on specific TS configs
3 participants