Skip to content

Commit c76e802

Browse files
chore(serinus): prepare for release (2.1.2)
1 parent bc6821b commit c76e802

4 files changed

Lines changed: 29 additions & 5 deletions

File tree

packages/serinus/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## 2.1.2
4+
5+
**Released on:** 22-02-2026
6+
7+
### Features
8+
9+
- Add `CsrfHook` to provide built-in CSRF protection for Serinus applications. This hook can be easily integrated into the request lifecycle to ensure that all incoming requests are properly validated for CSRF tokens, enhancing the security of the application against cross-site request forgery attacks.
10+
- Add initial implementation of the `SerinusMinimalApplication` to provide a flexible and customizable way to create Serinus applications with minimal configuration. This allows developers to have more control over the application setup and configuration while still benefiting from the core features of Serinus.
11+
12+
### Fixes
13+
14+
- Fix a bug in the modules initialization process that caused the `InternalCoreModule` to be orphaned and not properly initialized. This fix ensures that the `InternalCoreModule` is correctly initialized and integrated into the application, preventing potential issues with module dependencies and application startup.
15+
- Fix a bug in the `MiddlewareRegistry` implementation that prevented the correct registration of middlewares when using the new Atlas router.
16+
17+
### Performance Improvements
18+
19+
- Improved RPS performance of the application by optimizing the request handling process and reducing unnecessary overhead in the request lifecycle. This results in faster response times and improved overall performance of Serinus applications. (Up to 15% improvement in RPS performance)
20+
321
## 2.1.1
422

523
**Released on:** 15-02-2026

packages/serinus/lib/src/containers/modules_container.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,16 +760,19 @@ final class ModulesContainer {
760760
if (!sameTypeBag(aImportTypes, bImportTypes)) {
761761
return false;
762762
}
763-
763+
764764
return true;
765765
}
766766

767+
/// Adds the entrypoint scope to the imports of the internal core module.
767768
void addEntrypointToInternalCoreModule(Module internalCoreModule) {
768769
final entryScope = _scopeManager.getScope(entrypointToken!);
769-
final internalCoreModuleScope = _scopeManager.getScope(InjectionToken.fromModule(internalCoreModule));
770+
final internalCoreModuleScope = _scopeManager.getScope(
771+
InjectionToken.fromModule(internalCoreModule),
772+
);
770773
internalCoreModuleScope.imports.add(entryScope.module);
771774
internalCoreModuleScope.module.imports.add(entryScope.module);
772-
entryScope.importedBy.add(internalCoreModuleScope.token);
775+
entryScope.importedBy.add(internalCoreModuleScope.token);
773776
}
774777
}
775778

packages/serinus/lib/src/containers/serinus_container.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ class SerinusContainer {
6464
/// It registers the modules and finalizes the container.
6565
Future<void> init(Module entrypoint, RoutesResolver? routesResolver) async {
6666
if (!modulesContainer.isInitialized) {
67-
final internalCoreModule = InternalCoreModule(inspector, config.microservices.isNotEmpty);
67+
final internalCoreModule = InternalCoreModule(
68+
inspector,
69+
config.microservices.isNotEmpty,
70+
);
6871
await modulesContainer.registerModules(
6972
internalCoreModule,
7073
internal: true,

packages/serinus/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Serinus is a framework written in Dart
44
documentation: https://serinus.app
55
homepage: https://serinus.app
66
repository: https://github.com/francescovallone/serinus
7-
version: 2.1.1
7+
version: 2.1.2
88
funding:
99
- https://github.com/sponsors/francescovallone
1010
topics:

0 commit comments

Comments
 (0)