FoalTS / foal

Full-featured Node.js framework, with no complexity. 🚀 Simple and easy to use, TypeScript-based and well-documented.
https://foalts.org/
MIT License
1.88k stars 137 forks source link

Version 4 #1223

Closed LoicPoullain closed 9 months ago

LoicPoullain commented 10 months ago

Version 4

Node 16 will reach end-of-life on September 11. It is time to a publish a new major version of Foal to support latest Node versions.

Goals of version 4

No new features will be added to this version.

The objectives of this release are to

Key changes

Supported databases

Provider Databases
Heroku PostgreSQL
Supabase PostgreSQL
DigitalOcean MongoDB, PostgreSQL, MySQL
Vercel PostgreSQL
fly.io PostgreSQL
GCP MySQL, PostgreSQL and SQL Server
Firebase Proprietary solution

After a survey of PaaS providers on the market, it appears that none of them support MariaDB. Testing on MariaDB will therefore be dropped for v4.

The databases officially supported from v4 onwards will be PostgreSQL, MySQL, MongoDB and SQLite.

MariaDB can still be used as any other database supported by TypeORM. It will simply no longer be tested.

Supported database drivers

The driver better-sqlite3 causes compilation errors in the CI and on some hosts due to node-gyp errors. Starting from version 4, only the sqlite3 driver will be tested and it will be used for new projects. It will be recommended to move to this driver.

Using better-sqlite3 may work in future versions of FoalTS but it will not be tested.

Failed attempts

Watching mode

node --watch and node --watch-path work well. Unfortunately, it does not work on Linux. So supervisor won't be remove at the moment.

Fetch API

Replacing node-fetch with the native Fetch API throws errors in many tests on Node 18 (but not on Node 20). Therefore the library won't be removed in this version.

Same problem with replacing the library with undici.

Test runner

The output of the native Node test runner is less readable than mocha. So mocha will be kept in this version.

LoicPoullain commented 9 months ago

Version 4 has been published