- Add Docker build and healthcheck test script (
scripts/docker-healthcheck-test.sh) - Add conditional GitHub Actions workflow that validates the Docker image on Dockerfile changes
- Add Docker-compatible env file (
.env.docker-test) for container-based testing
- Replace LocalStack with fauxqs for local AWS service emulation (SQS/SNS)
- Add
AbstractSnsSqsConsumerbase class mirroringAbstractRabbitMQTopicConsumerpattern - Add
sqsClient,snsClient,stsClient, andsnsConsumerErrorResolverDI registrations - Add sample
UserEventConsumer(SNS->SQS) withuser.createdevent handler - Add fauxqs test helper for embedded library mode in tests
- Migrate to new
opinionated-machineDI patterns:PublicDependenciesmodule augmentation,InferModuleDependencies,InferPublicModuleDependencies - Migrate to unified
buildRestContractfrom@lokalise/api-contracts(replacesbuildGetRouteand other method-specific builders) - Migrate to unified
sendByContractfrom@lokalise/backend-http-client(replacessendByGetRouteand other method-specific senders) - Migrate to unified
buildFastifyRouteandinjectByContractfrom@lokalise/fastify-api-contracts(replacesbuildFastifyPayloadRoute/buildFastifyNoPayloadRouteandinjectGet/injectPost/injectPatch/injectDelete) - Update
awilixto v13,opinionated-machineto v6.10
- Add missing
unhandledExceptionPlugin - Remove the error folder and replace it with
node-core - Clean up unused dependencies
Skip request logging for utility endpoints
Switch to 1.0.0 beta drizzle
Migrate envvars management to envase.
-
Use newer version of OTel instrumentation setup
-
Remove New Relic instrumentation
-
Add optionalDependencies to ensure consistent lockfile regeneration
-
Update dependencies
Remove passing '-' as JWT secret private key to utilize Verify-only mode.
Move OpenAPI spec validation to e2e test.
Improve error logging.
Remove promise wrappers from healthchecks that already relied on synchronous storage, populated asynchronously. This reduces the overhead of healthcheck endpoint and works more reliably in a heavily loaded sytem.
Smoketest script added into CI, now it will start an application and wait for the healthcheck to pass, and shutdown the application, or timeout in 15 seconds.
@lokalise/healthcheck-utils v4.0.1 -> v5.1.0
With this update, we simplified the work with healthcheck wrappers.
Before the wrapper looked like this:
export const redisHealthCheck: HealthChecker = (
app: FastifyInstance,
): Promise<Either<Error, true>> => {
const checkResult = app.diContainer.cradle.healthcheckStore.getHealthcheckResult('redis')
if (checkResult === false) {
return Promise.resolve({
error: new Error('Redis healthcheck not positive in store'),
})
}
return Promise.resolve({ result: true })
}The new wrapper looks like this:
export const redisHealthCheck: HealthChecker = (
app: FastifyInstance,
): Promise<Either<Error, true>> => {
return app.diContainer.cradle.healthcheckStore.getAsyncHealthCheckResult('redis')
}To migrate, you need to replace getHealthcheckResult with getAsyncHealthCheckResult in your healthcheck wrappers.
Another thing that comes with this update is that now the getHealthcheckResult internally doesn't return only true/false, but also an error if the healthcheck failed. This means that you can now return a more descriptive error message in your healthcheck wrappers.