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

chore: update native-abort-controller #93

Merged
merged 2 commits into from
Feb 7, 2021

Conversation

achingbrain
Copy link
Member

To avoid extending built-in classes you now need to use named exports when importing native-abort-controller.

To avoid extending built-in classes you now need to use named exports
when importing `native-abort-controller`.
achingbrain added a commit to ipfs/js-ipfs that referenced this pull request Feb 3, 2021
achingbrain added a commit that referenced this pull request Feb 3, 2021
Similar to #93, updates `native-fetch` and removes vendored filed.

I get a TS error when trying to generate types though, might have to
wait until TS 4.2:

```
> [email protected] prepare /Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils
> aegir build --no-bundle

/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:87003
                throw e;
                ^

TypeError: Cannot read property 'kind' of undefined
    at getRootDeclaration (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:12609:21)
    at Object.isCatchClauseVariableDeclarationOrBindingElement (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:10439:20)
    at getTypeOfVariableOrParameterOrPropertyWorker (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:41796:20)
    at getTypeOfVariableOrParameterOrProperty (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:41775:28)
    at getTypeOfSymbol (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:42079:24)
    at getTypeOfAlias (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:42025:23)
    at getTypeOfSymbol (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:42091:24)
    at checkIdentifier (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:53527:49)
    at checkExpressionWorker (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:59973:28)
    at checkExpression (/Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/node_modules/typescript/lib/tsc.js:59928:38)
Command failed with exit code 1: tsc --build /Users/alex/Documents/Workspaces/ipfs/js-ipfs-utils/tsconfig-types.aegir.json
```
achingbrain added a commit that referenced this pull request Feb 3, 2021
Similar to #93, updates `native-fetch` and removes vendored types.

I had to remove the exported `ResponseWithURL` class from `src/http/fetch.browser.js` otherwise it caused generating types to fail with `TypeError: Cannot read property 'kind' of undefined`.
@achingbrain achingbrain merged commit 1cdad7d into master Feb 7, 2021
@achingbrain achingbrain deleted the chore/update-native-abort-controller branch February 7, 2021 13:20
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.

2 participants