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: change dependency override #136

Merged
merged 3 commits into from
Aug 27, 2021

Conversation

oliveriosousa
Copy link
Contributor

@oliveriosousa oliveriosousa commented Jul 27, 2021

  • Change node-fetch dependency resolution

This change is needed to run the examples in the web sandboxes (like codesandbox and stackblitz)

When testing the examples using the stackblitz it throws an error:

Unable to resolve package (node-fetch npm:@achingbrain/node-fetch@^2.6.4) Please try installing a different version or range.

CC: @achingbrain @hugomrdias

@welcome
Copy link

welcome bot commented Jul 27, 2021

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

@hugomrdias hugomrdias requested a review from achingbrain July 27, 2021 15:15
@lidel lidel added the status/blocked Unable to be worked further until needs are met label Aug 13, 2021
@lidel
Copy link
Member

lidel commented Aug 13, 2021

This is blocked until Node v16 becomes LTS (~2021-10-26 according https://nodejs.org/en/about/releases/).
We need the fork until then.

@hugomrdias
Copy link
Member

This is blocked until Node v16 becomes LTS (~2021-10-26 according https://nodejs.org/en/about/releases/).
We need the fork until then.

@lidel can you explain why ? if achingbrain/native-fetch#3 gets merged it should be ok

@oliveriosousa oliveriosousa force-pushed the fix/remove-node-fetch branch from 21c7e70 to fc75db1 Compare August 16, 2021 14:58
@oliveriosousa oliveriosousa changed the title fix: remove dependency override fix: change dependency override Aug 16, 2021
src/http.js Outdated
@@ -137,6 +137,7 @@ class HTTP {
}
),
opts.timeout,
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

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

Why was this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the moment of the PR, the CI was failing due to some types.

> aegir build --no-bundle

[11:21:13] Clean ./dist [started]
[11:21:13] Clean ./dist [completed]
[11:21:13] Generate types [started]
src/http.js(140,7): error TS2345: Argument of type 'AbortController | AbortController' is not assignable to parameter of type 'AbortController'.
  Type 'import("/home/runner/work/js-ipfs-utils/js-ipfs-utils/node_modules/abort-controller/dist/abort-controller").default' is not assignable to type 'AbortController'.
    Types of property 'signal' are incompatible.
      Property 'abort' is missing in type 'import("/home/runner/work/js-ipfs-utils/js-ipfs-utils/node_modules/abort-controller/dist/abort-controller").AbortSignal' but required in type 'AbortSignal'.
[11:21:16] Generate types [failed]
[11:21:16] → Command failed with exit code 1: tsc --build /home/runner/work/js-ipfs-utils/js-ipfs-utils/tsconfig-types.aegir.json
Command failed with exit code 1: tsc --build /home/runner/work/js-ipfs-utils/js-ipfs-utils/tsconfig-types.aegir.json

This was a quick and dirty solution to fix in order to test in codesandbox but without success. I was targeting this PR instead and the sandbox did not like it either.

src/http.js Outdated Show resolved Hide resolved
@achingbrain achingbrain merged commit 7ad2f73 into ipfs:master Aug 27, 2021
@lgaroche
Copy link

Note that this change breaks environments where the npmjs registry is not available (such as corporate proxied networks). Even if a custom registry is configured, npm will try to download the dependency from npmjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants