Skip to content
This repository was archived by the owner on Mar 14, 2026. It is now read-only.

Update dependency chalk to v5 - #31

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/chalk-5.x
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/chalk-5.x

Conversation

@renovate

@renovate renovate Bot commented Jan 13, 2026

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
chalk 4.1.2 → 5.6.2 age confidence

Release Notes

chalk/chalk (chalk)

v5.6.2

Compare Source

  • Fix vulnerability in 5.6.1, see: #​656

v5.6.0

Compare Source

  • Make WezTerm terminal use true color a8f5bf7

v5.5.0

Compare Source


v5.4.1

Compare Source

v5.4.0

Compare Source

  • Update CIRCLECI environments to return level 3 color support f838120

v5.3.0

Compare Source

v5.2.0

Compare Source

v5.1.2

Compare Source

v5.1.1

Compare Source

  • Improved the names of exports introduced in 5.1.0 (#​567) 6e0df05
    • We of course preserved the old names.

v5.1.0

Compare Source

v5.0.1

Compare Source

  • Add main field to package.json for backwards compatibility with some developer tools 85f7e96

v5.0.0

Compare Source

Breaking
  • This package is now pure ESM. Please read this.
    • If you use TypeScript, you need to use TypeScript 4.7 or later. Why.
    • If you use a bundler, make sure it supports ESM and that you have correctly configured it for ESM.
    • The Chalk issue tracker is not a support channel for your favorite build/bundler tool.
    • It's totally fine to stay on Chalk v4. It's been stable for years.
  • Require Node.js 12.20 fa16f4e
  • Move some properties off the default export to individual named exports:
    • chalk.Instance → Chalk
    • chalk.supportsColor → supportsColor
    • chalk.stderr → chalkStderr
    • chalk.stderr.supportsColor → supportsColorStderr
  • Remove .keyword(), .hsl(), .hsv(), .hwb(), and .ansi() coloring methods (#​433) 4cf2e40
  • The tagged template literal support moved into a separate package: chalk-template (#​524) c987c61
-import chalk from 'chalk';
+import chalkTemplate from 'chalk-template';

-chalk`2 + 3 = {bold ${2 + 3}}`;
+chalkTemplate`2 + 3 = {bold ${2 + 3}}`;
Improvements

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions

Copy link
Copy Markdown

Renovate PR Review Results

⚖️ Safety Assessment: ❌ Not Safe

🔍 Release Content Analysis

Major Breaking Changes:

  • ESM-only migration: Chalk v5 is a pure ESM (ECMAScript Module) package and no longer supports CommonJS require() syntax
  • Minimum Node.js version requirement increased from >=10 to >=12.17.0 / >=14.13 / >=16.0.0
  • Several API methods removed: .keyword(), .hsl(), .hsv(), .hwb(), .ansi()
  • Restructured exports: chalk.Instance → Chalk, chalk.supportsColor → supportsColor, chalk.stderr → chalkStderr
  • Tagged template literal support moved to separate chalk-template package
  • Dependency elimination: No longer has external dependencies (bundled internally)

Security Fixes:

  • v5.6.2 fixed a critical security vulnerability in v5.6.1 where malicious code was injected via compromised npm account
  • The malware targeted cryptocurrency transactions in browser environments

Improvements:

  • Install size reduced to less than half of v4
  • True color support for GitHub Actions, Kitty terminal, WezTerm, and Ghostty
  • New overline style added
  • Better Deno compatibility

🎯 Impact Scope Investigation

Usage Analysis:
The codebase uses chalk in the CLI component (/cli directory) across 5 files:

  • cli/commands/execute.js:3 - Uses const chalk = require('chalk')
  • cli/commands/ppman_commands/install.js:1 - Uses const chalk = require('chalk')
  • cli/commands/ppman_commands/list.js:1 - Uses const chalk = require('chalk')
  • cli/commands/ppman_commands/spec.js:1 - Uses const chalk = require('chalk')
  • cli/commands/ppman_commands/uninstall.js:1 - Uses const chalk = require('chalk')

Critical Issue Identified:
All chalk imports in the codebase use CommonJS syntax (require('chalk')), but chalk v5 is ESM-only and does not support require(). This will cause immediate runtime failures.

Additional Dependencies:
The package-lock.json shows that upgrading to v5 removes these dependencies:

  • ansi-styles (no longer needed, bundled internally)
  • supports-color (no longer needed, bundled internally)
  • has-flag (transitive dependency, removed)

Module System Status:

  • The CLI package.json does NOT have "type": "module" configured, meaning it's using CommonJS by default
  • Current Node.js version (v18.20.8) meets the minimum requirement for chalk v5
  • No test suite exists for the CLI to catch these breaking changes

💡 Recommended Actions

DO NOT MERGE this PR in its current state. The following migration work is required:

  1. Convert CLI to ESM (Major refactoring required):

    • Add "type": "module" to cli/package.json
    • Replace all const chalk = require('chalk') with import chalk from 'chalk'
    • Replace all other require() statements with import statements:
      • fs → import fs from 'fs'
      • path → import path from 'path'
      • ws → import WebSocket from 'ws'
      • minimatch, semver, etc.
    • Update exports declarations to ESM syntax
    • Change file extensions to .mjs OR ensure package.json has "type": "module"
    • Test all CLI commands thoroughly
  2. Alternative: Stay on Chalk v4:

    • Given the CLAUDE.md guidance that this is a code execution engine with stability as a priority
    • Chalk v4.1.2 is stable and receives security updates
    • No critical security issue exists in v4 (the v5.6.1 vulnerability was only in v5)
    • Consider closing this PR and pinning chalk to v4.x until ESM migration can be planned
  3. If Proceeding with Migration:

    • Create comprehensive tests for all CLI commands before migration
    • Verify compatibility with yargs v16.2.0 (may need update for ESM)
    • Update documentation for any breaking changes in CLI usage
    • Consider this a breaking change requiring a major version bump for piston-cli

🔗 Reference Links

Generated by koki-develop/claude-renovate-review

@renovate
renovate Bot force-pushed the renovate/chalk-5.x branch from 390ff7e to 83a80d1 Compare January 19, 2026 17:48
@renovate
renovate Bot force-pushed the renovate/chalk-5.x branch from 83a80d1 to 3831518 Compare February 2, 2026 19:01
@renovate
renovate Bot force-pushed the renovate/chalk-5.x branch from 3831518 to b42e31e Compare February 17, 2026 15:15
@renovate
renovate Bot force-pushed the renovate/chalk-5.x branch from b42e31e to 75c3fe6 Compare March 5, 2026 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

0 participants