Skip to content

feat: add _tools/repl-txt/wrap-text - #15489

Merged
kgryte merged 13 commits into
stdlib-js:developfrom
headlessNode:repl-lint/no-premature-wrap
Sep 26, 2026
Merged

kgryte merged 13 commits into
stdlib-js:developfrom
headlessNode:repl-lint/no-premature-wrap

Conversation

@headlessNode

@headlessNode headlessNode commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Resolves stdlib-js/metr-issue-tracker#1356.

Description

What is the purpose of this pull request?

This pull request:

  • add _tools/repl-txt/wrap-text

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

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.

No.

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.".

Primarily written by Claude Code.


@stdlib-js/reviewers

@headlessNode
headlessNode requested a review from a team September 24, 2026 08:41
@headlessNode
headlessNode marked this pull request as draft September 24, 2026 08:42
@stdlib-bot stdlib-bot added Tools Issue or pull request related to project tooling. Needs Review A pull request which needs code review. labels Sep 24, 2026
@headlessNode headlessNode added Feature Issue or pull request for adding a new feature. METR Pull request associated with the METR project. labels Sep 24, 2026
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Sep 24, 2026
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/etc/cli_opts.json Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/etc/cli_opts.json Outdated

@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.

Left initial comments.

@kgryte

kgryte commented Sep 24, 2026

Copy link
Copy Markdown
Member

Also, just to be clear, this PR adds a package wrap-text, not the actual lint rule. Presumably that will be added in a follow-up PR?

@headlessNode

Copy link
Copy Markdown
Member Author

@kgryte My initial plan was having the 'wrap-text' logic inside the lint rule but then I felt it could be used somewhere else as well, so decided to make it a separate package. This is all happened in same METR task transcript/context. I think since we can't have the same name METR tasks I'd have to ditch it(lose context) and create two tasks.

@kgryte

kgryte commented Sep 24, 2026

Copy link
Copy Markdown
Member

No need to ditch. Just create a separate follow-up task called "refactor _tools/*" or whatever which then adds the lint rule.

@headlessNode headlessNode changed the title feat: add _tools/repl-txt/rules/no-premature-wrap feat: add _tools/repl-txt/wrap-text Sep 25, 2026
@headlessNode
headlessNode marked this pull request as ready for review September 25, 2026 13:49
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 25, 2026
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/lib/main.js Outdated
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.js

@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.

Let another round of comments.

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Sep 26, 2026
@headlessNode headlessNode removed the Needs Changes Pull request which needs changes before being merged. label Sep 26, 2026
@headlessNode
headlessNode requested a review from kgryte September 26, 2026 06:10
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 26, 2026
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.validate.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.validate.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.validate.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.validate.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.js Outdated
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/lib/main.js Outdated
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/_tools/repl-txt/wrap-text/test/test.js

@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.

Overall, this is looking good. Main thing is making the tests more robust.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Sep 26, 2026
@headlessNode headlessNode removed the Needs Changes Pull request which needs changes before being merged. label Sep 26, 2026
@headlessNode
headlessNode requested a review from kgryte September 26, 2026 09:47
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 26, 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. Let's go ahead and merge and, should any rough edges be discovered when used in the real-world, we can submit follow-up PRs.

@kgryte
kgryte merged commit 81c7584 into stdlib-js:develop Sep 26, 2026
28 checks passed
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Sep 26, 2026
@headlessNode
headlessNode deleted the repl-lint/no-premature-wrap branch September 26, 2026 13:41
@Planeshifter Planeshifter mentioned this pull request Sep 26, 2026
3 of 7 tasks
kgryte pushed a commit that referenced this pull request Sep 26, 2026
PR-URL: #15568
Reviewed-by: Athan Reines <kgryte@gmail.com>
Ref: #15489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue or pull request for adding a new feature. METR Pull request associated with the METR project. review: 3 Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add _tools/repl-txt/wrap-text

3 participants