Skip to content

fix: remove strip-ansi runtime dependency#644

Draft
2409324124 wants to merge 1 commit into
Nano-Collective:mainfrom
2409324124:fix/strip-ansi-runtime-dependency
Draft

fix: remove strip-ansi runtime dependency#644
2409324124 wants to merge 1 commit into
Nano-Collective:mainfrom
2409324124:fix/strip-ansi-runtime-dependency

Conversation

@2409324124

Copy link
Copy Markdown

Description

Fixes #643.

Replaces the runtime strip-ansi import in ansi-truncate with Node built-in stripVTControlCharacters. This keeps the published CLI from requiring a dev-only package at runtime and avoids the ERR_MODULE_NOT_FOUND failure when the package is installed without dev dependencies.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

Automated Tests

  • Regression test added in source/utils/ansi-truncate.spec.ts
  • pnpm test:ava source/utils/ansi-truncate.spec.ts
  • git diff --check HEAD
  • All existing tests pass (pnpm test:all completes successfully)

pnpm test:all was attempted locally, but the current sandbox fails unrelated suites that require local sockets, network access, or subprocess permissions, plus existing model/pricing assertions. The targeted regression test for this fix passes.

Manual Testing

  • Tested with Ollama
  • Tested with OpenRouter
  • Tested with OpenAI-compatible API
  • Tested MCP integration (if applicable)

N/A: this change only removes a runtime ANSI-stripping dependency from a utility module.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
  • Appropriate logging added using structured logging (see CONTRIBUTING.md)

N/A: no logging path was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Cannot find package 'strip-ansi'

1 participant