Releases: dart-forge/aim
Release list
0.4.0
Fourth beta. The edge adapter is split by runtime, and Supabase Edge Functions joins the Dart VM, Cloudflare workerd and Cloud Functions for Firebase as a place an Aim application runs. Breaking for aim_edge: it is now the shared edge package, and the Cloudflare adapter moved to aim_workers. See the Migration Guide for the five edits an existing Workers project needs.
Highlights
aim_deno(new): run an app on Deno-based runtimes.serveDeno(), string environment variables throughc.env, andbasePathfor runtimes that serve a function under a path. Verified on Supabase Edge Functions both locally and against a deployed function.aim_workers(new): the Cloudflare workerd adapter, split out ofaim_edgeunchanged.serveWorkers(), resource bindings throughc.env,c.cf,c.executionContext. Its integration suite runs the same 13 checks throughwrangler devas before.aim_edge: now the shared edge package — request and response translation, the fetch pipeline, and theEdgeEnvandEdgeRawinterfaces. Adapter authors get a second entry point,package:aim_edge/adapter.dart. Applications depend onaim_workersoraim_deno, not on this directly.aim_cli:aim.targetgainssupabaseand renamesedgetoworkers.aim create --target supabasescaffolds a Supabase project, andaim devstarts the local Supabase stack itself when it is not running — it never stops it, since another tool may be sharing that database.aim buildfor this target writes intosupabase/functions/<name>/, wherestatic_filescan carry the wasm.c.env,c.cfandc.executionContextare called exactly as before on Cloudflare. Only the package name,serveEdge()→serveWorkers(), the target name and the wasm output path changed.
Breaking changes
aim_edgeno longer serves an application.serveEdge(),BindingsandCfPropertiesmoved toaim_workers, along withc.cfandc.executionContext. No compatibility shim is possible:serveEdge()needs the types that moved, and depending onaim_workersfromaim_edgewould be circular. A caret constraint on^0.3.0excludes0.4.0, so no project is upgraded into this without asking.aim.target: edgeis rejected with an error naming bothworkersandaim_workers, rather than warned about. The dependency changed name too, so a warning would leave a project half-migrated.aim buildfor the Cloudflare target writesbuild/workers/where it wrotebuild/edge/. A project scaffolded before this release has two imports insrc/index.mjsthat name the old path.
Packages in this release
aim_workers 0.4.0 (new), aim_deno 0.4.0 (new), and aim_core, aim_edge, aim_server, aim_functions, aim_cli, aim_server_cors, aim_server_cookie, aim_server_form, aim_server_multipart, aim_server_static, aim_server_logger, aim_server_sse, aim_server_jwt, aim_server_basic_auth, aim_server_testing, aim_database, aim_postgres, aim_orm, aim_orm_postgres, aim_orm_codegen — all 0.4.0.
aim_sqlite is in the repository but held back from this release.
0.3.0
Third beta. The same application now runs on Cloud Functions for Firebase as well as on the Dart VM and Cloudflare workerd, and aim_cli scaffolds, runs and deploys such a project end to end. One breaking change, to serial columns; see below.
Highlights
aim_functions(new): run an app as a Cloud Functions for FirebaseonRequestHTTP function.app.serveFunction()returns a plain shelf handler, so the package's only runtime dependencies areaim_coreandshelf—firebase_functionsis something your own entry point needs, not the adapter. Requiresfirebase_functions0.8.0 or later: on 0.6.x the function name is not stripped before dispatch, which leaves an app whose routes are written as/unreachable locally. Verified against the Firebase emulator and against a deployed function. OnlyonRequestis supported;onCallis Firebase's own RPC convention and does not fit an HTTP-in, HTTP-out adapter.aim_cli:aim: target: functionsinpubspec.yaml.aim create --target functionsscaffolds a Cloud Functions project and asks for the Firebase project id — flat, withfirebase.jsonnext topubspec.yaml, so the CLI and the Firebase CLI agree on where the project root is.aim devstartsfirebase emulators:start --only functionsand adds no watcher of its own, because the emulator rebuilds Dart functions itself.aim builddoes nothing for this target:firebase deploycompiles on your machine and uploads the artifact.- Dart support in Firebase is experimental, and a deploy needs the Cloud Run Admin API enabled — a Dart function is deployed as a Cloud Run service, and
firebase deploydoes not switch that API on for you.
Breaking changes
aim_orm_postgres:SerialColumnisColumn<int, SerialColumn>where it wasColumn<String, SerialColumn>.SERIALstores a 4-byte integer, the code generator already maps it toint, and the class's own documentation said so — only the type parameter disagreed, which made every comparison on a serial key take a string. Three things follow for anyone who had written code against the old type: comparisons such asusers.id.eq('1')becomeusers.id.eq(1); a foreign key pointing at a serial column has to have the same value type, sovarchar('user_id').references(() => users.id)becomesinteger('user_id').references(() => users.id); anddefaultValue, along withcopyWith'sdefaultValueparameter, isint?where it wasString?.aim_orm_postgres: asking a serial column for a default now throwsUnsupportedErrorinstead of being ignored.SERIALalready meansinteger NOT NULL DEFAULT nextval(...), and PostgreSQL answers a second default with "multiple default values specified for column".aim db:generaterefuses the same thing when it reads the schema, because it reads the source rather than running it.
Packages in this release
aim_functions 0.3.0 (new), and aim_core, aim_server, aim_edge, aim_cli, aim_server_cors, aim_server_cookie, aim_server_form, aim_server_multipart, aim_server_static, aim_server_logger, aim_server_sse, aim_server_jwt, aim_server_basic_auth, aim_server_testing, aim_database, aim_postgres, aim_orm, aim_orm_postgres, aim_orm_codegen — all 0.3.0.
aim_sqlite is in the repository but held back from this release.
0.2.0
Second beta. Aim now runs on Cloudflare workerd as well as the Dart VM, aim_postgres pools connections, and the per-request variable type follows Hono's naming. This release contains breaking changes; see the Migration Guide for step-by-step instructions.
Highlights
aim_core(new): the framework core (Aim, routing, middleware,Context,Request,Response) with nodart:iodependency.aim_serverre-exports it, so existing imports keep working.aim_edge(new): run the same app on Cloudflare workerd, compiled withdart compile wasm.app.serveEdge(),c.env(Bindings),c.cf(CfProperties),c.executionContext. Streaming responses (SSE) work.aim_cli:aim: target: edgeinpubspec.yamlswitchesaim buildto WebAssembly andaim devtowrangler devwith recompilation on change.aim create --target edgescaffolds a worker project.aim_postgres: connection pooling inPostgresDatabase.connect()(maxConnections,acquireTimeout,idleTimeout,maxLifetime,validationInterval,poolStats). Queries on one connection are serialized, fixing protocol corruption under concurrent requests.- Requires Dart 3.13.
Breaking changes
Env→Variables,EmptyEnv→EmptyVariables;Aim(envFactory:)→Aim(variablesFactory:).JwtEnv→JwtVariables,BasicAuthEnv→BasicAuthVariables. Deprecated typedefs for the class names remain for this release;envFactoryhas no alias.Request.rawisObject?. On the VM usec.req.httpRequest(extension fromaim_server).aim_server_multipart:UploadedFile.saveTo()moved topackage:aim_server_multipart/aim_server_multipart_io.dart. The main library now exports the public API (MultipartFormData,UploadedFile,parseMultipart,MultipartRequest);src/imports should be replaced.aim_cli:--entrynow overridesaim.entryforaim devtoo;aim.envvalues are parsed as YAML (quote values containing:); errors exit non-zero.aim_postgres:db.query()/db.execute()inside atransaction()callback now run on a separate pooled connection. Usetxfor statements that belong to the transaction. Session state (SET,TEMPtables,LISTEN, advisory locks) no longer persists across calls; passmaxConnections: 1to keep single-connection behaviour.aim_orm_codegenandaim_clirequireanalyzer ^14.0.0; the code generator works withsource_gen ^4.3.0andbuild_runner 2.16.
Other changes
- Middleware packages (
aim_server_cors,cookie,form,logger,sse,jwt,basic_auth,multipart) depend onaim_coreand run unchanged on both runtimes.aim_server_staticremains VM-only. aim_server:Aim.handle()no longer prints unhandled errors;serve()still logs them.aim_postgres:PostgresConnection.isBroken,isClosed,ping();PoolTimeoutException.aim_cli:aim:configuration is parsed withpackage:yaml; the release tooling keeps the scaffold templates' dependency pins in sync.- Docs: new Migration Guide, CLI
targetdocumentation, connection pooling guide.
Packages in this release
aim_core 0.2.0 (new), aim_server, aim_edge 0.2.0 (new), aim_cli, aim_server_cors, aim_server_cookie, aim_server_form, aim_server_multipart, aim_server_static, aim_server_logger, aim_server_sse, aim_server_jwt, aim_server_basic_auth, aim_server_testing, aim_database, aim_postgres, aim_orm, aim_orm_postgres, aim_orm_codegen — all 0.2.0.
0.1.1
Internal fixes. No functional changes.
0.1.0
Changelog
0.1.0
First beta release of Aim Framework - a modular ecosystem for Dart.
Highlights
- Lightweight, fast web server framework
- Native PostgreSQL driver (no external dependencies)
- Type-safe ORM with Record syntax
- CLI tools with hot reload and database migrations
Web Server (aim_server)
- HTTP server built on Dart's native
HttpServer - Path-based routing with parameter support (
/users/:id) - Composable middleware chain
- JSON, text, HTML response handling
- Real-time SSE streaming support
- Custom error handlers (404, global)
Middleware Packages
- aim_server_cors: CORS configuration
- aim_server_cookie: Secure cookie management
- aim_server_form: Form data parsing
- aim_server_multipart: File upload handling
- aim_server_static: Static file serving
- aim_server_logger: HTTP request logging
- aim_server_sse: Server-Sent Events
- aim_server_jwt: JWT authentication
- aim_server_basic_auth: Basic authentication
Testing (aim_server_testing)
- Test helpers and matchers
- Mock objects for unit testing
- Integration test utilities
Database (aim_database + aim_postgres)
- Database abstraction layer
- Native PostgreSQL Wire Protocol implementation
- SSL/TLS support (disable, allow, prefer, require, verify-ca, verify-full)
- Authentication: cleartext, MD5, SCRAM-SHA-256
- Named parameters (
:name) and positional parameters ($1) - Transaction support with automatic commit/rollback
ORM (aim_orm + aim_orm_postgres + aim_orm_codegen)
- Type-safe table definitions using Dart Record syntax
- Column types:
integer,bigint,varchar,text,boolean,timestamp,uuid,json - Column modifiers:
primaryKey,unique,nullable,withDefault,indexed - Query builders: SELECT, INSERT, UPDATE, DELETE
- Condition operators:
eq,gt,lt,gte,lte,inList - Code generation with
build_runner
CLI (aim_cli)
aim create <name>: Project scaffoldingaim dev: Development server with hot reloadaim build: Production build with native compilationaim db:generate: Migration SQL generation from schema diffaim db:migrate: Apply pending migrationsaim db:rollback: Rollback migrationsaim db:status: Show migration status
Known Limitations
- ORM Relations (1:1, 1:N, N:N) not yet supported
- SQLite driver not yet available
db:resetcommand not yet implemented
Requirements
- Dart SDK:
^3.10.0 - PostgreSQL: 9.5+ (SCRAM-SHA-256 requires 10+)