platform/packages/framework/CHANGELOG.md

396 lines
12 KiB
Markdown
Raw Normal View History

2021-06-22 08:17:15 +00:00
# Change Log
2022-02-13 16:48:37 +00:00
## 6.0.0
2022-04-23 04:21:39 +00:00
* Updated to SDK 2.16.x
2021-11-28 04:15:56 +00:00
* Updated `container` to non nullable
2021-11-29 01:04:50 +00:00
* Updated `angel` to non nullable
* Updated `logger` to non nullable
* Refactored error handler
2022-02-13 16:48:37 +00:00
## 5.0.0
2022-04-23 04:21:39 +00:00
* Skipped release
2022-02-13 16:48:37 +00:00
2022-01-23 05:10:50 +00:00
## 4.2.4
* Fixed issue 48. Log not working in development
2021-12-01 07:10:58 +00:00
## 4.2.3
* Fixed `res.json()` throwing bad state exception
2021-11-23 10:27:01 +00:00
## 4.2.2
* Added `Date` to response header
* Updated `Server: Angel3` response header
2021-10-04 05:13:56 +00:00
## 4.2.1
* Updated `package:angel3_container`
2021-09-25 06:32:32 +00:00
## 4.2.0
2021-10-04 05:13:56 +00:00
* Updated to `package:belatuk_combinator`
* Updated to `package:belatuk_merge_map`
2021-09-25 06:32:32 +00:00
* Updated linter to `package:lints`
2021-08-20 05:55:04 +00:00
## 4.1.3
* Updated README
2021-08-20 05:46:02 +00:00
## 4.1.2
* Updated README
* Fixed NNBD issues
2021-07-08 02:42:40 +00:00
## 4.1.1
* Updated link to `Angel3` home page
* Fixed pedantic warnings
2021-06-22 08:17:15 +00:00
## 4.1.0
* Replaced `http_server` with `belatuk_http_server`
## 4.0.4
2021-06-01 01:01:01 +00:00
* Fixed response returning incorrect status code
2021-06-22 08:17:15 +00:00
## 4.0.3
2021-05-29 01:14:16 +00:00
* Fixed "Primitive after parsed param injection" test case
* Fixed "Cannot remove all unless explicitly set" test case
* Fixed "null" test case
2021-06-22 08:17:15 +00:00
## 4.0.2
2021-05-15 17:58:51 +00:00
* Updated README
2021-06-22 08:17:15 +00:00
## 4.0.1
2021-05-15 06:18:06 +00:00
* Updated README
2021-06-22 08:17:15 +00:00
## 4.0.0
2021-05-02 04:12:43 +00:00
* Migrated to support Dart SDK 2.12.x NNBD
2021-06-22 08:17:15 +00:00
## 3.0.0
2021-05-02 04:12:43 +00:00
* Migrated to work with Dart SDK 2.12.x Non NNBD
2021-06-22 08:17:15 +00:00
## 2.1.1
2020-02-05 23:02:46 +00:00
* `AngelHttp.uri` now returns an empty `Uri` if the server is not listening.
2021-06-22 08:17:15 +00:00
## 2.1.0
2019-11-22 13:21:01 +00:00
* This release was originally planned to be `2.0.5`, but it adds several features, and has
therefore been bumped to `2.1.0`.
2019-11-22 13:20:00 +00:00
* Fix a new (did not appear before 2.6/2.7) type error causing compilation to fail.
2021-06-22 08:17:15 +00:00
<https://github.com/angel-dart/framework/issues/249>
2019-11-22 13:20:00 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.5-beta
* Make `@Expose()` in `Controller` optional. <https://github.com/angel-dart/angel/issues/107>
* Add `allowHttp1` to `AngelHttp2` constructors. <https://github.com/angel-dart/angel/issues/108>
* Add `deserializeBody` and `decodeBody` to `RequestContext`. <https://github.com/angel-dart/angel/issues/109>
* Add `HostnameRouter`, which allows for routing based on hostname. <https://github.com/angel-dart/angel/issues/110>
2019-10-12 13:53:16 +00:00
* Default to using `ThrowingReflector`, instead of `EmptyReflector`. This will give a more descriptive
error when trying to use controllers, etc. without reflection enabled.
2019-10-12 14:56:24 +00:00
* `mountController` returns the mounted controller.
2019-07-17 17:20:20 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.4+1
2019-07-26 02:45:47 +00:00
* Run `Controller.configureRoutes` before mounting `@Expose` routes.
* Make `Controller.configureServer` always return a `Future`.
2021-06-22 08:17:15 +00:00
## 2.0.4
* Prepare for Dart SDK change to `Stream<List<int>>` that are now
`Stream<Uint8List>`.
2019-07-09 00:22:09 +00:00
* Accept any content type if accept header is missing. See
[this PR](https://github.com/angel-dart/framework/pull/239).
2021-06-22 08:17:15 +00:00
## 2.0.3
2019-06-06 16:17:32 +00:00
* Patch up a bug caused by an upstream change to Dart's stream semantics.
2021-06-22 08:17:15 +00:00
See more: <https://github.com/angel-dart/angel/issues/106#issuecomment-499564485>
## 2.0.2+1
2019-06-06 16:17:32 +00:00
2019-05-31 20:24:13 +00:00
* Fix a bug in the implementation of `Controller.applyRoutes`.
2021-06-22 08:17:15 +00:00
## 2.0.2
* Make `ResponseContext` *explicitly* implement `StreamConsumer` (though technically it already did???)
2019-05-31 03:57:09 +00:00
* Split `Controller.configureServer` to create `Controller.applyRoutes`.
2021-06-22 08:17:15 +00:00
## 2.0.1
2019-05-02 22:37:32 +00:00
* Tracked down a bug in `Driver.runPipeline` that allowed fallback
handlers to run, even after the response was closed.
* Add `RequestContext.shutdownHooks`.
* Call `RequestContext.close` in `Driver.sendResponse`.
* AngelConfigurer is now `FutureOr<void>`, instead of just `FutureOr`.
* Use a `Container.has<Stopwatch>` check in `Driver.sendResponse`.
2019-05-02 22:48:31 +00:00
* Remove unnecessary `new` and `const`.
2019-05-02 22:37:32 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0
2019-04-29 04:18:31 +00:00
* Angel 2! :angel: :rocket:
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.10
2019-04-28 17:44:47 +00:00
* Fix an error that prevented `AngelHttp2.custom` from working properly.
* Add `startSharedHttp2`.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.9
2019-04-26 02:24:15 +00:00
* Fix some bugs in the `HookedService` implementation that skipped
the outputs of `before` events.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.8
2019-04-20 19:04:59 +00:00
* Fix `MapService` flaw where clients could remove all records, even if `allowRemoveAll` were `false`.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.7
2019-04-20 16:15:09 +00:00
* `AnonymousService` can override `readData`.
* `Service.map` now overrides `readData`.
2019-04-20 16:22:52 +00:00
* `HookedService.readData` forwards to `inner`.
2019-04-20 16:15:09 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.6
2019-04-19 07:46:44 +00:00
* Make `redirect` and `download` methods asynchronous.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.5
2019-04-17 16:41:59 +00:00
* Make `serializer` `FutureOr<String> Function(Object)`.
* Make `ResponseContext.serialize` return `Future<bool>`.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.4
2019-04-17 15:15:46 +00:00
* Support resolution of asynchronous injections in controllers and `ioc`.
* Inject `RequestContext` and `ResponseContext` into requests.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.3
2019-04-11 17:44:09 +00:00
* `MapService.modify` was not actually modifying items.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.2
2019-04-11 15:54:46 +00:00
* Fixes Pub analyzer lints (see `angel_route@3.0.6`)
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.1
* Fix logic error that allowed content to be written to streaming responses after `close` was closed.
2021-06-22 08:17:15 +00:00
## 2.0.0-rc.0
2019-04-08 22:51:22 +00:00
* Log a warning when no `reflector` is provided.
2019-04-08 23:03:35 +00:00
* Add `AngelEnvironment` class.
2021-06-22 08:17:15 +00:00
* Add `Angel.environment`.
* Deprecated `app.isProduction` in favor of `app.environment.isProduction`.
* Allow setting of `bodyAsObject`, `bodyAsMap`, or `bodyAsList` **exactly once**.
* Resolve named singletons in `resolveInjection`.
2019-04-10 23:05:53 +00:00
* Fix a bug where `Service.parseId<double>` would attempt to parse an `int`.
* Replace as Data cast in Service.dart with a method that throws a 400 on error.
2019-04-08 22:51:22 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.24
2019-04-08 19:53:07 +00:00
* Add `AngelEnv` class to `core`.
* Deprecate `Angel.isProduction`, in favor of `AngelEnv`.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.23
2019-03-11 03:04:49 +00:00
* `ResponseContext.render` sets `charset` to `utf8` in `contentType`.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.22
2019-02-03 18:50:22 +00:00
* Update pipeline handling mechanism, and inject a `MiddlewarePipelineIterator`.
2021-06-22 08:17:15 +00:00
* This allows routes to know where in the resolution process they exist, at runtime.
## 2.0.0-alpha.21
2019-02-03 18:50:22 +00:00
2019-02-03 18:00:42 +00:00
* Update for `angel_route@3.0.4` compatibility.
* Add `readAsBytes` and `readAsString` to `UploadedFile`.
* URI-decode path components in HTTP2.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.20
2019-02-03 16:03:31 +00:00
* Inject the `MiddlewarePipeline` into requests.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.19
2019-01-27 21:39:36 +00:00
* `parseBody` checks for null content type, and throws a `400` if none was given.
* Add `ResponseContext.contentLength`.
* Update `streamFile` to set content length, and also to work on `HEAD` requests.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.18
2018-12-31 17:04:02 +00:00
* Upgrade `http2` dependency.
* Upgrade `uuid` dependency.
* Fixed a bug that prevented body parsing from ever completing with `http2`.
2018-12-31 17:12:32 +00:00
* Add `Providers.hashCode`.
2018-12-31 17:04:02 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.17
2018-12-14 02:31:21 +00:00
* Revert the migration to `lumberjack` for now. In the future, when it's more
stable, there'll be a conversion, perhaps.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.16
2018-12-11 03:19:16 +00:00
* Use `package:lumberjack` for logging.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.15
2018-12-09 15:49:59 +00:00
* Remove dependency on `body_parser`.
* `RequestContext` now exposes a `Stream<List<int>> get body` getter.
2021-06-22 08:17:15 +00:00
* Calling `RequestContext.parseBody()` parses its contents.
* Added `bodyAsMap`, `bodyAsList`, `bodyAsObject`, and `uploadedFiles` to `RequestContext`.
* Removed `Angel.keepRawRequestBuffers` and anything that had to do with buffering request bodies.
## 2.0.0-alpha.14
2018-12-09 15:49:59 +00:00
2018-11-13 23:33:44 +00:00
* Patch `HttpResponseContext._openStream` to send content-length.
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.13
2018-11-13 21:17:31 +00:00
2021-06-22 08:17:15 +00:00
* Fixed a logic error in `HttpResponseContext` that prevented status codes from being sent.
2018-11-13 21:17:31 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.12
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Remove `ResponseContext.sendFile`.
* Add `Angel.mimeTypeResolver`.
* Fix a bug where an unknown MIME type on `streamFile` would return a 500.
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.11
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Add `readMany` to `Service`.
* Allow `ResponseContext.redirect` to take a `Uri`.
* Add `Angel.mountController`.
* Add `Angel.findServiceOf`.
* Roll in HTTP/2. See `pkg:angel_framework/http2.dart`.
2018-11-08 02:34:03 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.10
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* All calls to `Service.parseId` are now affixed with the `<Id>` argument.
* Added `uri` getter to `AngelHttp`.
* The default for `parseQuery` now wraps query parameters in `Map<String, dynamic>.from`.
2018-11-13 18:07:27 +00:00
This resolves a bug in `package:angel_validate`.
2018-11-06 19:26:45 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.9
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Add `Service.map`.
2018-10-22 16:29:09 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.8
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* No longer export HTTP-specific code from `angel_framework.dart`.
2018-11-13 18:07:27 +00:00
An import of `import 'package:angel_framework/http.dart';` will be necessary in most cases now.
2018-10-22 15:54:41 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.7
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Force a tigher contract on services. They now must return `Data` on all
2018-11-13 18:07:27 +00:00
methods except for `index`, which returns a `List<Data>`.
2018-10-21 08:41:35 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.6
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Allow passing a custom `Container` to `handleContained` and co.
2018-10-21 08:00:39 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.5
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* `MapService` methods now explicitly return `Map<String, dynamic>`.
2018-10-19 16:54:05 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.4
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Renamed `waterfall` to `chain`.
* Renamed `Routable.service` to `Routable.findService`.
* Also `Routable.findHookedService`.
2018-09-12 04:18:15 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.3
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Added `<Id, Data>` type parameters to `Service`.
* `HookedService` now follows suit, and takes a third parameter, pointing to the inner service.
* `Routable.use` now uses the generic parameters added to `Service`.
* Added generic usage to `HookedServiceListener`, etc.
* All service methods take `Map<String, dynamic>` as `params` now.
2018-09-11 20:25:07 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.2
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Added `ResponseContext.detach`.
2018-08-28 13:44:58 +00:00
2021-06-22 08:17:15 +00:00
## 2.0.0-alpha.1
2018-11-13 18:07:27 +00:00
2021-06-22 08:17:15 +00:00
* Removed `Angel.injectEncoders`.
* Added `Providers.toJson`.
* Moved `Providers.graphql` to `Providers.graphQL`.
* `Angel.optimizeForProduction` no longer calls `preInject`,
2018-11-13 18:07:27 +00:00
as it does not need to.
2021-06-22 08:17:15 +00:00
* Rename `ResponseContext.enableBuffer` to `ResponseContext.useBuffer`.
## 2.0.0-alpha
* Removed `random_string` dependency.
* Moved reflection to `package:angel_container`.
* Upgraded `package:file` to `5.0.0`.
* `ResponseContext.sendFile` now uses `package:file`.
* Abandon `ContentType` in favor of `MediaType`.
* Changed view engine to use `Map<String, dynamic>`.
* Remove dependency on `package:json_god` by default.
* Remove dependency on `package:dart2_constant`.
* Moved `lib/hooks.dart` into `package:angel_hooks`.
* Moved `TypedService` into `package:angel_typed_service`.
* Completely removed the `AngelBase` class.
* Removed all `@deprecated` symbols.
* `Service.toId` was renamed to `Service.parseId`; it also now uses its
2018-11-13 18:07:27 +00:00
single type argument to determine how to parse a value. \* In addition, this method was also made `static`.
2021-06-22 08:17:15 +00:00
* `RequestContext` and `ResponseContext` are now generic, and take a
2018-11-13 18:07:27 +00:00
single type argument pointing to the underlying request/response type,
respectively.
2021-06-22 08:17:15 +00:00
* `RequestContext.io` and `ResponseContext.io` are now permanently
2018-11-13 18:07:27 +00:00
gone.
2021-06-22 08:17:15 +00:00
* `HttpRequestContextImpl` and `HttpResponseContextImpl` were renamed to
2018-11-13 18:07:27 +00:00
`HttpRequestContext` and `HttpResponseContext`.
2021-06-22 08:17:15 +00:00
* Lazy-parsing request bodies is now the default; `Angel.lazyParseBodies` was replaced
2018-11-13 18:07:27 +00:00
with `Angel.eagerParseRequestBodies`.
2021-06-22 08:17:15 +00:00
* `Angel.storeOriginalBuffer` -> `Angel.storeRawRequestBuffers`.
* The methods `lazyBody`, `lazyFiles`, and `lazyOriginalBuffer` on `ResponseContext` were all
2018-11-13 18:07:27 +00:00
replaced with `parseBody`, `parseUploadedFiles`, and `parseRawRequestBuffer`, respectively.
2021-06-22 08:17:15 +00:00
* Removed the synchronous equivalents of the above methods (`body`, `files`, and `originalBuffer`),
2018-11-13 18:07:27 +00:00
as well as `query`.
2021-06-22 08:17:15 +00:00
* Removed `Angel.injections` and `RequestContext.injections`.
* Removed `Angel.inject` and `RequestContext.inject`.
* Removed a dependency on `package:pool`, which also meant removing `AngelHttp.throttle`.
* Remove the `RequestMiddleware` typedef; from now on, one should use `ResponseContext.end`
2018-11-13 18:07:27 +00:00
exclusively to close responses.
2021-06-22 08:17:15 +00:00
* `waterfall` will now only accept `RequestHandler`.
* `Routable`, and all of its subclasses, now extend `Router<RequestHandler>`, and therefore only
2018-11-13 18:07:27 +00:00
take routes in the form of `FutureOr myFunc(RequestContext, ResponseContext res)`.
2021-06-22 08:17:15 +00:00
* `@Middleware` now takes an `Iterable` of `RequestHandler`s.
2022-02-13 16:48:37 +00:00
* `@Expose.path` now *must* be a `String`, not just any `Pattern`.
2021-06-22 08:17:15 +00:00
* `@Expose.middleware` now takes `Iterable<RequestHandler>`, instead of just `List`.
* `createDynamicHandler` was renamed to `ioc`, and is now used to run IoC-aware handlers in a
2018-11-13 18:07:27 +00:00
type-safe manner.
2021-06-22 08:17:15 +00:00
* `RequestContext.params` is now a `Map<String, dynamic>`, rather than just a `Map`.
* Removed `RequestContext.grab`.
* Removed `RequestContext.properties`.
* Removed the defunct `debug` property where it still existed.
* `Routable.use` now only accepts a `Service`.
* Removed `Angel.createZoneForRequest`.
* Removed `Angel.defaultZoneCreator`.
* Added all flags to the `Angel` constructor, ex. `Angel.eagerParseBodies`.
* Fix a bug where synchronous errors in `handleRequest` would not be caught.
* `AngelHttp.useZone` now defaults to `false`.
* `ResponseContext` now starts in streaming mode by default; the response buffer is opt-in,
2018-11-13 18:07:27 +00:00
as in many cases it is unnecessary and slows down response time.
2021-06-22 08:17:15 +00:00
* `ResponseContext.streaming` was replaced by `ResponseContext.isBuffered`.
* Made `LockableBytesBuilder` public.
* Removed the now-obsolete `ResponseContext.willCloseItself`.
* Removed `ResponseContext.dispose`.
* Removed the now-obsolete `ResponseContext.end`.
* Removed the now-obsolete `ResponseContext.releaseCorrespondingRequest`.
* `preInject` now takes a `Reflector` as its second argument.
* `Angel.reflector` defaults to `const EmptyReflector()`, disabling
2018-11-13 18:07:27 +00:00
reflection out-of-the-box.