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

Remove recompose to avoid dependency on ua-parser-js #8954

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Oct 22, 2021

The ua-parser-js npm package was recently hijacked: faisalman/ua-parser-js#536

This repository has a dependency chain involving ua-parser-js:

~/dev/apollo-client % npm ls ua-parser-js
@apollo/client@3.5.0-rc.1 /Users/ben/dev/apollo-client
└─┬ recompose@0.30.0
  └─┬ fbjs@0.8.17
    └── ua-parser-js@0.7.24

Fortunately, that's the only dependency chain, and recompose is used only in development, in one HOC test.

Since the recompose package is used in only one test, and only its withState function is needed, I took the (MIT-licensed) liberty of extracting and adapting withState.js for continued use in that test.

Comment on lines -11536 to -11544
"node_modules/ua-parser-js": {
"version": "0.7.24",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.24.tgz",
"integrity": "sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw==",
"dev": true,
"engines": {
"node": "*"
}
},
Copy link
Member Author

Choose a reason for hiding this comment

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

This removal is the primary goal of this PR.

@benjamn benjamn merged commit 215970b into main Oct 22, 2021
@benjamn benjamn deleted the remove-recompose-to-avoid-ua-parser-js branch October 22, 2021 18:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants