Skip to content

Koa v3 Tracker #1837

Closed
Closed

Description

@jonathanong

Starting a new tracker for v3

Milestone: https://github.com/koajs/koa/milestone/4

Other Breaking Changes:

Future:

  • Deno support
  • Bun support
  • Rewrite in TypeScript

Tests:

  • Migrate to jest
  • Properly close down server after each test run

Improved Documentation:

Activity

  1. jaydenseric commented on Aug 29, 2024

    @jaydenseric

    Regarding the goal to move to Jest; please don't. Use the native Node.js test runner! It should be more than adequate.

    You can pair it with coverage-node, a very lightweight CLI tool, to enforce 100% code coverage in tests:

    https://github.com/jaydenseric/coverage-node

  2. v1rtl commented on Aug 29, 2024

    @v1rtl

    to add, Node test runner has identical API to Jest

    for assertion, node:assert could be used

  3. benmccann commented on Aug 30, 2024

    @benmccann

    Vitest is another fairly lightweight option for jest-compatible test runner. My last experience was that Jest is terrible to use with ESM as it doesn't fully support it yet. vitest is much better in this regard.

    A rewrite might also be a nice time to take a look at including only minimal dependencies (e.g. https://npmgraph.js.org/?q=koa vs https://npmgraph.js.org/?q=polka)

  4. jonathanong commented on Aug 31, 2024

    @jonathanong
    MemberAuthor

    I just realized that I already migrated it to jest a while go haha. if anyone is interested in migrating to node's official test runner, that would be great. otherwise, I will leave it as is

  5. deleted a comment from iietmoon on Oct 20, 2024
  6. added a commit that references this issue on Oct 28, 2024
  7. pinned this issue on Feb 27, 2025
  8. titanism commented on Feb 27, 2025

    @titanism
    Contributor

    I just pinned this issue. Also I merged a core bug fix just a bit ago at #1593 which fixes #1547 – tldr; HEAD requests with http2 server instance were broken and not working.

  9. titanism commented on Feb 27, 2025

    @titanism
    Contributor

    👍 to c8 https://www.npmjs.com/package/c8 and Node's native testing
    👍 to using np for releases

  10. jonathanong commented on Apr 6, 2025

    @jonathanong
    MemberAuthor

    Just need to spend time to write a migration doc for v3 and then I am going to launch it

  11. jrnail23 commented on Apr 18, 2025

    @jrnail23

    I know this is blasphemy these days, so at the risk of sounding like a luddite, I have to beg you, PLEASE, PLEASE don't convert Koa to ESM-Only unless you'll be actively updating/patching the v2 branch for an extended period of time (like multiple years).

    Migrating existing NodeJS codebases to ESM still isn't effortless, and going to ESM-only risks leaving CJS users in a vulnerable state where they can't safely upgrade to incorporate security patches and critical bug fixes.

  12. v1rtl commented on Apr 18, 2025

    @v1rtl

    I know this is blasphemy these days, so at the risk of sounding like a luddite, I have to beg you, PLEASE, PLEASE don't convert Koa to ESM-Only unless you'll be actively updating/patching the v2 branch for an extended period of time (like multiple years).

    Migrating existing NodeJS codebases to ESM still isn't effortless, and going to ESM-only risks leaving CJS users in a vulnerable state where they can't safely upgrade to incorporate security patches and critical bug fixes.

    why would you want to migrate existing codebases to a semver incompatible version of a web framework without upgrading Node.js?

    starting version 20.x you can require(esm) so in case you're on that version, you can safely use Koa as ESM

  13. jonathanong commented on Apr 28, 2025

    @jonathanong
    MemberAuthor

    let me know if anyone contributed that I missed in the release notes https://github.com/koajs/koa/releases/tag/v3.0.0

  14. TechQuery commented on Apr 28, 2025

    @TechQuery

    let me know if anyone contributed that I missed in the release notes https://github.com/koajs/koa/releases/tag/v3.0.0

    @jonathanong I have a big thank for your hard working, but I'm worried about how many popular middlewares will be broken by this major upgrading, do we have a draft list in the latest migration guide?

  15. jonathanong commented on Apr 28, 2025

    @jonathanong
    MemberAuthor

    @TechQuery it should just be send or any middleware that serves from the filesystem due to the ENOENT removal, I will take a look later

  16. jonathanong commented on Apr 28, 2025

    @jonathanong
    MemberAuthor

    actually, send handles ENOENT itself. looks like tests are passing with koa@3 so we're good

  17. titanism commented on Apr 29, 2025

    @titanism
    Contributor
  18. added a commit that references this issue on Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions