Skip to content

Mocking @contentstack/cli-utilities to avoid ESM uuid issues and upgrade cli dependencies - #159

Merged
SakshiKoli-CS merged 14 commits into
mainfrom
staging
May 15, 2026
Merged

Mocking @contentstack/cli-utilities to avoid ESM uuid issues and upgrade cli dependencies#159
SakshiKoli-CS merged 14 commits into
mainfrom
staging

Conversation

@SakshiKoli-CS

Copy link
Copy Markdown
Contributor

test: mock @contentstack/cli-utilities so ESM uuid does not break the test suite
chore: upgrade @contentstack/cli-command and cli-utilities version and remove axios override

AryanBansal-launchand others added 14 commits May 4, 2026 13:21
… deployments with GraphQL integration
Co-authored-by: Venkatesh <venkatesh.gopinath@contentstack.com>
Co-authored-by: anujachordiya-contentstack <anuja.chordiya@gmail.com>
…r handling, and update method names for clarity
chore: upgrade @contentstack/cli-command and cli-utilities version and remove axios override
…nce error handling, and update method names for clarity"
This reverts commit 3b9750a.
…ling and improved error handling"
This reverts commit 9980454.
…previous deployments with GraphQL integration"
This reverts commit ada3a18.
chore: upgrade @contentstack/cli-command and cli-utilities version and remove axios override
test: mock @contentstack/cli-utilities so ESM uuid does not break the test suite
Mocking @contentstack/cli-utilities so ESM uuid does not break the test suite
@SakshiKoli-CS
SakshiKoli-CS requested review from a team as code ownersMay 15, 2026 08:31
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security checks passed

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to unblock the Jest test suite from ESM-related issues (notably via @contentstack/cli-utilities/uuid) by introducing explicit mocks for @contentstack/cli-utilities, while also upgrading CLI dependency versions and adjusting lint/build config.

Changes:

  • Added a centralized Jest mock module for @contentstack/cli-utilities and updated multiple Jest tests to use it.
  • Updated build/lint configuration (TypeScript exclude for src/test/**, ESLint override for test file line length).
  • Upgraded @contentstack/cli-command / @contentstack/cli-utilities and removed the axios override (lockfile updated accordingly).

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
tsconfig.jsonExcludes src/test/** from the TS project (build inputs).
eslint.config.mjsDisables max-len for src/**/*.test.ts files.
src/test/mocks/cli-utilities.tsAdds a shared Jest mock implementation for @contentstack/cli-utilities.
src/util/logs-polling-utilities.test.tsSwitches to the shared cli-utilities mock for Jest.
src/commands/launch/index.test.tsSwitches to the shared cli-utilities mock and refactors instantiation.
src/commands/launch/functions.test.tsAdds cli-utilities mocking via the shared mock module.
src/adapters/github.test.tsReplaces inline cli-utilities mocking with the shared mock module.
src/adapters/file-upload.test.tsReplaces inline cli-utilities mocking with the shared mock module.
src/adapters/base-class.test.tsReplaces inline cli-utilities mocking with the shared mock module.
package.jsonBumps version + upgrades CLI deps + removes axios override.
package-lock.jsonUpdates lockfile to reflect dependency upgrades/removals.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsrc/commands/launch/index.test.ts
Comment threadsrc/util/logs-polling-utilities.test.ts
Comment threadsrc/commands/launch/functions.test.ts
Comment threadsrc/adapters/github.test.ts
Comment threadsrc/adapters/file-upload.test.ts
Comment threadsrc/adapters/base-class.test.ts
@SakshiKoli-CS
SakshiKoli-CS merged commit b7f6b0b into mainMay 15, 2026
10 checks passed
Sign up for freeto 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.

6 participants

@SakshiKoli-CS@Harshi-Shah-CS@rohan-agrawal-cs@chhavi-mandowara-cstk@AryanBansal-launch