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

refactor!: Switching from Request package to Got #5849

Closed
wants to merge 3 commits into from
Closed

refactor!: Switching from Request package to Got #5849

wants to merge 3 commits into from

Conversation

jeneser
Copy link
Contributor

@jeneser jeneser commented Sep 7, 2020

BREAKING CHANGE: replace Request package with Got

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

#5220

BREAKING CHANGE: replace Request package with Got
Copy link
Member

@sodatea sodatea left a comment

Choose a reason for hiding this comment

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

Thanks for the help! But please fix the failing tests. I think the refactored code is not working correctly.

@jeneser
Copy link
Contributor Author

jeneser commented Sep 10, 2020

Oops! There is something wrong with the Yarn. I'm trying to fix it.

@sodatea
Copy link
Member

sodatea commented Sep 14, 2020

Still failing.
I believe it's due to the usage of .json()

@jeneser
Copy link
Contributor Author

jeneser commented Sep 17, 2020

I don't think so. All test suites are passed on my machine. But, AppVeyor build failed.

FAIL packages/@vue/cli-plugin-eslint/__tests__/eslintMigrator.spec.js
RequestError: connect ECONNREFUSED 127.0.0.1:443

It looks like https-proxy-agent or agent-base break got without even using it. Maybe we need downgrading to got@9, but it would be great to upgrade.

@jeneser
Copy link
Contributor Author

jeneser commented Sep 29, 2020

> npm ls agent-base

/workspace/vue-cli
├─┬ chromedriver@84.0.1
│ └─┬ https-proxy-agent@5.0.0
│   └── agent-base@6.0.1 
├─┬ geckodriver@1.20.0
│ └─┬ https-proxy-agent@5.0.0
│   └── agent-base@6.0.1 
├─┬ lerna@3.22.1
│ └─┬ @lerna/add@3.21.0
│   └─┬ @evocateur/pacote@9.6.5
│     └─┬ make-fetch-happen@5.0.2
│       ├─┬ http-proxy-agent@2.1.0
│       │ └── agent-base@4.3.0 
│       └─┬ https-proxy-agent@2.2.4
│         └── agent-base@4.3.0  deduped
└─┬ lerna-changelog@1.0.1
  └─┬ make-fetch-happen@7.1.1
    ├─┬ http-proxy-agent@3.0.0
    │ └── agent-base@5.1.1 
    ├─┬ https-proxy-agent@4.0.0
    │ └── agent-base@5.1.1  deduped
    └─┬ socks-proxy-agent@4.0.2
      └── agent-base@4.2.1

lerna and lerna-changelog need the latest version. Specifically, make-fetch-happen and agent-base need the latest version.

@sodatea
Copy link
Member

sodatea commented Sep 29, 2020

I now think we shouldn't use got. Now that it can be interfered with by other packages in the CLI repo, it might also be affected by other global packages installed on the user's machine. We need a safer replacement.

@jeneser
Copy link
Contributor Author

jeneser commented Sep 29, 2020

You are right. The problem is not got fault. agent-base breaks got. But for now, so many packages need an upgrade to the latest version. Maybe that isn't such a great idea.

@jeneser
Copy link
Contributor Author

jeneser commented Oct 26, 2020

Superseded by #6009

@jeneser jeneser closed this Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants