This package strictly follows Semantic Versioning.
- Fixed compatibility with
node:assert/strict
. (@dmanto)
- Fixed security issue that might allow for session data to be forged.
- Added support for
await using
with TypeScript toUserAgent
,MockUserAgent
andTestUserAgent
classes.
- Fixed a bug where the static file server would use the response code 200 instead of 206 for partial responses. (@dmanto)
- Fixed a bug where
ctx.urlFor()
would not work properly for/
routes. (@dmanto)
- Added support for nested helpers. (@dmanto)
- Added a
tags
namespace for all tag helpers. That meansctx.styleTag()
becomesctx.tags.style()
(everywhere) ortags.style()
(in templates only).
- Fixed built-in templates to not require an internet connection. (@hernan604)
- Added timeout support for
UserAgent
requests. - Added
fragment
option toctx.urlFor()
and related methods.
- Fixed compression bug in proxy helpers.
- Fixed support for multiple views in different formats sharing the same name.
- Added
proxyGet
,proxyPost
andproxyRequest
proxy helpers.
- Added
render:before
hook.
- Added support for
async
functions to be passed toctx.contentFor()
and tag helpers.
- Fixed bug where
ctx.contentFor()
would notawait
promises. - Fixed various promise related inconsistencies in tag helpers.
- Added
onStart
andonStop
methods toApp
class.
- Added support for backend specific extensions, such as common Node.js middleware frameworks.
- Added
backend
property toContext
class.
- Added
command:init
hook.
- Added
textUnlike
method toTestUserAgent
class.
- Added
removeEmpty
method toParams
class. - Added
notEmpty
option toparams
method inContext
class.
- Added support for multiple query parameters sharing the same name to
urlFor
method inContext
class.
- Fixed a bug where the
app:start
hook could not add new command paths.
- Added support for extending the user-agent with async hooks.
- Added
hooks
property andaddHook
method toUserAgent
class.
- Added support for parsing and generating
Link
headers. - Added
getLinks
andsetLinks
methods toHeaders
class.
- Added
clone
,dehop
andremove
methods toHeaders
class.
- Added
labelFor
helper. - Added
MojoRenderOptions
andMojoURLOptions
to exported types for use in plugins. - Improved
ctx.urlFor()
andctx.urlWith()
to throw an exception for missing routes.
- Added TypeScript support to
create-plugin
command (with--ts
option).
- Added
examples/chat.js
WebSocket chat example application. - Added
monthFieldTag
,numberFieldTag
,rangeFieldTag
,telFieldTag
,timeFieldTag
,urlFieldTag
andweekFieldTag
helpers.
- Added
isEmpty
getter toParams
class. - Added
colorFieldTag
,dateFielTag
,datetimeFieldTag
,emailFieldTag
,fileFieldTag
,hiddenFieldTag
,searchFieldTag
andpasswordFieldTag
helpers.
- Added
build:watch
script topackage.json
files generated by thecreate-full-app
command.
- Added
dev
andstart
scripts topackage.json
files generated by thecreate-full-app
command.
- Added support for static assets.
- Added
urlForAsset
method toContext
class. - Added
assetDir
property andassetPath
method toStatic
class. - Added
assetTag
helper. - Added tag attributes to
scriptTag
andstyleTag
helpers.
- Added support for embedding mojo.js applications with
mountPlugin
. - Added support for rewriting
ctx.req.path
. - Added support for relative paths with
ctx.req.basePath
toctx.urlFor
. - Added
app:warmup
application hook.
- Fixed a bug where trying to consume a request body more than once would not result in an exception. (@marcusramberg)
- Fixed types to allow for generics to be used with forms, like
const {foo, bar} = form.toObject<MyData>()
.
- Fixed types to allow for generics to be used with JSON, like
const {foo, bar} = await ctx.req.json<MyData>()
.
- Added support for hiding developer commands from the command list (can be included again with the
--show-all
option).
- Fixed
app.validator.schema()
to throw an exception for invalid schemas. (@carragom)
- Added support for intercepting the command line interface with the
command:before
hook.
- Fixed a bug where the
app:stop
hook was triggered too early with the server command.
- Fixed a bug where
TestUserAgent
would not reset the DOM cache in between requests.
- Added UNIX domain socket support for user-agent and server (HTTP and WebSocket).
- Added
app:start
andapp:stop
application hooks. - Added
suggestedMethod
method toRoute
class. - Added
buttonTo
,checkBoxTag
,formFor
,inputTag
,radioButtonTag
,submitButtonTag
,textAreaTag
andtextFieldTag
helpers. - Added support for
urlFor
options tolinkTo
helper.
First major release.