mount icon indicating copy to clipboard operation
mount copied to clipboard

Mount other Koa applications or middleware to a given pathname

Results 30 mount issues
Sort by recently updated
recently updated
newest added

Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.32.0. Release notes Sourced from eslint's releases. v8.32.0 Features fc20f24 feat: add suggestions for redundant wrapping in prefer-regex-literals (#16658) (YeonJuan) Bug Fixes b4f8329 fix: ignore...

dependencies

Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.2 to 10.2.0. Release notes Sourced from mocha's releases. v10.2.0 10.2.0 / 2022-12-11 :tada: Enhancements #4945: API: add possibility to decorate ESM name before import (@​j0tunn) :bug:...

dependencies

Bumps [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise) from 3.8.0 to 6.1.1. Release notes Sourced from eslint-plugin-promise's releases. v6.1.1 6.1.1 (2022-10-19) Bug Fixes no-multiple-resolved: false positives when the last expression in a try block is a...

dependencies

If the path is not restored on throw, then the upstream middlewares work with a wrong path. This will make metrics and logging etc. to show a wrong path for...

Bumps [eslint-config-standard](https://github.com/standard/eslint-config-standard) from 7.1.0 to 16.0.3. Commits 2cfcbfd 16.0.3 8fdbb45 fix: allow eslint-plugin-promise v5 as peer dependency (#186) 8c5203f 16.0.2 25a0d26 Relax rule: Enforce default parameters to be last (default-param-last)...

dependencies

It's fairly common to throw objects inherited from Error, such as this: ``` class HttpError extends Error { constructor(public status: number, message?: string) { super(message); this.name = 'HttpError'; Error.captureStackTrace(this, HttpError)...

it causes more problems than it solves and is a smell.

help wanted

Example: ``` const mount = require('koa-mount'); const Koa = require('koa'); const a = new Koa(); a.context.test = "hallo"; a.use(async function (ctx, next){ ctx.body = "test:" + ctx.test; return next(); });...

``` js app.use(mount('/:id(\d+)', fn)) ``` interested? path-to-regex does prefix routing. should be backwards compatible. not sure how i want to handle keys though. maybe `(next, keys...)`