@bedrock/core
Advanced tools
Changelog
6.3.0 - 2024-11-19
bedrock.shutdown()
call that performs an orderly shutdown and emits
various events. This differs from exit()
and process.exit()
which are
more immediate.bedrock.stopped
event, emitted before bedrock.exit
.bedrock.stop
, bedrock.stopped
, and bedrock.exit
events.bedrock-cli.exit
event. Use bedrock.exit
instead.
If there is use case for this specific event, please file an issue.Changelog
6.2.0 - 2024-10-15
serialize-error@11
. No significant changes are expected.uid-number
package with passwd-user
.Changelog
6.1.0 - 2024-02-12
package.json
Node.js version to 18.x (LTS).Changelog
6.0.0 - 2022-04-28
BedrockError
to bring
it more inline with modern JavaScript errors and common practice and
conventions within bedrock applications. Many of these changes are unlikely
to break existing applications, but they could, so they are listed here.
toObject
conversion now uses serialize-error
internally for
representing error stack traces.BedrockError
, when converted to
an object, now has a type of OperationError
(instead of
bedrock.InternalServerError
. Most bedrock applications do not read
or switch off of this value.BedrockError
is disallowed,
it must be a string. This usage is uncommon and unlikely to impact most
applications.BedrockError
is converted to an object, it includes
both name
and type
(as the same value). The use of name
is preferred,
but type
is preserved for backwards compatibility. Applications that
strictly disallowed additional properties on errors will need to allow the
name
property to be present, but the name
property is built into
JavaScript errors and allowing for additional properties in errors is
common practice such that this change is unlikely to affect many
applications. The type
property may be removed in the future, so
applications should normalize to using name
.isType
, hasType
, hasCauseOfType
have been removed. Use the nullish
coalescing operator and compare against name
instead. Subtle mistakes
can also be made by writing code that is not specific to the location that
particular errors occur in a causal chain, so these functions have been
removed to avoid those problems. These functions are already rarely used in
modern bedrock modules and applications.-
) or
periods (.
). A future version may remove compute config templates entirely;
functions should be used instead for computed configs.config.paths.cache
and config.paths.log
are now listed as
requiring overriding in deployments. This replaces the custom code that would
log a warning if they were not set.commander@9
. An important change is that
bedrock.program
no longer has properties for command line options, those
are accessed via bedrock.program.opts()
instead.
See: https://github.com/tj/commander.js/blob/master/CHANGELOG.mdbedrock.start
more than once will cause an error to be thrown. This
was already not supported and caused non-deterministic broken behavior, this
change just makes it explicit and deterministic (the same clear error is
always thrown).errio
with serialize-error
. Should
not be a breaking change.bedrock.util.callbackify
. Import from node.js util
if needed.bedrock.util.hasValue
.bedrock.util.delay
. Import from npm delay
package
if needed.bedrock.util.uuid
. Import from npm uuid
package
if needed.bedrock.util.w3cDate
.bedrock.util.isObject
.bedrock.util.clone
. Import from npm klona
package
if needed.bedrock.util.boolify
.runOnceAsync
. Use runOnce
instead.