Skip to content

fix(output): derive table columns from all row keys - #47

Open
dumanoglu1 wants to merge 1 commit into
ProjectOpenSea:mainfrom
dumanoglu1:fix/table-format-union-columns
Open

fix(output): derive table columns from all row keys#47
dumanoglu1 wants to merge 1 commit into
ProjectOpenSea:mainfrom
dumanoglu1:fix/table-format-union-columns

Conversation

@dumanoglu1

Copy link
Copy Markdown

Summary

  • derive table headers from the union of keys across all array rows instead of only data[0]
  • preserve existing output for homogeneous arrays
  • add a regression test for fields that first appear on later rows

Fixes #46.

Testing

  • npm run test -- test/output.test.ts
  • npm run type-check
  • npx biome check src/output.ts test/output.test.ts

Note: npm run test runs 30 suites successfully, including test/output.test.ts, but 5 existing auth/login suites fail in this local checkout with ERR_REQUIRE_ESM from @opensea/sdk requiring @noble/hashes/sha3.js. This is unrelated to the table formatter change.

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.

--format table silently drops fields that are not present on the first array item

1 participant