Skip to content

Fix/dx 4465 upgrade chalk to v5#2451

Open
harshithad0703 wants to merge 47 commits intov2-dev-bugfixfrom
fix/dx-4465-upgrade-chalk-to-v5
Open

Fix/dx 4465 upgrade chalk to v5#2451
harshithad0703 wants to merge 47 commits intov2-dev-bugfixfrom
fix/dx-4465-upgrade-chalk-to-v5

Conversation

@harshithad0703
Copy link
Contributor

Summary

Upgrades chalk from ^4.1.2 to ^5.6.2 across the CLI monorepo. Chalk 5 is ESM-only while our build is CommonJS, so a small helper in @contentstack/cli-utilities loads chalk via dynamic import() and caches it; the main CLI preloads it in the init hook, and all packages use getChalk() from utilities instead of importing chalk directly.

Changes

  • Dependencies: Bumped chalk to ^5.6.2 in 9 packages (contentstack, contentstack-utilities, contentstack-audit, contentstack-branches, contentstack-clone, contentstack-export, contentstack-import, contentstack-import-setup, contentstack-migration).
  • contentstack-utilities: Added src/chalk.ts with loadChalk(), getChalk(), and ChalkInstance; exported from index.
  • contentstack: Init hook (utils-init.ts) now async and calls await loadChalk() at startup.
  • Source: Replaced all import chalk from 'chalk' and chalk. usage with getChalk() from @contentstack/cli-utilities in cli and cli-plugins. Template literals chalk`...`(getChalk())`...` in migration error-helper.
  • Types: In contentstack-audit, replaced deprecated ForegroundColor with ForegroundColorName from chalk.
  • Docs: Added docs/chalk-upgrade-team-brief.md and docs/chalk-5-migration-guide.md for team alignment and migration of Launch/external plugins.

Notes

  • Chalk 5 is ESM-only; the helper uses dynamic import('chalk') so CommonJS build works.
  • Launch and external plugins should use getChalk() from utilities and follow docs/chalk-5-migration-guide.md; no helper or init in plugin repos.

harshithad0703 and others added 30 commits February 20, 2026 13:22
…tor interactive prompts to use new inquirer syntax
feat(audit): validate referenced entry content types in entries audit
DX - 3445  Experience import errors when variants reference Lytics audiences
@harshithad0703 harshithad0703 requested review from a team as code owners March 10, 2026 09:50
@gitguardian
Copy link

gitguardian bot commented Mar 10, 2026

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
27413674 Triggered Generic Password f42ff37 pnpm-lock.yaml View secret
27413675 Triggered Generic Password f42ff37 pnpm-lock.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@github-actions
Copy link

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@harshithad0703 harshithad0703 changed the base branch from v2-beta to v2-dev-bugfix March 10, 2026 10:21
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.

5 participants