Skip to content

fix: add missing isLegacy property to Action model test data #1135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: horizon
Choose a base branch
from

Conversation

pcarranzav
Copy link
Member

@pcarranzav pcarranzav commented Jul 25, 2025

Summary

Fixes TypeScript compilation errors in indexer-cli tests by adding the required isLegacy property to Action model test data.

Also adds @graphprotocol/horizon and @graphprotocol/subgraph-service as explicit dependencies to resolve address book issues.

Context

  1. The Action model in indexer-common now requires an isLegacy property, but the test utility in indexer-cli was creating Action records without this property, causing TypeScript compilation errors.

  2. The @graphprotocol/toolshed package requires @graphprotocol/horizon and @graphprotocol/subgraph-service for their address book files, but these weren't declared as dependencies. This caused "Address book path not found" errors when running tests.

Changes

  • Added isLegacy: false to both Action.create() calls in packages/indexer-cli/src/__tests__/util.ts
  • Added @graphprotocol/horizon v0.4.1 and @graphprotocol/subgraph-service v0.4.1 as explicit dependencies to indexer-common
  • Minor linting/formatting adjustments in other files

Test Results

After these changes:

  • indexer-common: All tests pass ✅
  • indexer-agent: All tests pass ✅
  • indexer-cli: TypeScript compilation errors resolved ✅

Note

Adding these packages as explicit dependencies avoids the circular dependency issue discovered in graphprotocol/contracts#1210

🤖 Generated with Claude Code

@github-project-automation github-project-automation bot moved this to 🗃️ Inbox in Indexer Jul 25, 2025
…s explicit dependencies

These packages contain address book files required by @graphprotocol/toolshed
but were not declared as dependencies. Adding them explicitly resolves the
'Address book path not found' errors in tests.

Both packages added at version 0.4.1 (latest).
The newer version of strip-ansi (v7) uses ES modules which causes Jest to fail.
Updated transformIgnorePatterns to transform strip-ansi and ansi-regex modules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🗃️ Inbox
Development

Successfully merging this pull request may close these issues.

1 participant