All notable changes to this package are documented here. Format follows Keep a Changelog.
[Unreleased]
[0.1.0] - 2026-09-29
Fixed
deps— every emitted identifier is now a real binding (addendum A3). Reported by a consumer package, where 2 of 329 descriptors were written broken with exit 0 and no warning — caught only by the consumer's test suite, never by--dry-runor--check.- The module
name:is no longer assumed to be the exported JS binding: the real binding is emitted and aliased when they differ (import { mdMod as md }), keepingdeps[i]textually equal todependencies[i]. An alias that would shadow an existing top-level binding leaves the module unresolved instead. - Import parsing now ignores comments (
stripComments, offset-preserving), so a JSDoc usage example is no longer read as an in-scope import. - New emit guard: an identifier that is not imported or declared in the resulting file is reported through the existing skip-and-continue path rather than written.
- The module
Added
-
stripComments(src)— pure, offset- and line-preserving comment blanker (addendum A3); string literals are scanned over but preserved. -
deps— cross-packagepkg_requireresolution (addendum A2). Closes the last office gap:packages/front/office/pdfnow resolves fully, so all five office packages can be generated.- Layer 4: a
pkg_requireNAMESPACE SPREAD (import * as ns from '<pkg>'+...ns.<field>) is followed one hop into the sibling package. The sibling is located through the workspace manifest, its entry is parsed, and the identifiers of its<field>array are the guard. - The sibling binding maps to its public
exportssubpath (exact targets and one-*wildcard patterns); a file absent fromexportsstays unresolved — no private deep path is ever emitted across a package boundary. A binding the sibling itself imports from a package keeps that specifier. - Layers 1/3 generalized from
@awacloud/-scoped to any package specifier: the guard arrays are the safety boundary, not the scope, so the tool serves a workspace whose packages are not named@awacloud/*. - New exports:
resolveWorkspacePackage(name, fromDir)andpublicSubpathFor(pkgDir, file)— both pure, FS-only, and deliberatelynode_modules-free (a workspace symlink can be stale; the root manifest'sworkspacesglobs are the declarative source of truth).
- Layer 4: a
-
deps— consumer-package support. Additive only: existing flags, signatures and exit-code meanings unchanged.--ignore <glob>(repeatable,Bun.Globover the src-relative POSIX path) unioned with the newDEFAULT_IGNORE = ['bundles/prebuilt/**'], so the scan no longer embarks generated prebuilt bundles. Missing value → exit 2.- Static cross-package resolution of
@awacloud/fwdependency names: descriptor-local@awacloud/fw/…imports first (alias-aware), then the package entrymain.jsimport map intersected with itsfw_requireguard. Package code is never imported or executed. - Skip-and-continue: a module with an unresolvable name is skipped entirely
(never a partial
deps), siblings are still written; apply exits 1 with the skip list,--dry-runstays exit 0. - New exports:
filterScan(scanned, srcDir, ignore)(pure),DEFAULT_IGNORE.planDeps/runDepsresults gainunresolved(andignoredonplanDeps).
-
Initial mint of
@awacloud/tool-fw-codegen(fw-tools mutualization). Ports two fw codegen tools logic-verbatim, alongside fw's unchanged originals:registrysubcommand ← fwtools/types/codegen/index.js— generatestypes/registry.generated.d.ts(the module-name → factory instance-type map for@awacloud/fw/typed). Downstream-critical: the office packages bind to it.depssubcommand ← fw's now-deletedtools/codegen-depsone-shot (surviving only as the broken copypackages/front/office/codegen-deps) — injects thedeps: [...]companion field. The repoint target for the office breakage.
-
--pkg <dir>(both subcommands) and--src <dir>(deps) path-resolution seam (default: cwd); the only logic adaptation vs the fw originals. -
Consumes the shared fw-module substrate from
@awacloud/tool-fw-bundler/modlib(devDep@awacloud/tool-fw-bundler: workspace:*) — no re-copiedscan-modules.js. -
Programmatic APIs:
renderRegistry(pkg)(pure, no write),planDeps(seam)/runDeps(seam). -
Frozen
registry/depscall-contract slice (docs/README.md). -
Golden / equivalence + idempotence integration tests: a byte-identical
registrycompare vs the real fw package's committed registry, and a semantic (normalized)depsequivalence check on a fixture. -
auditsubcommand (additive to the frozen contract) ← fwtools/types/audit/index.js— read-only report classifying each module's factory@returnsannotation into LOSSY/INFER/INLINE/TYPED buckets, ranked by dependent count.--lossy-only/--pkg <dir>flags. Programmatic APIs:computeAudit(pkg)(pure, no write) +renderAudit(pkg, opts)(pure text) +runCli(argv). Golden-compare integration test proves byte-identical stdout vs fw's owntypes/auditscript (default and--lossy-onlymodes), plus a fixture-tree bucket/ranking test.
Notes
- fw source is untouched (the fw devDep add,
scriptsrewrite andfilesdrop are deferred, recorded in the migration inventory, not applied here). The office packages are not touched — a later step deletes the brokenoffice/codegen-depscopy.