Remove more old dependencies#6
Merged
GrahamCampbell merged 3 commits intomainfrom Apr 23, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Removes several external runtime dependencies (chalk, supports-color, strip-ansi, p-limit) by replacing them with internal utilities and Node built-ins, while updating CLI/log styling to remain stream-aware.
Changes:
- Added internal ANSI color utilities (
src/utils/colors.js+color-keywords.js) and updated CLI/log reporters to use stdout/stderr-specific palettes. - Replaced
p-limitdependency with a local implementation (src/utils/p-limit.js) and wired it into components/state storage. - Replaced
strip-ansiusage withnode:util.stripVTControlCharactersand added/updated unit tests for the new behavior.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/src/utils/serverless-utils/log-reporters/node/style.test.js | Adds coverage ensuring node log reporter styles use stderr palettes. |
| test/unit/src/utils/p-limit.test.js | Adds unit tests for the new internal concurrency limiter. |
| test/unit/src/utils/colors.test.js | Adds coverage for the new internal color-level detection and formatting. |
| test/unit/src/state/S3StateStorage.test.js | Extends tests to ensure queued writes continue after a failed write. |
| test/unit/src/load.test.js | Switches ANSI stripping implementation to Node built-in utility. |
| test/unit/src/components-service.test.js | Adds a test ensuring max concurrency is honored for parallel commands. |
| test/unit/src/cli/format-output.test.js | Switches ANSI stripping implementation to Node built-in utility. |
| test/unit/src/cli/colors.test.js | Adds tests for stdout/stderr CLI palette exports. |
| test/unit/src/cli/Progresses.test.js | Adds tests for visible-width ellipsis/wrapping/height limiting. |
| test/unit/src/cli/Output.test.js | Adds test verifying stdout/stderr palettes are applied correctly per stream. |
| test/unit/src/Context.test.js | Switches ANSI stripping implementation to Node built-in utility. |
| src/utils/serverless-utils/lib/log-reporters/node/style.js | Replaces chalk/supports-color styling with internal stderr color palette. |
| src/utils/serverless-utils/lib/log-reporters/node/log-reporter.js | Reads stderr color support level from internal palette instead of supports-color. |
| src/utils/p-limit.js | Introduces local p-limit replacement used by core modules. |
| src/utils/colors.js | Introduces internal ANSI color formatting + color support detection. |
| src/utils/color-keywords.js | Adds CSS keyword RGB table (used by colorize). |
| src/state/S3StateStorage.js | Swaps dependency p-limit to local implementation. |
| src/index.js | Uses stderr CLI palette for error-path “verbose logs available” message. |
| src/handle-error.js | Uses stderr palette for details + consistent red styling for Error header. |
| src/cli/colors.js | Replaces chalk with stream-specific palettes built from internal colors utility. |
| src/cli/Progresses.js | Uses stderr palette + Node’s VT stripping instead of strip-ansi. |
| src/cli/Output.js | Splits stdout vs stderr styling and switches to Node’s VT stripping. |
| src/Context.js | Uses stderr palette for progress footer message. |
| src/ComponentsService.js | Swaps dependency p-limit to local implementation. |
| package.json | Removes chalk, supports-color, strip-ansi, and p-limit dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.