Releases: marblejs/marble
v2.0.1
What's new?
- @marblejs/core - added missing server events parameters
v2.0.0
Over the past few months, we've been working hard on the next generation of Marble.js. Today we're thrilled to announce the second major release and all the exciting features that come with it. 🔥🎉🚀
v2.0.0-rc.3
Whats new?
@marblejs/core
: replaced StaticInjectorContainer with Context API #106@marblejs/core
: running HTTP server is not registered anymore in context API #106@marblejs/core
: createServer doesn't start listening automatically. You have to run in manually via createServer().run(); #106@marblejs/core
: replaced bind.to function with curried bindTo #106@marblejs/websockets
: module doesn't depend anymore on running HTTP server dependency #106
Breaking changes
In order to use httpListener
directly connected to http.createServer
you have to run Reader context first:
import { createContext } from '@marblejs/core';
import * as http from 'http';
import httpListener from './http.listener';
const httpListenerWithContext = httpListener
.run(createContext());
export const server = http
.createServer(httpListenerWithContext)
.listen(1337, '127.0.0.1');
v2.0.0-rc.2
v2.0.0-rc.1
Whats new?
@marblejs/middleware-body
: Extended middleware API by customizable parsers #102@marblejs/middleware-body
: The middleware can pass the request through without any work if the content type is not matched. It creates the possibility of chaining multiple body parsers. #102@marblejs/middleware-body
: Fixed wrongly parsedapplication/x-www-form-urlencoded
body types #101
v2.0.0-rc.0
Before you'll read
- Marble.js v2 is currently in pre-release stage. Its API can change in the meantime while reaching the desired
2.0.0
version. - New, up to date marblejs.com documentation for Marble.js v2 is on the way!
- Visit
next
branch integration package for more detailed use cases and implementation examples
Whats new?
- @marblejs/core - improved type-inference of combined middlewares #88
- @marblejs/core - Effect response output stream #96
- @marblejs/core -
createServer
bootstrapping function #89 #91 - @marblejs/core - improved type declaration of
combineRoutes
function - @marblejs/websockets - WebSockets module #89
- @marblejs/middlware-joi - improved middleware type inference #88
- @marblejs/middlware-io - introducing new effect validation middleware based on the @gcanti
io-ts
library - @marblejs/middlware-body - entrypoint allows to pass configuration object
- TypeScript v3.3.x support
Breaking changes
- @marblejs/core - Improved request type inference.
req.params
,req.body
,req.query
are by default ofunknown
type instead ofany
#88 - @marblejs/core -
httpListener
config properties renaming #92 - @marblejs/core - The third argument is a common
EffectMetadata
object which can contain eventual error object or contextual injector. #94 #95 - @marblejs/middlware-body - should be
bodyParser$()
should be invoked as a function - @marblejs/core #97
Effect
->HttpEffect
Middleware
->HttpMiddlewareEffect
ErrorEffect
->HttpErrorEffect
Deprecation warnings
v1.2.1
v1.2.0
Whats new?
core
- Corrected nullable values detection inside Maybe monadmiddleware-logger
- extended available API
Introducing new loggerWithOpts$
entry point which exposes an interface for configuring middleware behavior.
available options:
interface LoggerOptions {
silent?: boolean;
stream?: WriteStream;
filter?: (req: HttpResponse) => boolean;
}
silent
- When true the logging is turned off (eg. can be useful during testing)
stream
- Output stream for writing log messages, defaults to process.stdout.
filter
- Function to determine if logging is skipped (eg. we can log only HTTP status codes above 400)
example usage:
import { loggerWithOpts$ } from '@marblejs/middleware-logger';
const logger$ = loggerWithOpts$({
silent: false;
stream: createWriteStream(PATH, { flags: 'a' });;
filter: req => req.status >= 400;
});
Deprecation warnings
Because previous logger$
wasn't exposed as a function, it was very hard to extend it, thus we had to deprecate it in favor of new loggerWithOpts$
entry point which is more maintainable and can be extended easier.
From version v1.2 the old entry point is marked as deprecated and recommends to use the newer entry point. From the version v2.x the old entry point will be swapped with loggerWithOpts$
implementation.
v1.1.1
v1.1.0
10 days ago we've got an official v1.0.0 release - this time we have another cool news to share with you!
Whats new?
- Introducing new package
@marblejs/middleware-jwt
- a HTTP requests authentication middleware based on JWT mechanism. 🚀🎉 For more API reference please visit our official documentation. - Resolved an issue in the scenario when the grouped middleware throws an error (eg. when request is not authorized) and connected Effect endpoint unexpectedly catches the thrown error. To read more details please visit #73
- Support for TypeScript
v3.1.x
- [Internal] - Moved back from
webpack
to well-testedtsc
compiler which makes our build artifacts more predictable and less error prone