Skip to content

Latest change from 1.1.1 breaks Koa 2.x completely. #45

@rochdev

Description

@rochdev

More specifically, this change: 5477ff1

Reproduction code:

package.json

{
  "dependencies": {
    "koa": "^2.16.2"
  }
}

index.js

'use strict'

const Koa = require('koa')

const app = new Koa()

app.use(function * handle (next) {
  this.body = 'test'
  yield next
})

app.listen(3000)

This results in a 404.

To fix it, we can add the following to package.json:

{
  "resolutions": {
    "is-generator-function": "1.1.0"
  }
}

Then we get a 200 with the test output.

cc @ljharb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions