
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
koa2-converter-middleware
Advanced tools
一个将express中间件转换为koa2中间件的小工具,可用于webpack-dev-middleware,对应的express版本为4.17.X,koa的版本号为2.x
一个将express中间件转换为koa2中间件的小工具,可用于webpack-dev-middleware,对应的express版本为4.17.X,koa的版本号为2.x
First thing's first, install the module:
npm install koa2-converter-middleware --save-dev
Note: We do not recommend installing this module globally.
const app = require('koa')();
const converter = require("koa2-converter-middleware");
//此处为引用的express中间件,测试的webpack-dev-middleware版本为4.1.0
const middleware = require('webpack-dev-middleware');
const compiler = webpack({
// webpack options
});
app.use(converter(middleware(compiler, {
// webpack-dev-middleware options
})));
app.listen(3000, () => console.log('Example app listening on port 3000!'));
在开发中遇到中间件的问题,在网上找的npm包过于古老或无人维护,所以自己发了个包。这里只是将express中间件包了一层,使其可以用在koa2上面,目前只在webpack-dev-middleware上试过。有问题请提issue。
FAQs
一个将express中间件转换为koa2中间件的小工具,可用于webpack-dev-middleware,对应的express版本为4.17.X,koa的版本号为2.x
The npm package koa2-converter-middleware receives a total of 3 weekly downloads. As such, koa2-converter-middleware popularity was classified as not popular.
We found that koa2-converter-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.