node-modules / urllib

Request HTTP(s) URLs in a complex world.
MIT License
726 stars 117 forks source link

Remove utility lib #381

Closed TommyDew42 closed 2 years ago

TommyDew42 commented 2 years ago

What this PR is for?

Remove utility lib from dependencies. Requested by issue 362.

How the changes are tested?

Unit tests.

TommyDew42 commented 2 years ago

@fengmk2 @atian25

1. build failure in node versions 8 & 12

'fs/promises' is only available for node version >= 14. We either remove fs/promises or remove tests running on version 8 & 12.

2. tests failing in proxy.test.js (node versions 14 & 16)

It seems to me https://registry.npm.taobao.org response has been changed since the time we wrote proxy.test.js.

Going to https://registry.npm.taobao.org would redirect (302) us to https://registry.npmmirror.com/ Going to (http) http://registry.npmmirror.com/pedding/1.0.0 also redirect us to (https) https://registry.npmmirror.com/pedding/1.0.0

I suggest changing https://registry.npm.taobao.org to https://registry.npmmirror.com. It should solve test should proxy https work but it ended up with a new error: Screenshot 2022-06-08 at 11 03 32 PM

Would love to have your ideas how we should solve the errors!

fengmk2 commented 2 years ago

https://github.com/node-modules/urllib/pull/382

TommyDew42 commented 2 years ago

@fengmk2 我刚发现原来我错过了公吿,我们会有一个重构

一个小建议,可能下次计划了重构,可以在 issue 提醒其他开源供献者,先不要提PR了,让大家能放时间在其他开源项目。