Skip to content

improvement(sim-cli): upgrade commander 15, chalk 6 and babel 8 - #10350

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/sim-cli-dependency-majors
Nov 23, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/sim-cli-dependency-majors

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • commander ^11.1.0 → ^15.1.0 in packages/sim-cli, plus the root devDependency the CLI docs generator uses to walk the same command tree
  • chalk 5.6.2 → 6.0.1 in packages/sim-cli
  • @babel/parser / @babel/types 7.29.x → 8.1.2 in @sim/workflow-code and @sim/workspace-code, and the root @babel/parser the audit scripts use. Upgrading the root too means the CLI bundle carries one parser copy instead of two
  • apps/sim stays on Babel 7: its executor parses user function code (syntax check, TS strip, the request AST walk), and that runtime behaviour is out of scope here
  • workflow-code: Babel 8 types a member's object as Expression | Super, so I added an isMemberAccess guard in babel.ts and typed chain roots as MemberExpression['object']. I dropped the 'Import' hint case, which Babel 8 no longer emits (dynamic import is always ImportExpression)
  • audits: check-source-conventions now reads TSImportType.source, which Babel 8 renamed from argument; without this the audit crashes. I also dropped the Babel 7 Import-callee branches from it, check-sql-date-binding and check-test-patterns

Versions and breaking changes (npm registry + upstream changelogs)

  • commander 15.1.0 (latest, 2026-11-07)
    • ESM-only (15). Explicit allowExcessArguments(false) was already everywhere (13). No duplicate flags or commands (12)
    • The --x/--no-x pairs are all positive-first, so their default stays undefined (15). No storeOptionsAsProperties or combineFlagAndOptionalValue
    • The private _hidden/_actionHandler fields read by search, docs and inventory are still present
    • Help text across all 480 commands is identical once whitespace is normalized. Only the line-wrap points move: 13's boxWrap fills the full width
  • chalk 6.0.1 (latest)
    • 6.0.0's only breaking change is requiring Node 22, which matches the CLI's >=22
    • With the 22.18 floor, styleText respects TTY / NO_COLOR / FORCE_COLOR and is stable, but its coloured output is not byte-identical to chalk's, so I kept chalk:
      • For an empty string, styleText emits an open/close pair where chalk emits nothing.
      • Around \n and \r\n, chalk closes and reopens the style on each line, while styleText lets one span cross the break. The CLI styles such strings (dim('\nWaiting…'), dim(${message}\n)).
      • Piped output is plain and identical under both.
  • Babel 8.1.2
    • 8.0.0 was released 2026-06-16. 8.1.3 (2026-11-20) is inside this repo's 7-day minimumReleaseAge, and its parser fixes are error-recovery and Flow edge cases
    • AST changes that touch this code: MemberExpression.object may be Super, ImportExpression, TSImportType.source. Parser options in use (errorRecovery, allowReturnOutsideFunction, allowSuperOutsideMethod, typescript) are unchanged in meaning for these inputs
    • Babel 8 declares Node ^22.18.0 || >=24.11.0, and commander 15 declares >=22.12.0. The CLI, @sim/workflow-code, @sim/workflow-sdk and @sim/workspace-code now declare ^22.18.0 || >=24.11.0, matching the strictest bundled dependency. The README and CLI install docs say so, and the publish workflow smoke-tests the packed bundle on Node 22.18.0, the floor

Type of Change

  • Improvement (dependency upgrade)

Testing

  • Type-check: every gate workspace plus root type-check
  • Package suites: sim-cli (1123), workflow-code (789), workspace-code (164), workflow-sdk (53), workflow-persistence, table-cells, utils
  • apps/sim units (12,249), realtime units, apps/sim integration (both DBs), and test:scripts (1011)
  • Goldens (check:workflow-code-golden), check:audits (incl. check:cli-docs, check:sim-cli-bundle), check:test-types, check:migrations, docs compatibility, lint, and check-block-registry against staging
  • Babel 8 against Babel 7:
    • The nine Babel-based audits print identical output on both, including the baselined counts
    • check-source-conventions.test.ts goes red under Babel 8 with the old TSImportType.argument read and green with the fix
    • Parsing a 0.8 MB declaration takes about the same time on 7 and 8
  • Built the CLI bundle and smoke-tested --version, --help and unknown-command errors on Node 22.19

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 23, 2026 19:58
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 23, 2026 8:32pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Upgrades Commander and Chalk for the CLI, and Babel for workflow code, workspace code, and repository scripts.

  • The Sim CLI uses newer command and color libraries and requires a newer Node.js version.
  • Workflow and workspace code now read Babel 8 expression trees.
  • Repository audits now read Babel 8 import nodes.

Reviews (2) · Last reviewed commit: "improvement(sim-cli): require node ^22.1..." · Reviewed by Greptile

- commander ^11.1.0 -> ^15.1.0 (sim-cli and the root docs generator that walks its command tree)
- chalk 5.6.2 -> 6.0.1 (sim-cli)
- @babel/parser and @babel/types 7.29.x -> 8.1.2 in workflow-code and workspace-code, and the root
  parser the audit scripts use, so the CLI bundle carries one parser copy; apps/sim keeps 7 for the
  executor's own parse of user function code
- workflow-code: Babel 8 types a member's object as Expression | Super; add an isMemberAccess guard
  and type chain roots as MemberExpression['object']; drop the 'Import' callee hint case Babel 8 no
  longer produces
- audits: read TSImportType.source (Babel 8 rename) and drop the Babel 7 Import-callee shapes
…dled babel 8 and commander 15

- engines.node in sim-cli, workflow-code, workflow-sdk and workspace-code
- README and CLI install docs state the new floor
- the publish workflow smoke-tests the packed bundle on node 22.18.0, the floor
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the improvement/sim-cli-dependency-majors branch from 60fd371 to cbfd599 Compare November 23, 2026 20:27
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 17 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 01188e2 into staging Nov 23, 2026
98 of 99 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/sim-cli-dependency-majors branch November 23, 2026 20:34

This branch was successfully deployed

1 active deployment
Preview — cbfd5996 Deployed Nov 23, 2026 by vercel[bot]
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.

1 participant