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

Request Package is required for auto-updates, request is now deprecated #168

Open
Portur opened this issue Mar 12, 2021 · 2 comments
Open

Comments

@Portur
Copy link

Portur commented Mar 12, 2021

Hi,

This module uses request to auto update, however the package is now deprecated.

The solution would be to use axios

Axios has similar syntax and uses native promises.

eg.

axios( 'url', { param_one : 1, param2 : true } )
    .then( result )
    .catch( e )
@kingyue737
Copy link

I made a fork https://github.com/kingyue737/useragent/commits/master to replace request with axios as NPM WARN is really annoying. Also update the outdated regexp list.
You can override the original dependency if you are using pnpm:

// package.json
{
  "pnpm": {
    "overrides": {
      "useragent": "npm:@kingyue/useragent@^2.4.0"
    }
  }
}

@reorx
Copy link

reorx commented Mar 29, 2023

@kingyue737 the npm warn disappears, thanks for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants