跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[JavaScript] 淘宝 NPM 源竟然会篡改包的下载版本

发表于

淘宝源擅自把 path-to-regexp 1.8.0 版本的下载地址改成了 1.9.0 版本,导致使用了 package-lock.json, yarn.lock 的工程安装依赖失败( checksum 校验失败)。

https://i.imgur.com/kJbQ1hZ.png

好像是这里引入的: https://github.com/cnpm/bug-versions/pull/257/files

虽然是出于安全考虑,但这样篡改下载地址却影响了存量的 CICD 流程,给开发者造成不便,也破坏了与 NPM 官方源的兼容性(不能自由切换 NPM 源了)。

一直以为淘宝源是官方源的纯净代理呢,没想到竟会做这样的事,看来要慎用了。

同事说用腾讯云、华为云的 NPM 源也遇到过一些坑,看来想找个靠谱的国内 NPM 代理都不容易(前端圈这是怎么了?)。

中科大镜像站有个 NPM 源的反向代理(https://npmreg.proxy.ustclug.org),似乎是比较纯净的,准备试用下。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.