matthew-andrews / isomorphic-fetch

Isomorphic WHATWG Fetch API, for Node & Browserify
MIT License
6.95k stars 289 forks source link

Upgrade node-fetch to >= 2.3.0 to fix semantic-release users that use styled-components #179

Closed kopax closed 4 years ago

kopax commented 5 years ago

Environment

We are experiencing issue on travis while using semantic-release.

This happen because of a package having being fixed node-fetch@2.3.0 for semantic-release to work and styled-components having an outdated node-fetch through isomorphic-fetch.

Users that use both semantic-release and styled-components will have issues.

Related issues:

Reproduction

https://travis-ci.org/yeutech-lab/rollup-umd-documentation/jobs/459847412

$ npm ls node-fetch
@yeutech-lab/rollup-umd-documentation@2.4.2 /home/dka/workspace/github.com/yeutech-lab/rollup-umd-documentation
├─┬ @semantic-release/github@5.2.5
│ └─┬ @octokit/rest@16.0.1
│   └── node-fetch@2.3.0 
└─┬ styled-components@4.1.1
  └─┬ css-to-react-native@2.2.2
    └─┬ fbjs@0.8.17
      └─┬ isomorphic-fetch@2.2.1
        └── node-fetch@1.7.3 

Steps to reproduce

Expected Behavior

To have node-fetch@2.3.0

Actual Behavior

Styled-components bring node-fetch@1.7.3 and breaks semantic-release.

Solution

Otto-AA commented 5 years ago

The last commit on isomorphic-fetch was more than three years ago, I fear that this won't be fixed anytime soon...

If you can switch the libraries used, I would recommend to use cross-fetch instead. It is basically the same as isomorphic-fetch, but with updated dependencies.

matthew-andrews commented 4 years ago

Hi sorry for the immense delay, I have updated to the latest versions of node-fetch and whatwg-fetch in master … planning to release as a major version once I'm happy this hasn't broken anything … … …