[RFC] Package ecosystem reorganization #316
Replies: 3 comments 1 reply
-
Just discovered this library and love it! I would really like to see the core module slimmed down and not depend on any Node.js modules especially. My use case is I would like to share Event schemas between code that runs in the browser and the websocket server. Thankfully the Event schema Marble.js relies on is super simple so hand rolling is fine but would love to use the built in utilities Marble has defined for event creation, etc. |
Beta Was this translation helpful? Give feedback.
-
I just found out this RFC and really like the extraction of the |
Beta Was this translation helpful? Give feedback.
-
Update: I've just created a dedicated repository github.com/marblejs/contrib and moved following packages from the main repo:
The plan is to manage them independently (different, not synchronized semantic versioning, independent from |
Beta Was this translation helpful? Give feedback.
-
Overview
The current official package/modules ecosystem consist of:
Problem statement
io-ts
-based middleware was released.messaging
,testing
,websockets
, middlewares mixing core functionalities with HTTP protocol context. With an introduction ofmessaging
module HTTP protocol is not the only one available transport layer that Marble.js apps can be built on.Proposed solution
marblejs/contrib
(?) for community driven packages that are out of scope core modules. First candidates for migration: @marblejs/middleware-joi and maybe @marblejs/middleware-jwt.@marblejs/core
package should be split into two parts: reduced API layer for @marblejs/core and brand new @marblejs/http package. All existing HTTP related API would be moved to the new scope, where the core package will include all basic and common interfaces and API's that are used across all dependent modules:testing
,websockets
,messaging
and newhttp
.v4.0
Things to consider
cors
,multipart
,body
orlogger
can be scoped and baked into the future@marblejs/http
module. The only problem that I foresee is the maintenance experience/cost - it will be hard to maintain so many things in one place. Maybe separation into dedicated packages is still valid and good path. 🤔Migration path
Instead of:
we will have:
Beta Was this translation helpful? Give feedback.
All reactions