Repository navigation
chore: modernize for Node 12+, remove unused deps, fix bugs (v3) - #23
Merged
Merged
Conversation
- Drop support for Node < 12 and remove array.prototype.flat polyfill (eliminates a large transitive dependency tree; closes #17, #18) - Remove unused grapheme-splitter dependency (closes #20) - Fix undeclared `result` variable in ANSI parsing (closes #21) - Pass all CLI options (including breakword / errorChar) correctly - Replace Grunt test runner with plain Mocha - Update yargs, strip-ansi, and devDependencies - Clean up source style, use String.repeat, native Array.flat - Refresh README with options table and 3.0.0 breaking changes - Bump version to 3.0.0 Note: GitHub Actions CI workflow omitted from this PR because the token lacks the `workflow` scope; can be added in a follow-up. Behavior of the public API for previously supported inputs is preserved; all existing unit tests pass.
Runs the test suite on a matrix of supported Node versions on every push and pull request to master/main.
- Expand test matrix with 24.x (Active LTS) and 26.x (Current) - Upgrade actions/checkout and actions/setup-node to v5 (Node 24 runtime) to silence Node 20 deprecation warnings on the runner - Print node --version so the resolved runtime is visible in logs
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernization release addressing open issues #17, #18, #20, and #21.
array.prototype.flatpolyfill (large transitive dependency reduction)grapheme-splitterdependencyresultvariable in ANSI parsingbreakword,errorChar, etc.)yargs,strip-ansi, and devDependenciesString.repeat, nativeArray.flat, consistent quotes)Public wrapping behavior for previously supported inputs is intentionally preserved.
Test plan
npm test— 25 passingecho "宽字符" | smartwrap -w 2)Closes #17
Closes #18
Closes #20
Closes #21