Skip to content

v5.3.0: .aiox-core/package.json dropped ajv-formats but 4 modules still require it — breaks standalone installs #808

Description

@batistasrj

Summary

In v5.3.0, .aiox-core/package.json removed the ajv-formats dependency (present in 5.2.x), but four framework modules still require('ajv-formats'):

  • .aiox-core/quality/metrics-collector.js (line 15)
  • .aiox-core/core/config/config-resolver.js
  • .aiox-core/core/registry/validate-registry.js
  • .aiox-core/product/templates/engine/validator.js

Why CI doesn't catch it

The monorepo root package.json still declares ajv-formats@^3.0.1, so in the repo the module resolves via hoisting and all tests pass. The break only manifests in standalone installs (e.g. a project that vendored .aiox-core/ and syncs via scripts/update-aiox.sh), where npm install inside .aiox-core/ prunes the package.

Repro

# in a project with vendored .aiox-core at v5.3.0
cd .aiox-core && npm install   # prunes ajv-formats (not in package.json)
cd .. && node .aiox-core/cli/index.js --help
# Error: Cannot find module 'ajv-formats'
#   at .aiox-core/quality/metrics-collector.js
#   via cli/commands/metrics → cli/index.js  (CLI fully unusable)

Suggested fix

Re-add "ajv-formats": "^3.0.1" to .aiox-core/package.json (it still ships ajv ^8.17.1, which is the peer these call sites pair with).

Workaround (what we did)

cd .aiox-core && npm install ajv-formats@^3.0.1 — but any subsequent update-aiox.sh run overwrites package.json (upstream-wins) and re-breaks the CLI until the dep is reinstalled.

Environment

  • aiox-core v5.3.0 (synced via .aiox-core/scripts/update-aiox.sh from 5.2.9)
  • Node.js v24.14.0, Linux
  • Standalone/vendored install (no monorepo root package.json)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliCLI tools (bin/, packages/aios-pro-cli/)area: coreCore framework (.aios-core/core/)status: needs-triageAwaiting initial triagestatus: staleNo activity for 30+ days

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions