Releases: alt-javascript/boot
v3.0.7
3.0.7 — 2026-03-26
New feature
-
Cross-cutting middleware pipeline across all 7 HTTP and serverless adapters.
A framework-agnosticMiddlewarePipeline(Koa-style onion compose) is now the
dispatch layer for every adapter — Express, Fastify, Koa, Hono, Lambda, Cloudflare
Workers, and Azure Functions. Any CDI component that declares
static __middleware = { order: N }participates automatically; lower order = outermost.
Three built-in middleware components are registered by every*Starter():
RequestLoggerMiddleware(order 10, logs[METHOD] /path → status (Xms)),
ErrorHandlerMiddleware(order 20, converts throws to structured JSON error responses),
andNotFoundMiddleware(order 30, returns 404 when no route matches). All three are
disableable via config flags (middleware.requestLogger.enabled, etc.) and individually
replaceable via CDI'sconditionalOnMissingBeanpattern.MiddlewarePipeline,
RequestLoggerMiddleware,ErrorHandlerMiddleware, andNotFoundMiddlewareare exported
from@alt-javascript/boot. All duplicatetry/catchand inline 404 blocks have been
removed from adapter internals — they are now handled uniformly by the pipeline.
The normalised request shape{ method, path, params, query, headers, body, ctx }is
consistent across all seven adapters so middleware written once works everywhere. -
Node.js minimum version raised to 20.
Dependencies includingconfig@4.4.1,chokidar@5,listr2@9, andcliui@9
require Node.js ≥ 20. Theenginesfield in all packages has been updated to
"node": ">=20"and the CI matrix now tests 20.x, 22.x, and 24.x only.
Documentation
-
All publishable package READMEs updated. Every adapter README now documents the
middleware pipeline with a built-in component table, a customAuthMiddlewareexample,
and the config flags for disabling built-ins. Core package READMEs (@alt-javascript/cdi,
@alt-javascript/config,@alt-javascript/logger) updated with Spring Framework / SLF4J
attribution tables. Root monorepo README updated with a comprehensive Spring concept
mapping table and the full middleware pipeline quick-start. -
Spring Framework attributed as design collaborator. The
contributorsfield in all
publishable package.json files now credits Spring Framework (VMware/Broadcom) as the
design inspiration and pattern source. A full concept-to-concept mapping table is
included in the root README and each relevant package README.
Examples
example-2-1-servers-expressandexample-3-1-serverless-lambdaupdated to
demonstrate the middleware pipeline end-to-end: a customAuthMiddlewareCDI component
protects routes,RequestLoggerMiddlewarelogs every request, and
ErrorHandlerMiddlewareconverts handler throws to structured error responses.
The Lambda example test suite extended with explicit 401 (no token) and 200
(valid token) assertions.
v3.0.6
3.0.6 — 2026-03-26
New feature
.envfile support in@alt-javascript/config.
ProfileConfigLoadernow discovers and loadsapplication.envand
application-{profile}.envalongside existing JSON/YAML/properties files.
Files are parsed by the newDotEnvParser(bare,export-prefixed, double/single-quoted
values, inline#comments, escape sequences) and wrapped inEnvPropertySourceso relaxed
binding (DB_HOST→db.host,SPRING__DATASOURCE__URL→spring.datasource.url) applies
identically toprocess.envvars. Real environment variables always take precedence over
.envfile values —.envslots betweenprocess.env(layer 2) and profile config files
(layer 4) in the 6-layer property source chain.DotEnvParseris exported from the package
index for direct use.
Documentation
@alt-javascript/configREADME updated. Property source precedence table expanded from
5 to 6 layers to include.envfiles. New## .env Filessection documents the discovery
naming convention, supported format features, relaxed binding table, and the browser
limitation (Node.js only — useEphemeralConfigfor browser targets).
v3.0.5
3.0.5 — 2026-03-25
Bug fix
@alt-javascript/loggerbrowser dist: bare specifier for@alt-javascript/config.
LoggerFactory.jsimports{ config }from@alt-javascript/config. The rollup config
rewrote@alt-javascript/commonto its CDN URL but left@alt-javascript/configas a bare
specifier in the bundle. Any CDN import of the logger ESM bundle failed with a module
resolution error in browser contexts. Fixed by adding@alt-javascript/configto the
esmImportToUrlimports map inrollup.config.js, rewriting it to its CDN URL
(https://cdn.jsdelivr.net/npm/@alt-javascript/config@3/dist/alt-javascript-config-esm.js).
Dist rebuilt and committed.
v3.0.4
3.0.4 — 2026-03-22
New packages
-
@alt-javascript/boot-jsdbc— CDI auto-configuration for SQL persistence via
@alt-javascript/jsdbc. RegistersdataSource,jsdbcTemplate,
namedParameterJsdbcTemplate, andschemaInitializerbeans fromboot.datasource.*config.
ProvidesjsdbcTemplateStarter(),jsdbcStarter(),jsdbcAutoConfiguration(),
DataSourceBuilder(secondary datasources),ConfiguredDataSource, andSchemaInitializer. -
@alt-javascript/flyway— Standalone Flyway-inspired migration engine (no Boot/CDI
dependency). Implements the Flyway OSS feature set (Apache 2.0 attribution): versioned
migrations (V{version}__{description}.sql), CRC32 checksum verification, schema history
tracking (flyway_schema_history),migrate(),info(),validate(),baseline(),
repair(), andclean(). -
@alt-javascript/boot-flyway— CDI starter for@alt-javascript/flyway. Registers a
managedFlywaybean that runsmigrate()during context startup. Reads configuration from
boot.flyway.*. Exposesready()for dependants to await completion (CDI does not await
asyncinit()). Supports custom history table name, baseline-on-migrate, out-of-order
migrations, and secondary datasource wiring viadatasourceBeanoption. -
@alt-javascript/boot-jsnosqlc— CDI auto-configuration for NoSQL persistence via
@alt-javascript/jsnosqlc. RegistersnosqlClientDataSourceandnosqlClientbeans from
boot.nosql.*config. No template layer —Collectionis the high-level API. Provides
jsnosqlcStarter(),jsnosqlcAutoConfiguration(),jsnosqlcBoot(),NoSqlClientBuilder
(secondary clients),ConfiguredClientDataSource, andManagedNosqlClient.
New examples
-
example-5-1-advanced— AOP, application events,BeanPostProcessor, constructor
injection, conditional beans,setApplicationContext, and dev-profile configuration. -
example-5-2-persistence-jsdbc— SQL persistence withjsdbcTemplateStarter();
NoteRepositorybacked byJsdbcTemplate; schema and seed data loaded from
config/schema.sqlandconfig/data.sqlbySchemaInitializer. -
example-5-3-persistence-flyway— Flyway-managed schema evolution: three migration
files (V1table,V2schema change,V3seed data);NoteRepositorycarries no DDL;
Application.run()awaitsmanagedFlyway.ready(). -
example-5-4-persistence-flyway-multidb— Two independent SQL databases in one
ApplicationContext: primary notes DB with its ownJsdbcTemplateand Flyway runner,
secondary tags DB with its own stack and independentmanagedFlywayTagsrunner.
Application awaitsPromise.all([mf.ready(), mft.ready()]). -
example-5-5-persistence-nosql— NoSQL persistence withjsnosqlcBoot();NoteRepository
usesCollectiondirectly (insert,get,update,delete,find,for await...of);
Filter.where().contains()for tag-based queries. -
example-5-6-persistence-nosql-multidb— Two independent NoSQL clients in one context:
nosqlClient(user profiles) andsessionClient(session tokens). Store isolation verified.
New: @alt-javascript/jsdbc-template (CDI-free)
JsdbcTemplateandNamedParameterJsdbcTemplateextracted from CDI dependency.
CDI auto-configuration moved toboot-jsdbc, leavingjsdbc-templatedependency-free.
JsdbcTemplatecan now be used standalone without a CDI context.
Bug fixes
-
ConfiguredDataSource.getConnection()concurrent-init race (boot-jsdbc). When two CDI
beans (e.g.SchemaInitializerandManagedFlyway) both calledgetConnection()during
context startup before either resolved,SingleConnectionDataSourcecreated two separate
in-memory databases, silently discarding the first. Fixed with a promise-mutex
(_connectionPromise) — only one connection is ever created regardless of concurrent callers. -
SchemaInitializerSQL comment stripping (boot-jsdbc). Statements whose first line was
a--comment were silently dropped: the filter!s.startsWith('--')was applied to the
whole chunk after splitting on;, so-- comment\nCREATE TABLE ...was discarded entirely.
Fixed by stripping comment lines per-chunk before filtering empty statements. -
SchemaInitializerasync race (boot-jsdbc).init()is async but CDI does not await
it, so dependent beans could query the database before schema was applied. Fixed by storing
_initPromiseininit()and exposingready()— same pattern asManagedFlyway. -
Duck-type config check in
Boot.detectConfig(). Replacedinstanceof ValueResolvingConfig
guard with ahas()/get()interface check, soProfileAwareConfig,EphemeralConfig, and
any future config types pass through without being unnecessarily wrapped. -
Boot.boot()copy-paste bug:loggerCategoryCacheArg. Assignment read
context.loggerFactoryinstead ofcontext.loggerCategoryCache, so the logger category cache
was never passed through to the boot context. -
Boot.boot()assignment bug:$loggerCategoryCache.$configwas incorrectly assigned
window.loggerCategoryCacheinstead of$loggerCategoryCache. -
@alt-javascript/boot-vue—Boot.boot()not called beforeApplicationContext. The
Vue integration was creatingApplicationContextwithout first callingBoot.boot({ config }),
so the global root was never populated and component wiring failed in CDN/no-build usage.
New features
-
Startup banner inlined into
ApplicationContext. The banner is now a string constant
insideApplicationContext.js— no filesystem access, no async I/O. Works in browser and
Node without modification. Controlled byboot.banner-mode:console(default, matches Spring Boot behaviour) — prints tostdoutlog— routes through the configured@alt-javascript/loggeratinfoleveloff— suppressed entirely
-
Banner version resolved at runtime. The version line (
@alt-javascript/boot :: x.y.z) is
read frompackage.jsonviacreateRequire(import.meta.url). In browser environments it
shows as(browser). -
Banner suppressed in test mode.
Boot.test()injectsbanner-mode: offso test output
stays clean without changes to individual test fixtures.
Config key reference
boot.datasource.*— SQL datasource (primary); secondary viaDataSourceBuilder.create().prefix()boot.flyway.*— Flyway migrations (primary); secondary viaflywayStarter({ prefix })boot.nosql.*— NoSQL client (primary); secondary viaNoSqlClientBuilder.create().prefix()
v3.0.3
3.0.3 — 2026-03-21
Bug fixes
-
Context,Singleton,Prototype,Service,Transient,Property,Scopes
re-exported from@alt-javascript/cdimain entry. These helpers were only accessible via
the deep import@alt-javascript/cdi/context/index.js, which doesn't resolve from a CDN URL.
They are now exported fromcdi/index.jsand included in the ESM bundle, so CDN users can
writenew Context([new Singleton(MyService)])directly. -
ProfileAwareConfigandBrowserProfileResolveradded to the config browser bundle.
Both classes were omitted fromconfig/browser/index.jsdespite being entirely browser-safe.
The config ESM bundle now includes them, enabling the v3 profile pattern from CDN. -
Logger browser bundle excludes Node.js-only classes. The logger rollup previously used
index.jsas its entry point, pullingWinstonLogger,WinstonLoggerFactory,
CachingLoggerFactory,CachingConsole, andMultiLoggerinto the browser bundle.
A newbrowser/index.jsentry exports only the browser-safe subset.
New
@alt-javascript/boot-vueESM dist bundle.boot-vuenow builds and publishes
dist/alt-javascript-boot-vue-esm.js. CDN usage ofcreateCdiAppandcdiPluginworks
without a bundler.
v3.0.2
3.0.2 — 2026-03-21
Bug fixes
@alt-javascript/commonpublishConfig missing. The package was missing
"publishConfig": { "access": "public" }, causing npm to reject the publish with a 402
Payment Required error. Added to match all other scoped packages in the monorepo.
v3.0.1
3.0.1 — 2026-03-21
Bug fixes
-
Browser ESM dist bundles now published. All five browser-facing packages (
common,config,
logger,cdi,boot) now build and publish pre-built ESM bundles todist/. The 3.0.0
release shipped without running the rollup build, sodist/was absent from every published
package and CDN/no-build usage was broken. See Browser Usage. -
@alt-javascript/commonnow published. This package existed in the monorepo at 3.0.0 but
was never actually published to npm. All dependent packages now resolve correctly. -
Application-browser.jsfixed. The dynamicimport('@alt-javascript/cdi/ApplicationContext')
in the browser entry point was not destructuring the module default, causingnew ApplicationContext()
to fail when callingApplication.run()without a pre-built context. Replaced with a static import. -
CI build step added. The npm publish workflow now runs
npm run buildbefore
npm publish --workspaces, so dist bundles are always present at publish time.
Documentation
- Browser Usage rewritten. Covers CDN usage with pre-built ESM bundles
(the recommended no-build path), the CDN bundle URL table, import map requirements, browser
compatibility, local-install-with-import-map as an alternative, and a browser limitations
reference table.
v3.0.0
3.0.0 — 2026-03-18
Complete rewrite as a monorepo with 17 packages. Breaking changes from v2.x.
New packages
@alt-javascript/common— shared kernel (global ref, environment detection)@alt-javascript/jsdbc-template— JsdbcTemplate, NamedParameterJsdbcTemplate, auto-configuration@alt-javascript/boot-express— Express adapter with ControllerRegistrar@alt-javascript/boot-fastify— Fastify adapter@alt-javascript/boot-koa— Koa adapter@alt-javascript/boot-hono— Hono adapter (Web Standards API)@alt-javascript/boot-lambda— AWS Lambda adapter (API Gateway HTTP API v2)@alt-javascript/boot-cloudflare-worker— Cloudflare Workers adapter@alt-javascript/boot-azure-function— Azure Functions adapter@alt-javascript/boot-vue— Vue 3 CDI integration@alt-javascript/boot-alpine— Alpine.js CDI integration@alt-javascript/boot-react— React CDI integration (Context/hooks)@alt-javascript/boot-angular— Angular CDI integration (providers)
Core enhancements
- Auto-discovery: static
__componentclass property for self-registering components - AOP: before/after/around/afterReturning/afterThrowing advice via JS Proxy
- Application events: typed event bus with
ContextRefreshedEvent,ContextClosedEvent - BeanPostProcessor: intercept bean creation for cross-cutting concerns
- Conditional registration:
conditionalOnProperty,conditionalOnClass,conditionalOnMissingBean,conditionalOnProfile - Constructor injection:
__injectstatic property specifies constructor dependencies - Circular dependency detection: fails fast with clear error message and dependency chain
dependsOn: explicit ordering of bean initialization- Primary beans:
primary: trueresolves ambiguous autowiring - Profile-aware config: Spring Boot-aligned file loading with
NODE_ACTIVE_PROFILES - Property source chain: layered precedence (overrides → env → profile files → defaults → fallback)
- YAML and .properties support:
application.yaml,application.propertiesalongside JSON - Startup banner: configurable banner printed during ApplicationContext startup
- Browser profiles:
BrowserProfileResolver— declarative URL-to-profile mapping for browser apps ProfileAwareConfig: profile-specific config overlays for browser environments
Breaking changes
- Monorepo structure — install individual
@alt-javascript/*packages @alt-javascript/commonextracts shared utilities previously duplicated across packagesBoot.boot()global context shape updated- Config
WindowLocationSelectiveConfigreplaced byBrowserProfileResolver+ProfileAwareConfig