Fix/dx 4465 upgrade chalk to v5#2451
Conversation
…tor interactive prompts to use new inquirer syntax
…ting path validation logic
…pdating comments for clarity
…nd update region mock handling
…s types for improved type safety
feat(audit): validate referenced entry content types in entries audit
DX - 3445 Experience import errors when variants reference Lytics audiences
version bump
DX | 02-03-2026 | Release
fix: lockfile updated
file
Modularised repo changes v2
V2 core version bump
…ESM loading. Update imports to use dynamic loading of chalk for improved performance and compatibility.
|
| 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
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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.
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ 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:
✅ BUILD PASSED - All security checks passed |
Summary
Upgrades chalk from
^4.1.2to^5.6.2across the CLI monorepo. Chalk 5 is ESM-only while our build is CommonJS, so a small helper in@contentstack/cli-utilitiesloads chalk via dynamicimport()and caches it; the main CLI preloads it in the init hook, and all packages usegetChalk()from utilities instead of importing chalk directly.Changes
chalkto^5.6.2in 9 packages (contentstack, contentstack-utilities, contentstack-audit, contentstack-branches, contentstack-clone, contentstack-export, contentstack-import, contentstack-import-setup, contentstack-migration).src/chalk.tswithloadChalk(),getChalk(), andChalkInstance; exported from index.utils-init.ts) now async and callsawait loadChalk()at startup.import chalk from 'chalk'andchalk.usage withgetChalk()from@contentstack/cli-utilitiesin cli and cli-plugins. Template literalschalk`...`→(getChalk())`...`in migration error-helper.ForegroundColorwithForegroundColorNamefrom chalk.docs/chalk-upgrade-team-brief.mdanddocs/chalk-5-migration-guide.mdfor team alignment and migration of Launch/external plugins.Notes
import('chalk')so CommonJS build works.getChalk()from utilities and followdocs/chalk-5-migration-guide.md; no helper or init in plugin repos.