Vue-cli: Migrate away from request package

Created on 26 Feb 2020  路  6Comments  路  Source: vuejs/vue-cli

Version

4.2.2

Steps to reproduce

warning @vue/cli-plugin-babel > @vue/cli-shared-utils > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

What is expected?

No deprecation notices in the cli

What is actually happening?

request is being used in @vue/cli-shared-utils but is now deprecated

contribution welcome good first issue has PR

Most helpful comment

I would recommend we switch to got as it is under very active development. It does have a nice comparison of alternatives if somebody else wants to propose a different option: https://github.com/sindresorhus/got#faq

All 6 comments

Aha! I was also thinking about this just now.
Would you like to work on a PR for it?

There may be some drop-in replacements for this package. And we can replace request-promise-native with util.promisify.

I would recommend we switch to got as it is under very active development. It does have a nice comparison of alternatives if somebody else wants to propose a different option: https://github.com/sindresorhus/got#faq

We can switch to it in the next major version. But for now, we need a drop-in replacement. Because there are many CLI plugins depending on @vue/cli-shared-utils and I'm not sure how many of them use the request functionality in a non-trivial way.

@sodatea No worries I didn't know there was a need to do it before the next major. I don't know of any drop in options however.

We can switch to it in the next major version. But for now, we need a drop-in replacement.

@sodatea Yes! got is a great choice. however, if we replace it directly, not sure what side effects. PR #5572 just replace request-promise-native with util.promisify.

I noticed a plan in project v5, i'm happy to work for it. any suggestions?

Was this page helpful?
0 / 5 - 0 ratings