Skip to content

Releases: marblejs/marble

v2.0.1

14 Mar 08:02
Compare
Choose a tag to compare

What's new?

  • @marblejs/core - added missing server events parameters

v2.0.0

02 Mar 19:50
Compare
Choose a tag to compare

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. 🔥🎉🚀

👉 See what's new in 2.0 version

Marble.js

v2.0.0-rc.3

24 Feb 20:11
Compare
Choose a tag to compare
v2.0.0-rc.3 Pre-release
Pre-release

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

17 Feb 19:24
Compare
Choose a tag to compare
v2.0.0-rc.2 Pre-release
Pre-release

Whats new?

  • @marblejs/core: added new API for defining HTTP route via monadic pipe builder #103
  • @marblejs/core: added support for HTTPS servers #105
  • @marblejs/core: fixed incorrectly parsed query parameters #104
  • @marblejs/middleware-body: fixed incorrectly parsed URL-encoded parameters #104

v2.0.0-rc.1

08 Feb 17:21
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release

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 parsed application/x-www-form-urlencoded body types #101

v2.0.0-rc.0

03 Feb 12:57
Compare
Choose a tag to compare
v2.0.0-rc.0 Pre-release
Pre-release

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 of unknown type instead of any #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

  • Deprecated @marblejs/middleware-joi package. Use @marblejs/middleware-io instead. #99
  • Deprecated @marblejs/middleware-logger loggerWithOpts$ entrypoint. #98

v1.2.1

05 Nov 20:52
Compare
Choose a tag to compare

Whats new?

  • fixed an issue with missing chalk dependency in @marblejs/core package (issue: #77)

v1.2.0

05 Nov 20:57
Compare
Choose a tag to compare

Whats new?

  • core - Corrected nullable values detection inside Maybe monad
  • middleware-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

21 Oct 18:34
Compare
Choose a tag to compare

Whats new?

  • @marblejs/core resolves #67 (path matching for trailing slash combined with wildcard parameter)

v1.1.0

29 Sep 21:27
Compare
Choose a tag to compare

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-tested tsc compiler which makes our build artifacts more predictable and less error prone