Skip to content

fix: clean up stale .yaml adapter files from older versions (#953)#986

Merged
jackwener merged 2 commits intomainfrom
fix/stale-yaml-cleanup
Apr 13, 2026
Merged

fix: clean up stale .yaml adapter files from older versions (#953)#986
jackwener merged 2 commits intomainfrom
fix/stale-yaml-cleanup

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

Fixes #953 — users upgrading from v1.6.x see dozens of "Ignoring YAML adapter" warnings on every run.

  • Old versions (pre-1.7.0) shipped adapters as .yaml files and copied them to ~/.opencli/clis/
  • v1.7.0+ migrated all adapters to .js, but the hash-based sync only tracks .js files
  • Stale .yaml files in ~/.opencli/clis/ were never cleaned up, causing persistent warnings

Adds a cleanup step (3b) in fetch-adapters.js that removes .yaml/.yml files from user adapter directories when the corresponding site exists in the official package. Same pattern as the existing stale .ts cleanup (step 3).

Test plan

  • 1490 unit tests pass
  • Manual: create fake .yaml files in ~/.opencli/clis/hackernews/, run OPENCLI_FETCH=1 node scripts/fetch-adapters.js, verify they are removed

Users upgrading from v1.6.x retain .yaml adapter files in
~/.opencli/clis/ that trigger "Ignoring YAML adapter" warnings on
every run. The hash-based sync only tracks .js files, so these
legacy .yaml files are never cleaned up.

Add a cleanup step (3b) that removes .yaml/.yml files from user
adapter directories when the corresponding site exists in the
official package (i.e., the site has been migrated to .js).
@jackwener jackwener merged commit 988ed19 into main Apr 13, 2026
11 checks passed
@jackwener jackwener deleted the fix/stale-yaml-cleanup branch April 13, 2026 05:17
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]: 每次运行opencli都会报警告,升级到1.7.0版本就会这样,1.6.9不会这样子

1 participant