Skip to content

TypeScript Rewrite: Info command#36

Open
d4mation wants to merge 18 commits into
ENG-219/command-helpfrom
ENG-219/command-info
Open

TypeScript Rewrite: Info command#36
d4mation wants to merge 18 commits into
ENG-219/command-helpfrom
ENG-219/command-info

Conversation

@d4mation

@d4mation d4mation commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

🎫 ENG-219

Reference

  • Info.php — Original PHP command class

Summary

  • Adds the info command that displays project configuration details
  • Shows .puprc settings, version files, workflows, checks, and sync file configurations
  • Includes test coverage for info command

Dependencies

This PR depends on #35 (command-help) being merged first, as it uses output utility tweaks from that PR.

Test plan

  • Verify npx pup info displays project configuration
  • Verify output includes version files, workflows, and check configurations

@d4mation d4mation added the On Hold We're waiting for something. The Pull Request should not be merged. label Feb 11, 2026
@d4mation d4mation changed the base branch from ENG-219/app-bootstrap to ENG-219/command-help February 12, 2026 18:18
d4mation and others added 2 commits February 12, 2026 13:19
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread src/utils/output.ts
Comment on lines +108 to +109
console.log(formatMessage(chalk.yellow(message)));
console.log(formatMessage(chalk.yellow('='.repeat(message.length))));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed while comparing directly to the PHP version. This ensures we're using the exact same colors and making it feel like a very natural transition from the PHP version.

@d4mation d4mation marked this pull request as ready for review February 12, 2026 18:35
The test was only checking for substring matches, not actually
verifying the output was valid JSON. Now it parses the JSON and
compares against the puprc config.
jonwaldstein added a commit that referenced this pull request Jun 5, 2026
🎫 [ENG-222]

## Summary
- Fix bug in `pup info` where the `.puprc` parse check was passing the
filename string `'.puprc'` to `json_decode()` instead of reading the
file contents first, causing it to always report a parse error even for
valid `.puprc` files.

Discovered while working on the TypeScript rewrite of the info command
in #36.

## Test plan
- [x] Run `pup info` in a project with a valid `.puprc` file — should
show ✅ `.puprc - exists`
- [x] Run `pup info` in a project with an invalid `.puprc` file (e.g.
malformed JSON) — should show ❌ `.puprc - exists but could not be
parsed: <error message>`
- [x] Run `pup info` in a project with no `.puprc` file — should show ⚫
`.puprc - does not exist`

[ENG-222]:
https://stellarwp.atlassian.net/browse/ENG-222?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Hold We're waiting for something. The Pull Request should not be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants