随着 Express.js 继续为全球的网络应用提供支持,保持一个干净、可靠且现代的代码库变得非常重要。秉持这一精神,我们进行了一些春季清理。
🌐 As Express.js continues to power web applications across the world, it’s important that we maintain a clean, reliable, and modern codebase. In that spirit, we’ve done a bit of spring cleaning.
在过去的几周里,我们评估了 Express.js 生态系统中的传统包——其中一些已经过时、无人维护,或者与现代最佳实践不一致。因此,我们已经正式弃用其中的几个包。
🌐 Over the past few weeks, we’ve evaluated legacy packages within the Express.js ecosystem — some of which have become outdated, unmaintained, or misaligned with modern best practices. As a result, we’ve officially deprecated several of them.
🚨 软件包已弃用
🌐 🚨 Packages Deprecated
以下是我们已弃用的主要软件包:
🌐 Here are the key packages we’ve deprecated:
csurf:一个长期以来难以维护的 CSRF 中间件,如今更适合通过框架或与你的架构相匹配的自定义实现来处理。connect-multiparty:一个依赖已弃用库且不太适用的多部分表单数据解析器。path-match:一个路由匹配工具,已经被更现代且有维护的替代品所取代。
这些软件包中的每一个最初都是为了解决实际问题而创建的——但时间已经过去,生态系统也在发展。
🌐 Each of these packages was originally created to solve real problems—but time has moved on, and the ecosystem has evolved.
🤔 为什么这很重要
🌐 🤔 Why This Matters
维护已弃用或不活跃的依赖会引入技术债务和安全风险。通过正式弃用这些软件包,我们:
🌐 Maintaining deprecated or inactive dependencies introduces technical debt and security risk. By formally deprecating these packages, we:
- 鼓励开发者采用维护更好、更加安全的解决方案。
- 减少关于哪些工具由 Express 积极支持的混淆。
- 将我们的努力集中在现代化核心和周边生态系统上。
🗂️ 你应该做的事情
🌐 🗂️ What You Should Do
如果你的应用依赖于这些软件包,现在是寻找替代方案的好时机。例如:
🌐 If your application depends on any of these packages, now is a great time to look for alternatives. For instance:
- 考虑在 npm 上寻找一种适合你特定需求的现代 CSRF 防护策略。
- 使用最新的多部分解析器,例如
multer。 - 将路径匹配逻辑替换为标准
path-to-regexp。
📘 接下来是什么
🌐 📘 What’s Next
我们不会就此止步。这次清理工作是一个更广泛努力的一部分,旨在简化 Express.js、为未来做准备,并澄清哪些是官方支持的,哪些不是。
🌐 We’re not stopping here. This cleanup is part of a broader effort to streamline Express.js, prepare for the future, and clarify what is and isn’t officially supported.
👉 关于这些变化的完整讨论可以在 expressjs/discussions#134 中找到。
📢 敬请关注——随着我们现代化 Express 生态系统,我们将继续发布更新和见解。
💚感谢社区一直以来的信任和支持。



