Skip to content

Conversation

@nrayburn-tech
Copy link

@nrayburn-tech nrayburn-tech commented Jul 8, 2025

Fixes #20.

There's a regression when updating to string-width 7.2.0. I'm going to review and possibly create an issue in that repo. This should probably wait until it's resolved, but I wanted to go ahead and create this PR to see if there's any interest in making this change back to the original cliui library.

@nrayburn-tech
Copy link
Author

The regression seems to come from checks added in string-width 7.2.0 to handle zero-width strings differently. I'm not entirely sure if it's a bug in that library as it looks like that change was made pretty intentionally.

Failures are specifically related to when codePoint is 0x20_0B, the zero width space.

sindresorhus/string-width@be33439

@nrayburn-tech
Copy link
Author

Pretty sure that https://github.com/isaacs/jackspeak/blob/main/src/index.ts#L1339-L1388 is where the problem is. I'm not very familiar with the code here, so if somebody else has a solution then feel free to create a separate PR with the relevant changes (or push directly to this branch if you have access). Otherwise, I'll look into a resolution when I have time.

@nrayburn-tech
Copy link
Author

Screenshot of the failures (wasn't sure of a good way to copy/paste the text).

image image

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.

Dependence on "temporary fork" of cliui

1 participant