4.0 Milestone
- Dominant language
- TypeScript
- Stars
- 19k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
## Feature
- [x] Support TypeScript by default
- [x] https://github.com/eggjs/koa/pull/5
- [x] @eggjs/core https://github.com/eggjs/egg-core/pull/265
- [x] https://github.com/eggjs/egg-utils/pull/21
- [x] @eggjs/router https://github.com/eggjs/egg-router/pull/10
- [x] https://github.com/eggjs/egg/pull/5328
- [x] refactor egg with ts https://github.com/eggjs/egg/pull/5328
- [x] refactor tegg plugin to support egg v4
- [x] use tegg by default
- [x] https://github.com/eggjs/egg-schedule/pull/62
- [x] better config define for TypeScript, e.g.: https://github.com/toeverything/AFFiNE/blob/canary/packages/backend/server/src/core/doc/config.ts#L55
- [x] Support cjs and esm both https://github.com/eggjs/egg/issues/5257
- [x] Support Node >= 18.19.0 ([diagnostics_channel.subscribe](https://nodejs.org/api/diagnostics_channel.html#diagnostics_channelsubscribename-onmessage) required)
> https://nodejs.org/api/esm.html#importmetaresolvespecifier `import.meta.resolve` required >= 18.19.0
- [x] Only support Windows >= 10
- [x] urllib@4 and undici@6 https://github.com/node-modules/urllib/pull/514
- [ ] Better Single Process In Docker
- [x] Async Config Support
- [x] https://github.com/eggjs/egg-core/pull/272
- [x] Use zod to parse Config and enable snapshot testing on config unittest
- [x] e.g.: security plugin https://github.com/eggjs/security/pull/101
- [ ] ~~CLI Plugin System~~
- [ ] Release Egg Cloud
- [ ] Support Cloudflare Workers https://developers.cloudflare.com/workers/
- [x] esm support
- [x] tsconfig-paths not support esm, need to use tsx on esm project
- [ ] 常用插件默认支持 tegg module 模式,让 tegg standalone 可以运行,参考 @eggjs/tegg-dal-plugin 和 @eggjs/tegg-ajv-plugin 的实现,同时兼容 egg plugin 和 tegg module。
- [ ] 根据 https://node-modules.dev/grid#install=egg@4 改造剩余的 模块
- [x] support vitest
- [x] Normal egg application and plugin
- [x] tegg modules
## Breaking changes
### Node.js
- [x] Drop generator function support
- [x] Drop Node.js < 20.x support, need to support CommonJS require ESM feature
- [x] Drop Node.js <= 22.18 support, need to execute TypeScript be default
- [x] ESMOnly
### HttpClient
- [ ] Remove DNSCacheHttpClient
- [x] Remove HttpClientNext
- [x] upgrade urllib to v4
### Logger
- [x] set `config.logger.enablePerformanceTimer = true` by default
- [x] set `config.logger.enableFastContextLogger = true` by default
### egg-bin
- [x] remove mochawesome reporter by default https://github.com/eggjs/egg/pull/5575
### tegg
- `@Context()` => `@HTTPContext()`
- `@Request()` => `@HTTPRequest()`
- `@Headers()` => `@HTTPHeaders()`
- `@Cookies()` => `@HTTPCookies()`
## Other
- [x] Drop legacy feature.
- [x] New Docs Site.
- [x] Auto release by https://github.com/node-modules/github-actions
- [x] https://github.com/xiekw2010/egg-typebox-validate support egg v4 https://github.com/xiekw2010/egg-typebox-validate/pull/3
- [ ] Replace co-busboy https://github.com/cojs/busboy
- [ ] 升级帮助文档 https://www.yuque.com/egg/doc/v3-to-v4
- [ ] DAL 支持 sql tpl tag https://github.com/blakeembrey/sql-template-tag
## Release
- ~~Maybe October, 2019~~
- ~~2022年8月8日发布全新的框架内核 [Artus](https://github.com/artusjs/core),发音「阿图斯」~~ 内核还是 egg-core,不会改动。
- egg 4.0:正在 ts 重构中,~~预计 2025年~~上半年~~11月22日发布~~ 预计在 2026 年 4 月份发布
Contributor guide
Assessment
This issue has not been assessed yet.