Skip to content

feat: add pretty print support for known custom class instances - #16315

Merged
kgryte merged 3 commits into
stdlib-js:developfrom
impawstarlight:feature/repl-pretty-print-scalars
Oct 27, 2026
Merged

kgryte merged 3 commits into
stdlib-js:developfrom
impawstarlight:feature/repl-pretty-print-scalars

Conversation

@impawstarlight

Copy link
Copy Markdown
Member

Resolves none.

Description

What is the purpose of this pull request?

This pull request:

  • Adds support for pretty printing 64-bit integers and complex numbers in REPL

Related Issues

Does this pull request have any related issues?

No.

Reference Packages

Did the content of this pull request follow one or more existing packages? Answering is optional.

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Sample output:
Screenshot_20261023_011701

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

N/A.


@stdlib-js/reviewers

@impawstarlight
impawstarlight requested a review from a team October 25, 2026 16:08
@stdlib-bot stdlib-bot added REPL Issue or pull request specific to the project REPL. Needs Review A pull request which needs code review. labels Oct 25, 2026
@stdlib-bot

stdlib-bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
repl $\\color{red}18743/25392$
$\\color{green}+0.00\\%$
$\\color{red}887/1163$
$\\color{red}-0.09\\%$
$\\color{red}217/464$
$\\color{red}-0.22\\%$
$\\color{red}18743/25392$
$\\color{green}+0.00\\%$

The above coverage report was generated for the changes in this PR.

@impawstarlight impawstarlight changed the title feat: add pretty print support for Int64, Uint64, and Complex instances feat: add pretty print support for Int64, Uint64, and Complex instances Oct 26, 2026
Signed-off-by: Athan <kgryte@gmail.com>
kgryte
kgryte previously approved these changes Oct 27, 2026

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Refactored to move away from a grab bag function whose description, etc, needs to be updated each time we add support for some new type.

E.g., we could add support for Slice and MultiSlice.

Comment thread lib/node_modules/@stdlib/repl/lib/drain.js Outdated
Comment thread lib/node_modules/@stdlib/repl/lib/drain.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte

kgryte commented Oct 27, 2026

Copy link
Copy Markdown
Member

As the CI failure is not due to changes introduced in this PR, I'll go ahead and merge.

@kgryte kgryte changed the title feat: add pretty print support for Int64, Uint64, and Complex instances feat: add pretty print support for known custom class instances Oct 27, 2026
@kgryte
kgryte merged commit 63fa046 into stdlib-js:develop Oct 27, 2026
9 of 13 checks passed
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 27, 2026
@impawstarlight
impawstarlight deleted the feature/repl-pretty-print-scalars branch October 28, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

REPL Issue or pull request specific to the project REPL.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants