4.0.0-alpha.3 - 2024-xx-xx
@supercharge/application
- add
app.name()
method: returns the application name if available, otherwiseundefined
- add
@supercharge/contracts
- add
Application.name()
method
- add
- bump dependencies
@supercharge/http
- make
Controller
class abstract Controller
class: addabstract handle
method definition to transport the information which method needs implementation
- make
@supercharge/vite
- create correct
hotFilePath
to<publicDirectory>/<buildDirectory>/.vite/hot.json
- create correct
- require Node.js 22
4.0.0-alpha.2 - 2023-12-12
@supercharge/env
- add generic methods
Env.get
methods for tightened typesget<R extends string> (key: string): R
get<R extends string> (key: string, defaultValue: R): R
- add generic methods
@supercharge/contracts
- allow users to define only selected hashing driver constructros in
HashConfig#drivers
- export a
ViteConfig
interface - extend
ViewConfigBuilder
interface: addwithoutLayout
method - export
RenderableError
andReportableError
interfacesRenderableError
defines therender(error, httpContext)
methodReportableError
defines thereport(error, httpContext)
method
- allow users to define only selected hashing driver constructros in
@supercharge/core
- bypass import cache when dynamically importing routes from file path
- keep the original error as the
cause
when wrapping that error into anHttpError
@supercharge/vite
- create
vite
container binding - add a
ViteConfig
instance wrapping a Vite configuration JS object (will be used by a config/vite.ts file) - throw
InertiaPageNotFoundError
error when a given component is missing - support
attributes
in thevite
Handlebars helper:{{ vite input="resources/js/app.js" attributes='data-turbo-track="reload" async' }}
- create
- bump dependencies
@supercharge/vite
- add Vite
^5.0.0
as a peer dependency
- add Vite
@supercharge/view
- implement
withoutLayout
method onViewConfigBuilder
instance - rename view
engines
folder todrivers
- implement
@supercharge/vite
- require Vite
>=4.0.0
as a peer dependency
- require Vite
@supercharge/view
- rename
HandlebarsCompiler
toHandlebarsDriver
- rename
4.0.0-alpha.1 - 2023-11-18
@supercharge/http
- show requested URL when no route matches
- bump dependencies
- replace
import.meta.resolve
withPath.resolve
becauseimport.meta.resolve
sometimes returns a Promise in Node.js @supercharge/contracts
- update
InputBag#get
to correctly resolve the return type for an available default value
- update
- add missing path references to
tsconfig.json
files of all packages
- bump to Vite 5: this is a breaking change for apps using/requiring Vite 4 (or lower)
4.0.0-alpha.0 - 2023-11-13
@supercharge/contracts
- add
HttpDefaultRequestHeaders
andHttpDefaultRequestHeader
interfaces: these are strict contracts for HTTP headers allowing IntelliSense for individual headers. IntelliSense is not supported on Node.js’sIncomingHttpHeaders
interface because it contains an index signature which opens the interfaces to basically anything … the newly added interfaces are strict for allowed keys - add
HttpRequestHeaders
andHttpRequestHeader
interfaces:HttpRequestHeaders
is an interface to be used by developers for augmentation to add custom, project-specific request headers. For example, this can be used to add headers for rate limiting - add
HashAlgorithms
interface andHashAlgorithm
type:HashAlgorithms
is an interface providing the supported hash algorithms of Node.js v20 for IntelliSense, improving the developer experience when working with hashes
- add
@supercharge/hashing
- add
createHash
method: create a Node.jsHash
instance for a given input - add
md5
method: create a Node.js MD5 hash - add
sha256
method: create a Node.js SHA256 hash - add
sha512
method: create a Node.js SHA512 hash
- add
@supercharge/view
- add
share
method: share data across view templates. This is useful for data like your app name - add
sharedData
method: returns the shared data
- add
- bump dependencies
@supercharge/contracts
StateBag
: addexists
method to determine whether the state bag contains an entrykey
, no matter what value is assigned to the key
@supercharge/contracts
- removed
BodyparserOptions
: useBodyparserConfig
instead - removed
CookieOptions
: useCookieConfig
instead - removed
CorsOptions
: useCorsConfig
instead - removed
HashBuilderOptions
: useHashBuilderConfig
instead - removed
StaticAssetsOptions
: useStaticAssetsConfig
instead
- removed
-
all packages of the framework moved to ESM
-
require Node.js v20
-
@supercharge/manager
- remove
ensureConfig
method: usethis.app.config().ensure()
within a method of yourManager
class instead
- remove
-
@supercharge/contracts
- removed export
RequestHeaderBag
contract. TheRequest
interface uses theInputBag<IncomingHttpHeaders>
instead - removed export
RequestStateData
, useHttpStateData
instead StateBag
: thehas(key)
method now determines whether the value for a givenkey
is notundefined
. If you want to check whether a givenkey
is present in the state bag, independently from the value, use the newly addedexists(key)
methodStateBag
:- the
isMissing(key)
method now determines whether a value for a givenkey
isundefined
(related tohas(key)
, becauseisMissing
is doing the opposite ofhas
) - rename the
add(key, value)
method toset(key, value)
- remove the
add(key, value)
method
- the
- removed export
-
@supercharge/hashing
- removed
bcrypt
package from being installed automatically, users must install it explicitely when the hashing driver should use bcrypt - hashing options require a factory function to return the hash driver constructor
- removed
-
@supercharge/view
- export for the view response changed from
View
toViewResponse
- export for the view response changed from
-
@supercharge/http
- the
RequestHeaderBag
extends theInputBag
which changes the behavior of thehas(key)
method: it returnsfalse
if the stored value isundefined
and returnstrue
otherwise
This pull request switches the parameters of the error report, handle, render method:
- the
-
@supercharge/core
- switch the parameters of the error’s and error handler’s
report
,handle
,render
methods:
// before handle(ctx: HttpContext, error: Error) report(ctx: HttpContext, error: Error) render(ctx: HttpContext, error: Error) // now handle(error: Error, ctx: HttpContext) report(error: Error, ctx: HttpContext) render(error: Error, ctx: HttpContext)
- switch the parameters of the error’s and error handler’s
3.20.4 - 2023-10-15
@supercharge/hashing
- remove exports for
BcryptDriver
andScryptDriver
from the package’s main entrypoint to avoid requiring thebcrypt
package immediately, eventhough the bcrypt driver will not be used
- remove exports for
This release removes exports for the BcryptDriver
and ScryptDriver
hashing drivers from the package’s main entrypoint. The driver exports shouldn’t be used standalone. The export was a convenience for testing and interested people. If you imported the drivers from the packge, please update your code to "deep imports" or "deep requires". Thank you!
3.20.3 - 2023-10-14
- bump dependencies
@supercharge/hashing
- require
BcryptDriver
inside thecreateBcryptDriver
method to only import dependencies when needed. This will support Supercharge to use Bun (the new runtime) because it doesn’t reference a bcrypt_napi bridge
- require
3.20.2 - 2023-08-24
- bump dependencies
@supercharge/session
- use existing session ID (if available) before generating a new one
3.20.1 - 2023-08-02
@supercharge/contracts
- export the
ContainerBindings
as an empty interface for proper module augmentation and declaration merging
- export the
@supercharge/core
- use proper
NodeJS.Signals
types in shutdown handler - support multiple shutdown callbacks
- use proper
@supercharge/manager
- refine error message for invalid drivers to be more precise which manager is missing which method
@supercharge/hashing
- implement missing
HashManager#createScryptDriver
method
- implement missing
3.20.0 - 2023-07-25
@supercharge/contracts
- HTTP input bag:
set
andremove
methods return thethis
instance for seamless chaining - export a
RequestStateData
interface. This interface can be extended in your project to define custom properties in the current request state (shared usingrequest.state().share()
)
declare module '@supercharge/contracts' { export interface RequestStateData { requestId: string } }
- export a
ContainerBindings
interface. This interface can be extended in your project to define custom container bindings (bound usingapp.bind(<binding-name>)
orapp.singleton(<binding-name>)
)
declare module '@supercharge/contracts' { export interface ContainerBindings { 'router': HttpRouter } }
- HTTP input bag:
@supercharge/hashing
- add
scrypt
driver based on Node.js’ integratedscrypt
crypto methods
- add
@supercharge/http
- export a base
Middleware
- HTTP routes expose a
toJSON
method - HTTP route collection expose a
toJSON
method - HTTP input bag change the visibility of the
attributes
property fromprivate
toprotected
- export a base
@supercharge/session
- add
file
driver that stores sessions in files on local disc
- add
- add ESLint to the root of the project
- bump dependencies
- remove
.eslintrc.js
file from every package (to only use the root ESLint config)
3.19.0 - 2023-03-11
@supercharge/vite
- support Vite 4.x
- bump dependencies
3.18.0 - 2023-01-18
@supercharge/database
- add
connections()
method returning all activeKnex
connections - service provider: implement the
shutdown
method closing all connections on application shutdown
- add
3.17.0 - 2023-01-14
@supercharge/contracts
- expose methods for
HttpRoute
:path
,methods
,handler
,run
- add missing
Route.group(prefix, callback)
typing - expose
ApplicationCtor
type
- expose methods for
@supercharge/core
- create typed
Application
instance - load environment-specific
.env.<environment>
file if existing - support multiple path arguments in:
app.configPath(...paths)
app.resourcePath(...paths)
app.storagePath(...paths)
app.databasePath(...paths)
- create typed
- bump dependencies
@supercharge/manager
- add index signature to support
this[methodName]
accessors
- add index signature to support
@supercharge/env
Env.get()
now returns an empty string for unavailable environment variables instead of'undefined'
3.16.1 - 2022-12-06
@supercharge/contracts
- update re-exports to support module augmentation when using
declare module '@supercharge/contracts' { … }
in packages
- update re-exports to support module augmentation when using
3.16.0 - 2022-12-06
@supercharge/core
- add
report
andrender
placeholder methods toHttpError
allowing users to override them when needed
- add
@supercharge/view
- register
response.view
method as a macro
- register
@supercharge/http
- register Koa-Router’s
allowedMethod
middleware - register a middleware that ensures a route is found, throw a 404 Not Found error otherwise
- register Koa-Router’s
- bump dependencies
@supercharge/contracts
- export all interfaces from the root
index.ts
instead of individualindex.ts
files in the foldes. Hopefully this fixes typing issues with module augmentation when extending the@supercharge/contracts
module like@supercharge/session
does (by adding arequest.session()
method to the request interface) - HTTP
response.redirect().back()
returnsthis
instead ofvoid
allowing you to chain further method calls and return the redirect
- export all interfaces from the root
@supercharge/core
- error handler: the wrapped HTTP errors keeps the stack trace from the original error
- error handler: change the visibility of instance properties from
private
toprotected
- HTTP error: implement
report
andrender
placeholder methods. Subclasses then know of their existence and may override them
@supercharge/http
response.redirect().back()
returnsthis
instead ofvoid
allowing you to chain further method calls and return the redirect instance
@supercharge/container
container.forgetInstance(namespace)
throws an error when the givennamespace
is falsy
@supercharge/view
view.exists(<template>)
ensures the file extension is appended to thetemplate
if not already present
@supercharge/http
response.view
is moved to a macro registered by the@supercharge/view
package (see "Added" section of this version)
3.15.0 - 2022-11-16
@supercharge/session
- add flash message support
- add
session.put
method: alias forsession.set
- add
session.push
method: push the givenvalue
onto a session array stored for the givenkey
. - add
session.flash
method: save a flash message in the format ofsession.flash(key, value)
orsession.flash({ key: value })
- add
session.reflash
method: reflash all flash messags in the session to the next request usingsession.reflash()
. You can reflash selected messages usingsession.reflash('key', 'another-key')
- add
session.token
method: returns the CSRF token - add
session.regenerateToken
method: regenerate a new CSRF token and store it in the session - add and export
VerifyCsrfTokenMiddleware
: a middleware to store CSRF tokens in the session and verify them on requests
@supercharge/container
- add
container.forgetInstance
method: delete an existing singleton instance and recreate it when requested viamake
- add
- bump dependencies
@supercharge/container
alias(namespace, alias)
method: require thenamespace
andalias
parameters when adding an alias for a binding
- remove Node.js 19 from the testing matrix because it’s failing tests in CI that we can’t reproduce locally
3.14.0 - 2022-11-01
- added Node.js 19 to the testing matrix (besides v16 and v18)
@supercharge/application
- register the error handler class provided to
Application#withErrorHandler
as an alias forerror.handler
- register the error handler class provided to
@supercharge/contracts
- add
ignore(error: ErrorConstructor)
method to error handler
- add
@supercharge/core
- error handler: implement
ignore
method (see changesin@supercharge/contracts
) allowing users to define errors which should be ignored by the error handler - error handler: support (async)
report
method allowing you to implement your own error reporting - error handler: support (async)
render
method allowing you to implement your own error rendering
- error handler: implement
@supercharge/http
- wrap the route processing in a dedicated error handling middleware
- bump dependencies
@supercharge/database
- migrate tests from
tap
to UVU withexpect
- refined return types for the static
findById
anddeleteById
methods - refined error messages
- clean up database SQLite testing fixture files after running the tests
- migrate tests from
@supercharge/http
- move error handling middleware to a dedicated
HandleErrorMiddleware
class
- move error handling middleware to a dedicated
@supercharge/database
orFail
: fixed result check in the query builder properly determining whether a query should fail
3.13.0 - 2022-10-15
@supercharge/core
- add
HttpKernel#prepare
method: run the configured bootstrappers but don’t register configured middleware or load routes. This is helpful during testing when you want to create an empty HTTP kernel and register your functionality using the given environment and config files - add
HttpKernel#isNotBootstrapped
method: determine whether the HTTP kernel’sbootstrap
has not been called
- add
@supercharge/http
- add
Server#clearRoutes
method: remove all routes from the HTTP server. This can only be done before callingserver.callback()
, otherwise the routes are registered to the underlying Koa instance and can’t be removed - add
RouteCollection#clear
method: removes all registered routes from the collection - add
RouteCollection#count
method: returns the number of registered routes from the collection
- add
3.12.0 - 2022-10-10
@supercharge/core
- clear the require cache when registering a callback that loads routes from a given file path. This is required during testing because the route facade uses different app instances during tests and the app instance wouldn’t be resolved properly when not clearing the require cache before loading routes
3.11.2 - 2022-10-10
@supercharge/contracts
- add missing and refresh build outputs
3.11.1 - 2022-10-10
@supercharge/contracts
:- add
Env.boolean(key, defaultValue?)
method to env store contract
- add
3.11.0 - 2022-10-10
@supercharge/env
:- add
Env.boolean(key, defaultValue?)
method: returns the given environment variable identified bykey
as a boolean value
- add
@supercharge/facades
:- don’t cache instance and always resolve from container
@supercharge/contracts
:- refine
ApplicationConfig
and make version optional - refine
ViewConfig
and make driver type'handlebars' | string
- refine
@supercharge/core
:- the default error handler won’t use Youch in production which exposed way too much data
3.10.0 - 2022-10-09
- run tests on Windows
@supercharge/contracts
:- export
ApplicationConfig
contract - export
HttpConfig
contract - export
DatabaseConfig
contract - export
BodyparserConfig
contract - export
CorsConfig
contract - export
StaticAssetsConfig
contract - export
LoggingConfig
contract - export
ViewConfig
contract
- export
- bump dependencies
@supercharge/core
:- structure contracts and move
Application
contract fromcore
toapplication
- structure contracts and move
@supercharge/http
:- configure Koa HTTP server instance to use the added
runsBehindProxy
config determining whether the app runs behind a proxy server (like nginx, Apache, Caddy, or any other) - pass the
HttpConfig
while creating the HTTP Server instead of resolving them when needed
- configure Koa HTTP server instance to use the added
@supercharge/vite
:- refine tests to successfully pass on Windows
@supercharge/contracts
:- fix typing for
raw
Koa HTTP context inHttpContext
interface
- fix typing for
@supercharge/application
:- use posix path when resolving path for glob (because Windows path with backslashes are not supported, only posix paths are supported)
@supercharge/contracts
:- deprecate
CorsOptions
in favor ofCorsConfig
- deprecate
BodyparserOptions
in favor ofBodyparserConfig
- deprecate
StaticAssetsOptions
in favor ofStaticAssetsConfig
- deprecate
3.9.1 - 2022-09-26
@supercharge/vite
:- use string value instead of RegEx to replace the
__supercharge_vite_placeholder
URL for the DevServer
- use string value instead of RegEx to replace the
3.9.0 - 2022-09-25
@supercharge/vite
:- support
input
hash in{{vite input="resources/js/app.js"}}
Handlebars helper
- support
- bump dependencies
@supercharge/vite
:- build correct URL for CSS import in JS/TS file
3.8.1 - 2022-09-19
@supercharge/vite
:- set
assetsInlineLimit
to0
by default which disables inlining assets altogether
- set
@supercharge/vite
:- use
@supercharge/strings
to replace all Vite dev server URL placeholder strings which is more reliant than JavaScript’s<string>.replace(/…/g, …)
- use
3.8.0 - 2022-09-19
@supercharge/env
:- add
.number
method: returns the given environment variable as a number
- add
@supercharge/core
:- use Youch to render an error view instead of falling back to JSON
- bump dependencies
@supercharge/env
:Env.set()
returnsthis
to fluently chain calls
@supercharge/core
:- change visibility of selected methods in the
ErrorHandler
frompublic
toprotected
- register the "log error" reportable inside the base
register
method allowing users to overwrite this behavior
- change visibility of selected methods in the
@supercharge/vite
:- register Vite view helpers in the service provider’s
boot
method (instead ofregister
) which makes sure theview
container binding is available - refactor the Supercharge Vite plugin to use functions instead of being a class-based plugin. This refactoring is necessary because Vite makes
this
point tovoid
which throws an error for any reference likethis.propery
- register Vite view helpers in the service provider’s
3.7.1 - 2022-08-22
- bump dependencies
@supercharge/contracts
:- refined types for
StateBag#get
when providing a default value
- refined types for
@supercharge/http
:- use lodash
merge
instead of thedeepmerge
package - remove
deepmerge
dependency
- use lodash
3.7.0 - 2022-08-22
@supercharge/hashing
: a new package providing hashing support based on the bcrypt algorithm@supercharge/contracts
:- export hashing contracts
- add
merge
method toStateBag
contract
@supercharge/facades
:- add
Hash
facade for the hashing service
- add
@supercharge/http
:StateBag
class: addmerge
method
- bump dependencies
@supercharge/contracts
:- extend
StateBag#get
contract: adddefaultValue
as an optional, second parameter
- extend
@supercharge/http
:StateBag
class:add
method supports nested keysadd
method merges nested fields instead of overriding themhas
method supports nested keysremove
method supports nested keysisMissing
method supports nested keys
@supercharge/http
:StateBag
class:has
method correctly handles falsy valuesisMissing
method correctly handles falsy values
3.6.0 - 2022-08-17
@supercharge/vite
: SSR support via thessr
andssrOutputDirectory
options
- bump dependencies
3.5.0 - 2022-08-11
@supercharge/vite
: Vite plugin and package- exposes a Vite plugin for the Supercharge framework
- registers a
vite
view helper to generate script and stylesheet tags
<html> <head> {{{ vite "resources/js/app.js" }}} </head> </html>
@supercharge/view
- add
registerHelper(name, helperDelegateFunction)
method: register a view helper dynamically in a service provider (for example in community packages) - add
registerPartial(name, content)
method: register a partial view dynamically in a service provider (for example in community packages) - add
hasPartial(name)
method: determine whether the view engine has a partial view with the givenname
- add
hasHelper(name)
method: determine whether the view engine has a view helper with the givenname
- add
@supercharge/contracts
- expose
Application#register(provider: ServiceProvider)
method (which was already implemented in@supercharge/application
) - add
Htmlable
contract
- expose
@supercharge/support
- export
HtmlString
class implementing theHtmlable
contract
- export
- bump dependencies
@supercharge/application
publicPath(...paths)
method now supports multiple paths. This allows us to use something likeapp.publicPath('foo/bar')
andapp.publicPath('foo', 'bar')
resolving to the same pathpublic/foo/bar
3.4.0 - 2022-07-27
@supercharge/contracts
- extend
HttpResponse
contract (with the methods below in@supercharge/http
) - add
onBooting
method toApplication
contract
- extend
@supercharge/http
- add
response.getPayload()
method: returns the currently assigned response payload - add
response.hasStatus(<code>)
method: determine whether the response has a given statuscode
- add
response.isOk()
method: determine whether the response has the status code200 OK
- add
response.isEmpty()
method: determine whether the response has one of the status codes204 No Content
or304 Not Modified
- add
@supercharge/application
- add
onBooting
method: register a callback that runs when the app boots
- add
- bump dependencies
@supercharge/http
- update
request.isMethod(<method | method-array>)
method: support an array as the argument determining whether the request’s method is one of the given candidates (e.g.request.isMethod(['GET', 'POST']) // true
) - lowercase all header names before accessing them from request headers (Node.js lowercases all request headers)
- update
3.3.0 - 2022-07-23
@supercharge/contracts
- extend
Application
contract by adding thewithErrorHandler
method
- extend
@supercharge/view
- add
registerPartial(name, content)
method: register a partial view dynamically in a service provider (for example in community packages)
- add
@supercharge/http
- add
request.protocol()
method: returns the URL protocol - add
request.queryString()
method: returns the URL’s query string as a string value - add
request.isXmlHttpRequest()
method: is an alias forisAjax
(see next line) - add
request.isAjax()
method: determine whether the request is a result of an AJAX call - add
request.isPjax()
method: determine whether the request is a result of an PJAX call - add
request.isPrefetch()
method: determine whether the request is a result of a prefetch call - add
request.fullUrl()
method: returns the full URL including including protocol, host[:port], path, and query string
- add
- bump dependencies
3.2.0 - 2022-07-19
@supercharge/contracts
- export
HttpRequestCtor
interface which can be used when resolving the'request'
constructor binding from the container - export
HttpResponseCtor
interface which can be used when resolving the'response'
constructor binding from the container
- export
@supercharge/session
- use the
HttpRequestCtor
interface
- use the
@supercharge/http
- add
response.getStatus()
method: returns the HTTP response status code - add
response.isRedirect(statusCode?: number)
method: determine whether the response is an HTTP redirect (optionally checking for the givenstatusCode
) - make
Response
macroable allowing users to decorate the response with custom functions
- add
- bump dependencies
3.1.0 - 2022-07-17
@supercharge/http
state().clear()
method: clear all items from the shared state
@supercharge/application
: moveApplication
class to a dedicated package@supercharge/encryption
: add encryption package@supercharge/facades
:- add
Crypt
facade for the encrypter service
- add
- bump dependencies
3.0.0 - 2022-06-20
@supercharge/session
: a Supercharge session package@supercharge/http
ctx()
method: added to request and response. Allows you to access the HTTP context from the related instanceuseragent()
method: retrieve the client’s user agent from the request instance- make
Request
macroable allowing users to decorate the request with custom functions - add
InteractsWithState
trait to the HTTP request InteractsWithState
trait returns a state bag instead of a plain object (please check the breaking changes)
@supercharge/config
- add
isEmpty(key)
method: determine whether the config store contains an item for the givenkey
with is empty - add
isNotEmpty(key)
method: determine whether the config store contains an item for the givenkey
with is not empty - add
ensureNotEmpty(key)
method: throws an error if the config store contains an item for the givenkey
which has an empty value
- add
@supercharge/manager
- change visibility of methods to
protected
allowing extending classes to call them
- change visibility of methods to
- bump dependencies of all packages
-
Require Node.js v16. Drop support for Node.js v12 and v14
-
@supercharge/contracts
- the exported
HttpMethods
type only exports HTTP methods in uppercase
- the exported
-
@supercharge/http
- instances using the
InteractsWithState
trait (HTTP context/request/response) return a state bag instead of a plain JS object
// before const state = request.state() // after const stateBag = request.state() stateBag.all() // returns the full shared state JS object stateBag.get(key) stateBag.add(key, value) // add key-value-pair stateBag.add({ key: value}) // add an object containing key-value-pairs
- instances using the
2.0.0-alpha.10 - 2022-05-08
@supercharge/database
- bump dependencies
- refine typings for Model methods
findById
anddeleteById
2.0.0-alpha.9 - 2022-03-01
@supercharge/console
- bump dependencies
@supercharge/container
- refine container contracts: retrieve the resolved type when using a class in
make
- refine container contracts: retrieve the resolved type when using a class in
@supercharge/http
- refine input bag contracts: detect whether the
get
method retrieves a default value - make
request.payload<T>()
generic allowing developers to define a request payload type
- refine input bag contracts: detect whether the
2.0.0-alpha.8 - 2022-01-15
@supercharge/contracts
- extend the HTTP kernel contract with additional methods
@supercharge/database
- add static
Model.deleteById
method
- add static
@supercharge/http
- use a
CookieBag
to set response cookies - refactor the
CookieBag#set(key, value, cookieBuilder)
method to support acookieBuilder
as the third argument - all classes from
@supercharge/routing
are now part of this ``@supercharge/http` package - exports all classes from the previous
@supercharge/routing
package - add
request.isMethodCacheable
andrequest.isMethodNotCacheable
methods - add
logger()
method to HTTP controller - add
request.contentLength()
method
- use a
- bump dependencies
@supercharge/contracts
- refine typings of
ParameterBag#get
method
- refine typings of
@supercharge/database
- bump to Objection.js 3.0
- remove duplicated model method
Model.findById
in base model - remove not needed
Model.findByIdOrFail
method (see breaking changes)
@supercharge/routing
is now merged into the@supercharge/http
package
@supercharge/core
- removed
app.debug()
method
- removed
@supercharge/database
- remove
Model.findByIdOrFail()
method- use query builder chain instead:
Model.findById().orFail()
- use query builder chain instead:
- remove
2.0.0-alpha.7 - 2021-10-12
- this release is also required to publish the updated packages because of an NPM outage: https://status.npmjs.org/incidents/wy4002vc8ryc
@supercharge/core
- add a
kernel.server()
method to the HTTP kernel providing the server instance - expose a
kernel.serverCallback()
bootstrapping the HTTP kernel and returning theserver.callback()
method.
- add a
@supercharge/config
- refine generic contract for
config.get<T>()
- refine generic contract for
2.0.0-alpha.6 - 2021-10-11
@supercharge/config
config.get<T>(key, defaultValue)
now supports a generic return typeT
@supercharge/contracts
- add
HttpServer
contract
- add
@supercharge/http
- the HTTP
Server
class implements theHttpServer
contract - HTTP server: expose a
server.callback()
method that is useful for testing and compatible with Node.js’ native HTTP server
- the HTTP
@supercharge/core
- add a
kernel.server()
method to the HTTP kernel providing the server instance - expose a
kernel.serverCallback()
bootstrapping the HTTP kernel and returning theserver.callback()
method.
- add a
- bump dependencies
2.0.0-alpha.5 - 2021-09-29
@supercharge/contracts
- extend the container types to resolve classes when passed to as a namespace
- extend the HTTP
Request
contract, added methods:request.hasPayload()
request.setPayload()
request.rawPayload()
request.setRawPayload()
request.isContentType(...types)
request.contentType()
request.req()
: returns the raw Node.js requestrequest.all()
: returns the merged request payload, query parameters, and filesrequest.input()
: retrieve a single request inputrequest.files()
request.setFiles()
@supercharge/http
- added
HeaderBag
,ParameterBag
,FileBag
classes to provide helpful methods to access request input - add bodyparser middleware replacing the previously used
koa-body
- add
booted
method to theHttpKernel
class - call the
register
method of theHttpKernel
to register “booted” callbacks - add request
CookieBag
to to retrieve cookies from the incoming request - implement the new HTTP request methods
- added
@supercharge/container
- add handling to bind and resolve classes as the namespace in the container
- bump dependencies
@supercharge/contracts
- use
Record<string, any>
as types forrequest.params
andrequest.query
- use
@supercharge/core
- use
HttpError
class from@supercharge/errors
as base class - removed
bootstrap
method fromHttpKernel
- use
@supercharge/http
- refactor the HTTP Server to properly initialize and save the server instance
@supercharge/routing
- add comments to
RouteCollection
- refine comments of
Router
methods - internal refinements of the
RouteCollection
- add comments to
@supercharge/http
- the properties
request.query
,request.params
, andrequest.headers
return an input bag instead of an object
// before const query = request.query const params = request.params const headers = request.headers // after const query = request.query().all() const params = request.params().all() const headers = request.headers().all()
- rename exported middlewares:
HandleCors
->HandleCorsMiddleware
VerifyCsrfToken
->VerifyCsrfTokenMiddleware
ServeStaticAssets
->ServeStaticAssetsMiddleware
- the properties
2.0.0-alpha.4 - 2021-07-09
- add npm scripts
clean
to remove all node_modules folders from managed packagesfresh
to freshly bootstrap all packages
- bump dependencies
@supercharge/database
- add
sqlite3
as a default dependency - move to sqlite for testing
- removed mysql NPM devDependency
- add
@supercharge/view
- fix
append
helper to properly pass through the appended content stack
- fix
2.0.0-alpha.3 - 2021-06-28
@supercharge/http
- the
response.redirect().to(<path>)
method now returns the redirect instance (instead ofvoid
) - support a callback to customize the view config as the second or third argument in
response.view(template, data | viewBuilder)
- refine types of
request.headers
to use theIncomingHttpHeaders
interface
- the
@supercharge/view
- add handlebars helpers:
append
,prepend
- add handlebars helpers:
@supercharge/contracts
- add npm script
dev
to watch and compile the contracts
- add npm script
@supercharge/view
- update the
async render(template, data, config?)
method to require the seconddata
parameter
- update the
@supercharge/routing
- handle HTTP redirect responses properly without throwing a response error
2.0.0-alpha.2 - 2021-06-25
@supercharge/http
- created a base controller
- refined lerna configuration to bootstrap without lock files
@supercharge/contracts
and@supercharge/routing
- refine types for route groups allowing strings (representing the path to a route file)
@supercharge/contracts
- refine types for application booting callbacks allowing
unknown
instead ofvoid
- refine types for application booting callbacks allowing
@supercharge/http
- refine typings for request properties (moving to
Record<K, V>
)
- refine typings for request properties (moving to
- remove
CHANGELOG.md
files from the individual packages (leaving only this changelog as a central place)
2.0.0-alpha.1 - 2021-06-23
- full framework rewrite in TypeScript and bringing some new ideas and architecture to the project
1.0.0-beta0.1 - 2019-02-23
- move required packages from
devDependencies
todependencies
(package.json
) - set publish config in
package.json
to public (required for scoped packages)
First beta release 🚀 🎉