react-native-polyfill-globals icon indicating copy to clipboard operation
react-native-polyfill-globals copied to clipboard

Incorrect peer dependency

Open david-gettins opened this issue 2 years ago • 7 comments

The peer dependency web-streams-polyfill should be <4. In web-streams-polyfill@>=4 the import of web-streams-polyfill/ponyfill/es6 fails as the JS files have been renamed.

See the changelog for more info.

david-gettins avatar Mar 21 '24 13:03 david-gettins

Alternatively you could update it to work with v4 and set the peer dependency to >=4.

david-gettins avatar Mar 21 '24 13:03 david-gettins

On investigation, due to mocking in the tests, you would not see this issue...

jest.mock('web-streams-polyfill/ponyfill/es6', () => ({
    ReadableStream: () => 'ReadableStream',
}), { virtual: true });

david-gettins avatar Mar 21 '24 13:03 david-gettins

I've submitted a PR to help get this moving, #7.

david-gettins avatar Mar 21 '24 14:03 david-gettins

I've submitted a PR to help get this moving, #7.

I would love if they could get this updated??

Did you happen to find another solution?

makeiteasierapps avatar Apr 29 '24 04:04 makeiteasierapps

@makeiteasierapps

Installing web-stream-polyfill at v3 ensures you don't end up with v4. It would be great if the author merged the PR to prevent mistakenly using v4.

david-gettins avatar May 04 '24 08:05 david-gettins

Please fix, thanks!

jasonmcaffee avatar Jun 01 '24 21:06 jasonmcaffee