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
Controllerclass abstract Controllerclass: addabstract handlemethod definition to transport the information which method needs implementation
- make
@supercharge/vite- create correct
hotFilePathto<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.getmethods for tightened typesget<R extends string> (key: string): Rget<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
ViteConfiginterface - extend
ViewConfigBuilderinterface: addwithoutLayoutmethod - export
RenderableErrorandReportableErrorinterfacesRenderableErrordefines therender(error, httpContext)methodReportableErrordefines 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
causewhen wrapping that error into anHttpError
@supercharge/vite- create
vitecontainer binding - add a
ViteConfiginstance wrapping a Vite configuration JS object (will be used by a config/vite.ts file) - throw
InertiaPageNotFoundErrorerror when a given component is missing - support
attributesin theviteHandlebars helper:{{ vite input="resources/js/app.js" attributes='data-turbo-track="reload" async' }}
- create
- bump dependencies
@supercharge/vite- add Vite
^5.0.0as a peer dependency
- add Vite
@supercharge/view- implement
withoutLayoutmethod onViewConfigBuilderinstance - rename view
enginesfolder todrivers
- implement
@supercharge/vite- require Vite
>=4.0.0as a peer dependency
- require Vite
@supercharge/view- rename
HandlebarsCompilertoHandlebarsDriver
- rename
4.0.0-alpha.1 - 2023-11-18
@supercharge/http- show requested URL when no route matches
- bump dependencies
- replace
import.meta.resolvewithPath.resolvebecauseimport.meta.resolvesometimes returns a Promise in Node.js @supercharge/contracts- update
InputBag#getto correctly resolve the return type for an available default value
- update
- add missing path references to
tsconfig.jsonfiles 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
HttpDefaultRequestHeadersandHttpDefaultRequestHeaderinterfaces: these are strict contracts for HTTP headers allowing IntelliSense for individual headers. IntelliSense is not supported on Node.js’sIncomingHttpHeadersinterface because it contains an index signature which opens the interfaces to basically anything … the newly added interfaces are strict for allowed keys - add
HttpRequestHeadersandHttpRequestHeaderinterfaces:HttpRequestHeadersis 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
HashAlgorithmsinterface andHashAlgorithmtype:HashAlgorithmsis 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
createHashmethod: create a Node.jsHashinstance for a given input - add
md5method: create a Node.js MD5 hash - add
sha256method: create a Node.js SHA256 hash - add
sha512method: create a Node.js SHA512 hash
- add
@supercharge/view- add
sharemethod: share data across view templates. This is useful for data like your app name - add
sharedDatamethod: returns the shared data
- add
- bump dependencies
@supercharge/contractsStateBag: addexistsmethod to determine whether the state bag contains an entrykey, no matter what value is assigned to the key
@supercharge/contracts- removed
BodyparserOptions: useBodyparserConfiginstead - removed
CookieOptions: useCookieConfiginstead - removed
CorsOptions: useCorsConfiginstead - removed
HashBuilderOptions: useHashBuilderConfiginstead - removed
StaticAssetsOptions: useStaticAssetsConfiginstead
- removed
-
all packages of the framework moved to ESM
-
require Node.js v20
-
@supercharge/manager- remove
ensureConfigmethod: usethis.app.config().ensure()within a method of yourManagerclass instead
- remove
-
@supercharge/contracts- removed export
RequestHeaderBagcontract. TheRequestinterface uses theInputBag<IncomingHttpHeaders>instead - removed export
RequestStateData, useHttpStateDatainstead StateBag: thehas(key)method now determines whether the value for a givenkeyis notundefined. If you want to check whether a givenkeyis 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 givenkeyisundefined(related tohas(key), becauseisMissingis 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
bcryptpackage 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
ViewtoViewResponse
- export for the view response changed from
-
@supercharge/http- the
RequestHeaderBagextends theInputBagwhich changes the behavior of thehas(key)method: it returnsfalseif the stored value isundefinedand returnstrueotherwise
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,rendermethods:
// 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
BcryptDriverandScryptDriverfrom the package’s main entrypoint to avoid requiring thebcryptpackage 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
BcryptDriverinside thecreateBcryptDrivermethod 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
ContainerBindingsas an empty interface for proper module augmentation and declaration merging
- export the
@supercharge/core- use proper
NodeJS.Signalstypes 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#createScryptDrivermethod
- implement missing
3.20.0 - 2023-07-25
@supercharge/contracts- HTTP input bag:
setandremovemethods return thethisinstance for seamless chaining - export a
RequestStateDatainterface. 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
ContainerBindingsinterface. 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
scryptdriver based on Node.js’ integratedscryptcrypto methods
- add
@supercharge/http- export a base
Middleware - HTTP routes expose a
toJSONmethod - HTTP route collection expose a
toJSONmethod - HTTP input bag change the visibility of the
attributesproperty fromprivatetoprotected
- export a base
@supercharge/session- add
filedriver that stores sessions in files on local disc
- add
- add ESLint to the root of the project
- bump dependencies
- remove
.eslintrc.jsfile 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 activeKnexconnections - service provider: implement the
shutdownmethod 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
ApplicationCtortype
- expose methods for
@supercharge/core- create typed
Applicationinstance - 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/envEnv.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
reportandrenderplaceholder methods toHttpErrorallowing users to override them when needed
- add
@supercharge/view- register
response.viewmethod as a macro
- register
@supercharge/http- register Koa-Router’s
allowedMethodmiddleware - 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.tsinstead of individualindex.tsfiles in the foldes. Hopefully this fixes typing issues with module augmentation when extending the@supercharge/contractsmodule like@supercharge/sessiondoes (by adding arequest.session()method to the request interface) - HTTP
response.redirect().back()returnsthisinstead ofvoidallowing 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
privatetoprotected - HTTP error: implement
reportandrenderplaceholder methods. Subclasses then know of their existence and may override them
@supercharge/httpresponse.redirect().back()returnsthisinstead ofvoidallowing you to chain further method calls and return the redirect instance
@supercharge/containercontainer.forgetInstance(namespace)throws an error when the givennamespaceis falsy
@supercharge/viewview.exists(<template>)ensures the file extension is appended to thetemplateif not already present
@supercharge/httpresponse.viewis moved to a macro registered by the@supercharge/viewpackage (see "Added" section of this version)
3.15.0 - 2022-11-16
@supercharge/session- add flash message support
- add
session.putmethod: alias forsession.set - add
session.pushmethod: push the givenvalueonto a session array stored for the givenkey. - add
session.flashmethod: save a flash message in the format ofsession.flash(key, value)orsession.flash({ key: value }) - add
session.reflashmethod: 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.tokenmethod: returns the CSRF token - add
session.regenerateTokenmethod: 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.forgetInstancemethod: delete an existing singleton instance and recreate it when requested viamake
- add
- bump dependencies
@supercharge/containeralias(namespace, alias)method: require thenamespaceandaliasparameters 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#withErrorHandleras 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
ignoremethod (see changesin@supercharge/contracts) allowing users to define errors which should be ignored by the error handler - error handler: support (async)
reportmethod allowing you to implement your own error reporting - error handler: support (async)
rendermethod 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
tapto UVU withexpect - refined return types for the static
findByIdanddeleteByIdmethods - 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
HandleErrorMiddlewareclass
- move error handling middleware to a dedicated
@supercharge/databaseorFail: fixed result check in the query builder properly determining whether a query should fail
3.13.0 - 2022-10-15
@supercharge/core- add
HttpKernel#preparemethod: 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#isNotBootstrappedmethod: determine whether the HTTP kernel’sbootstraphas not been called
- add
@supercharge/http- add
Server#clearRoutesmethod: 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#clearmethod: removes all registered routes from the collection - add
RouteCollection#countmethod: 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 bykeyas a boolean value
- add
@supercharge/facades:- don’t cache instance and always resolve from container
@supercharge/contracts:- refine
ApplicationConfigand make version optional - refine
ViewConfigand 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
ApplicationConfigcontract - export
HttpConfigcontract - export
DatabaseConfigcontract - export
BodyparserConfigcontract - export
CorsConfigcontract - export
StaticAssetsConfigcontract - export
LoggingConfigcontract - export
ViewConfigcontract
- export
- bump dependencies
@supercharge/core:- structure contracts and move
Applicationcontract fromcoretoapplication
- structure contracts and move
@supercharge/http:- configure Koa HTTP server instance to use the added
runsBehindProxyconfig determining whether the app runs behind a proxy server (like nginx, Apache, Caddy, or any other) - pass the
HttpConfigwhile 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
rawKoa HTTP context inHttpContextinterface
- 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
CorsOptionsin favor ofCorsConfig - deprecate
BodyparserOptionsin favor ofBodyparserConfig - deprecate
StaticAssetsOptionsin favor ofStaticAssetsConfig
- deprecate
3.9.1 - 2022-09-26
@supercharge/vite:- use string value instead of RegEx to replace the
__supercharge_vite_placeholderURL for the DevServer
- use string value instead of RegEx to replace the
3.9.0 - 2022-09-25
@supercharge/vite:- support
inputhash 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
assetsInlineLimitto0by default which disables inlining assets altogether
- set
@supercharge/vite:- use
@supercharge/stringsto 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
.numbermethod: 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()returnsthisto fluently chain calls
@supercharge/core:- change visibility of selected methods in the
ErrorHandlerfrompublictoprotected - register the "log error" reportable inside the base
registermethod allowing users to overwrite this behavior
- change visibility of selected methods in the
@supercharge/vite:- register Vite view helpers in the service provider’s
bootmethod (instead ofregister) which makes sure theviewcontainer 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
thispoint tovoidwhich 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#getwhen providing a default value
- refined types for
@supercharge/http:- use lodash
mergeinstead of thedeepmergepackage - remove
deepmergedependency
- 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
mergemethod toStateBagcontract
@supercharge/facades:- add
Hashfacade for the hashing service
- add
@supercharge/http:StateBagclass: addmergemethod
- bump dependencies
@supercharge/contracts:- extend
StateBag#getcontract: adddefaultValueas an optional, second parameter
- extend
@supercharge/http:StateBagclass:addmethod supports nested keysaddmethod merges nested fields instead of overriding themhasmethod supports nested keysremovemethod supports nested keysisMissingmethod supports nested keys
@supercharge/http:StateBagclass:hasmethod correctly handles falsy valuesisMissingmethod correctly handles falsy values
3.6.0 - 2022-08-17
@supercharge/vite: SSR support via thessrandssrOutputDirectoryoptions
- bump dependencies
3.5.0 - 2022-08-11
@supercharge/vite: Vite plugin and package- exposes a Vite plugin for the Supercharge framework
- registers a
viteview 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
Htmlablecontract
- expose
@supercharge/support- export
HtmlStringclass implementing theHtmlablecontract
- export
- bump dependencies
@supercharge/applicationpublicPath(...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
HttpResponsecontract (with the methods below in@supercharge/http) - add
onBootingmethod toApplicationcontract
- 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 Contentor304 Not Modified
- add
@supercharge/application- add
onBootingmethod: 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
Applicationcontract by adding thewithErrorHandlermethod
- 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
HttpRequestCtorinterface which can be used when resolving the'request'constructor binding from the container - export
HttpResponseCtorinterface which can be used when resolving the'response'constructor binding from the container
- export
@supercharge/session- use the
HttpRequestCtorinterface
- 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
Responsemacroable allowing users to decorate the response with custom functions
- add
- bump dependencies
3.1.0 - 2022-07-17
@supercharge/httpstate().clear()method: clear all items from the shared state
@supercharge/application: moveApplicationclass to a dedicated package@supercharge/encryption: add encryption package@supercharge/facades:- add
Cryptfacade for the encrypter service
- add
- bump dependencies
3.0.0 - 2022-06-20
@supercharge/session: a Supercharge session package@supercharge/httpctx()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
Requestmacroable allowing users to decorate the request with custom functions - add
InteractsWithStatetrait to the HTTP request InteractsWithStatetrait 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 givenkeywith is empty - add
isNotEmpty(key)method: determine whether the config store contains an item for the givenkeywith is not empty - add
ensureNotEmpty(key)method: throws an error if the config store contains an item for the givenkeywhich has an empty value
- add
@supercharge/manager- change visibility of methods to
protectedallowing 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
HttpMethodstype only exports HTTP methods in uppercase
- the exported
-
@supercharge/http- instances using the
InteractsWithStatetrait (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
findByIdanddeleteById
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
getmethod 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.deleteByIdmethod
- add static
@supercharge/http- use a
CookieBagto set response cookies - refactor the
CookieBag#set(key, value, cookieBuilder)method to support acookieBuilderas the third argument - all classes from
@supercharge/routingare now part of this ``@supercharge/http` package - exports all classes from the previous
@supercharge/routingpackage - add
request.isMethodCacheableandrequest.isMethodNotCacheablemethods - add
logger()method to HTTP controller - add
request.contentLength()method
- use a
- bump dependencies
@supercharge/contracts- refine typings of
ParameterBag#getmethod
- refine typings of
@supercharge/database- bump to Objection.js 3.0
- remove duplicated model method
Model.findByIdin base model - remove not needed
Model.findByIdOrFailmethod (see breaking changes)
@supercharge/routingis now merged into the@supercharge/httppackage
@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/configconfig.get<T>(key, defaultValue)now supports a generic return typeT
@supercharge/contracts- add
HttpServercontract
- add
@supercharge/http- the HTTP
Serverclass implements theHttpServercontract - 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
Requestcontract, 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,FileBagclasses to provide helpful methods to access request input - add bodyparser middleware replacing the previously used
koa-body - add
bootedmethod to theHttpKernelclass - call the
registermethod of theHttpKernelto register “booted” callbacks - add request
CookieBagto 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.paramsandrequest.query
- use
@supercharge/core- use
HttpErrorclass from@supercharge/errorsas base class - removed
bootstrapmethod 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
Routermethods - internal refinements of the
RouteCollection
- add comments to
@supercharge/http- the properties
request.query,request.params, andrequest.headersreturn 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->HandleCorsMiddlewareVerifyCsrfToken->VerifyCsrfTokenMiddlewareServeStaticAssets->ServeStaticAssetsMiddleware
- the properties
2.0.0-alpha.4 - 2021-07-09
- add npm scripts
cleanto remove all node_modules folders from managed packagesfreshto freshly bootstrap all packages
- bump dependencies
@supercharge/database- add
sqlite3as a default dependency - move to sqlite for testing
- removed mysql NPM devDependency
- add
@supercharge/view- fix
appendhelper 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.headersto use theIncomingHttpHeadersinterface
- the
@supercharge/view- add handlebars helpers:
append,prepend
- add handlebars helpers:
@supercharge/contracts- add npm script
devto watch and compile the contracts
- add npm script
@supercharge/view- update the
async render(template, data, config?)method to require the seconddataparameter
- 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/contractsand@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
unknowninstead 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.mdfiles 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
devDependenciestodependencies(package.json) - set publish config in
package.jsonto public (required for scoped packages)
First beta release 🚀 🎉