Express.js 5.0 released after long delay, though not yet default as project appeals for contributors

Express.js 5.0 released after long delay, though not yet default as project appeals for contributors
delayed

The Express.js team has released version 5.0.0, the first major version release since 2014, though it is not yet the default, and the project is asking for more contributors to help with “docs and the rest of the ecosystem dependencies” before designating version 5 as a long term support (LTS) release.

Express.js is an open source web application framework for Node.js, admired for its simplicity and performance. According to the 2024 StackOverflow developer survey of the most popular web Frameworks and technologies, Express is third after React and Next.js as a web framework. Node.js and jQuery come above it, but these are not frameworks in the same way.

New features in version 5, which now requires Node.js 18 or higher, include new path route matching syntax which give more flexibility to how a path string is mapped to the matching code running on the server. All matching group expressions now have to be in regular expression syntax, and new ? * and + parameter modifiers have been added. While welcome, this will be a breaking change for some Express.js 4 applications, so could not be implemented without the major version bump. 

A StackOverflow chart shows the popularity of Express, even versus other frameworks that enjoy much higher levels of investment

Another key change is that if a promise (an asynchronous function) is rejected, it forwards an error to the Express middleware and does not cause the application to crash.

Third, the built-in app.router object, which was removed for Express.js 4, has returned for version 5.

Express.js is an At-Large project of the OpenJS Foundation but funding and shortage of contributors is an issue. This is a reason for the long delay in the release of version 5.0. In January 2023 a developer said that “I fear that express is not going to release v5. More than that, it seems like it’s on maintenance mode and on its way to becoming abandonware” – though they added it is “absolutely era defining software.” Technical Committee (TC) member Doug Wilson replied with reassurance and said that “Express 5 is pretty much completed” though in fact 18 months were to pass before this month’s release.

If the code is done, why is it on the npm repository as express@next rather than express@latest? “We have not set a date yet. Largely it depends on how quickly we can get the docs and the rest of the ecosystem dependencies (like DT [DefinitelyTyped] for example) updated,” said Wes Todd, another TC member. Regarding the types, Todd added that “we never had a lot of folks signing up and showing up to help us with this. If that is changing now I would love it, but we need more than just drive by help.”

In April the TC discussed Express funding and how ideas coming from the OpenJS Foundation might help.

Several other web frameworks have heavyweight sponsors. React has Facebook, Next.js has Vercel, Angular has Google and ASP.NET has Microsoft. Express lacks this kind of support, and like many open source projects, is searching for a way to translate its popularity into sustainability.