Skip to content

feat(cli): add update notifier to alert users when a newer version is available#218

Merged
andrevmatos merged 1 commit into
mainfrom
feat/cli-update-notifier-v2
Apr 9, 2026
Merged

feat(cli): add update notifier to alert users when a newer version is available#218
andrevmatos merged 1 commit into
mainfrom
feat/cli-update-notifier-v2

Conversation

@aelmanaa
Copy link
Copy Markdown
Collaborator

@aelmanaa aelmanaa commented Apr 3, 2026

This pull request introduces update notification functionality to the ccip-cli tool, ensuring users are informed when a new version is available. It also updates dependencies and makes minor code cleanups. The most important changes are grouped below:

Update Notification Feature:

  • Added the update-notifier package and integrated it into ccip-cli/src/index.ts to check for CLI updates every four hours and notify the user on process exit, using colorized output for clarity. [1] [2] [3]
  • Added type definitions for update-notifier to development dependencies for improved type safety.

Dependency Management:

  • Moved the @chainlink/ccip-sdk dependency to ensure proper ordering within package.json.

Version Bumps:

  • Updated the hardcoded version strings in both ccip-cli and ccip-sdk to 1.4.2-f874d03 to reflect the latest commit. [1] [2]

Code Cleanups:

  • Removed an unnecessary eslint directive in ccip-sdk/src/evm/errors.ts for cleaner code.

@aelmanaa aelmanaa requested review from a team and PabloMansanet as code owners April 3, 2026 10:23
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 3, 2026

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

Project Deployment Actions Updated (UTC)
ccip-tools-ts Ready Ready Preview, Comment Apr 3, 2026 10:28am

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

👋 aelmanaa, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

Coverage Report

ℹ tests 774
ℹ suites 227
ℹ pass 772
ℹ fail 0
ℹ cancelled 0
ℹ skipped 2
ℹ todo 0
ℹ duration_ms 67248.826751

> @chainlink/[email protected] test
> node --test

▶ lane-latency command
  ✔ should output JSON format correctly (6.767383ms)
  ✔ should resolve chain IDs to chain selectors (0.872629ms)
  ✔ should use custom API URL when provided (0.767552ms)
  ✔ should output log format correctly (1.728076ms)
  ✔ should handle chain IDs as input (1.476694ms)
  ✔ should handle chain selectors as input (0.687251ms)
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (1.504076ms)
  ✔ should work normally when --no-api flag is false (0.845258ms)
  ✔ should forward blockConfirmations to API URL (0.832464ms)
  ✔ should not include numOfBlocks when blockConfirmations is not provided (1.05992ms)
  ▶ CCIP_API environment variable integration
    ✔ should respect CCIP_API=false environment variable (0.839046ms)
  ✔ CCIP_API environment variable integration (1.275185ms)
✔ lane-latency command (22.314149ms)
▶ search messages command
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (3.589483ms)
  ✔ should output JSON format correctly (21.576266ms)
  ✔ should pass sender filter to API (3.513397ms)
  ✔ should pass receiver filter to API (4.614569ms)
  ✔ should resolve source chain to selector (4.081047ms)
  ✔ should resolve dest chain to selector (3.549057ms)
  ✔ should pass manual-exec-only filter to API (3.898035ms)
  ✔ should treat limit 0 as unlimited (7.327976ms)
  ✔ should respect limit parameter (6.783061ms)
  ✔ should warn when no results found (1.262762ms)
  ✔ should use custom API URL when provided (2.553487ms)
  ✔ should warn on negative limit and fall back to default (1.991721ms)
  ✔ should output log format (1.704232ms)
✔ search messages command (68.903701ms)
▶ e2e command show EVM
  ▶ pretty format (default)
    ✔ should show complete CCIP transaction details EVM to EVM (10878.241777ms)
  ✔ pretty format (default) (10879.503343ms)
  ▶ json format
    ✔ should output valid JSON with all expected fields (8139.572753ms)
  ✔ json format (8139.786375ms)
  ▶ log format
    ✔ should output in log format with object assignments (7756.944709ms)
  ✔ log format (7757.285639ms)
  ▶ verbose flag
    ✔ should work with verbose flag enabled (10703.119968ms)
  ✔ verbose flag (10703.354839ms)
  ▶ error handling
    ✔ should handle invalid transaction hash gracefully (6780.584007ms)
    ✔ should require transaction hash argument (1685.625967ms)
  ✔ error handling (8466.518774ms)
  ✔ should show complete CCIP transaction details EVM to Aptos (7077.626034ms)
  ✔ should show complete CCIP transaction details EVM to Solana (5761.16263ms)
✔ e2e command show EVM (58788.916312ms)
▶ e2e command show Solana
  ✔ should show complete CCIP transaction details Solana to EVM (7830.113023ms)
✔ e2e command show Solana (7830.442131ms)
▶ e2e command show Aptos
  ✔ should show complete CCIP transaction details Aptos to EVM (8017.966573ms)
✔ e2e command show Aptos (8018.171738ms)
﹣ e2e command show TON (0.060734ms) # SKIP
▶ formatCCIPError
  ✔ should return null for non-CCIPError instances (1.137386ms)
  ✔ should format CCIPError with code and message (0.472668ms)
  ✔ should include help section with recovery hint (0.150683ms)
  ✔ should include note section for transient errors (0.282481ms)
  ✔ should include retry timing for transient errors with retryAfterMs (0.324961ms)
  ✔ should not include note section for permanent errors (0.169749ms)
  ✔ should format error with structured output (0.190948ms)
  ✔ should include stack trace when verbose is true (0.389182ms)
  ✔ should not include stack trace when verbose is false (0.258816ms)
✔ formatCCIPError (4.836837ms)
ℹ tests 43
ℹ suites 13
ℹ pass 43
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 74854.988196
-------------------------------|---------|----------|---------|---------|---------------------------
File                           | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s         
-------------------------------|---------|----------|---------|---------|---------------------------
All files                      |   74.91 |    76.58 |   60.74 |   74.91 |                           
 ccip-cli/src                  |    86.2 |    63.15 |      75 |    86.2 |                           
  index.ts                     |    86.2 |    63.15 |      75 |    86.2 | ...21-125,131-132,137-142 
 ccip-cli/src/commands         |   52.42 |    71.55 |   51.85 |   52.42 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  lane-latency.ts              |   72.56 |     90.9 |   33.33 |   72.56 | 41-56,63-70,105-111       
  manual-exec.ts               |   26.33 |      100 |       0 |   26.33 | 61-114,121-131,133-260    
  parse.ts                     |   57.14 |      100 |       0 |   57.14 | 46-50,57-64,66-91         
  search.ts                    |   81.25 |      100 |       0 |   81.25 | 24-29                     
  send.ts                      |   16.66 |      100 |       0 |   16.66 | ...72-179,189-218,220-414 
  show.ts                      |   84.69 |    59.32 |      60 |   84.69 | ...90-191,204-217,248-249 
  supported-tokens.ts          |   19.47 |      100 |       0 |   19.47 | ...11-231,233-288,290-303 
  token.ts                     |   22.72 |      100 |       0 |   22.72 | 24-53,60-67,69-132        
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |   85.31 |    73.57 |    92.3 |   85.31 | ...86-596,604-612,622-628 
 ccip-cli/src/commands/search  |   49.39 |    85.29 |   14.28 |   49.39 |                           
  messages.ts                  |   49.39 |    85.29 |   14.28 |   49.39 | ...86-188,190-212,214-249 
 ccip-cli/src/providers        |    51.9 |    75.51 |      16 |    51.9 |                           
  aptos.ts                     |   53.65 |      100 |       0 |   53.65 | ...70,78-85,91-92,101-123 
  evm.ts                       |    39.7 |      100 |       0 |    39.7 | 23,40-50,56-85,97-136     
  index.ts                     |   81.65 |    72.72 |      80 |   81.65 | 50-51,190-229             
  solana.ts                    |   50.42 |      100 |       0 |   50.42 | ...-71,79-85,89-90,99-117 
  sui.ts                       |   64.28 |      100 |       0 |   64.28 | 10-14                     
  ton.ts                       |   14.58 |      100 |       0 |   14.58 | 22-144                    
 ccip-sdk/src                  |   94.38 |    81.81 |    92.4 |   94.38 |                           
  chain.ts                     |   93.25 |    81.33 |   71.42 |   93.25 | ...18,1667-1668,1701-1702 
  commits.ts                   |     100 |    95.23 |     100 |     100 | 52                        
  execution.ts                 |   92.19 |     92.3 |     100 |   92.19 | 130-137,149-156           
  explorer.ts                  |     100 |      100 |     100 |     100 |                           
  extra-args.ts                |     100 |    86.66 |     100 |     100 | 179,214                   
  gas.ts                       |   89.75 |       40 |     100 |   89.75 | 108-119,147-151           
  http-status.ts               |     100 |      100 |     100 |     100 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  messages.ts                  |   88.48 |    45.09 |     100 |   88.48 | ...19-220,229-230,254-255 
  offchain.ts                  |   91.94 |    76.74 |     100 |   91.94 | ...90,208,223-225,227-233 
  requests.ts                  |   90.61 |    82.07 |     100 |   90.61 | ...81-282,350-363,365-369 
  supported-chains.ts          |     100 |      100 |     100 |     100 |                           
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |    96.3 |    89.66 |     100 |    96.3 | ...52,768,869-870,877-885 
 ccip-sdk/src/api              |   93.75 |       85 |   94.11 |   93.75 |                           
  index.ts                     |   93.75 |       85 |   94.11 |   93.75 | ...39-744,755-758,761-764 
 ccip-sdk/src/aptos            |    55.7 |    69.46 |   55.73 |    55.7 |                           
  exec.ts                      |   29.31 |      100 |       0 |   29.31 | 18-58                     
  hasher.ts                    |   76.31 |       80 |   66.66 |   76.31 | 19-38,52-58               
  index.ts                     |    56.4 |       75 |   58.13 |    56.4 | ...26-828,832-858,862-873 
  logs.ts                      |   78.52 |    57.44 |      75 |   78.52 | ...90-196,200-233,264-268 
  send.ts                      |    25.2 |      100 |       0 |    25.2 | 10-51,62-79,92-123        
  token.ts                     |   23.75 |       75 |     100 |   23.75 | 35-156                    
  types.ts                     |   65.62 |      100 |       0 |   65.62 | 25-32,64-88               
 ccip-sdk/src/errors           |   87.33 |    75.94 |   47.96 |   87.33 |                           
  CCIPError.ts                 |     100 |      100 |     100 |     100 |                           
  codes.ts                     |     100 |      100 |     100 |     100 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  recovery.ts                  |     100 |      100 |     100 |     100 |                           
  specialized.ts               |   84.59 |    70.88 |   45.29 |   84.59 | ...12,3333-3342,3363-3372 
  utils.ts                     |   94.44 |    81.48 |     100 |   94.44 | 15,17,22,24               
 ccip-sdk/src/evm              |   83.14 |    74.31 |   88.88 |   83.14 |                           
  const.ts                     |     100 |      100 |     100 |     100 |                           
  errors.ts                    |   84.03 |    78.57 |     100 |   84.03 | ...57-164,170-172,219-237 
  extra-args.ts                |   94.44 |    61.66 |     100 |   94.44 | ...83-184,209-210,326-338 
  fork.test.data.ts            |     100 |      100 |     100 |     100 |                           
  gas.ts                       |   97.97 |    53.33 |     100 |   97.97 | 72-73,75                  
  hasher.ts                    |     100 |     92.3 |     100 |     100 | 134                       
  index.ts                     |   80.47 |       75 |      90 |   80.47 | ...71,2135-2151,2177-2184 
  logs.ts                      |   34.32 |    68.42 |      25 |   34.32 | ...13-214,229-258,275-302 
  messages.ts                  |     100 |      100 |     100 |     100 |                           
  offchain.ts                  |   81.25 |    33.33 |     100 |   81.25 | 11,13-14                  
  types.ts                     |     100 |      100 |     100 |     100 |                           
 ccip-sdk/src/evm/viem         |   77.72 |       92 |   69.23 |   77.72 |                           
  client-adapter.ts            |     100 |     92.3 |     100 |     100 | 48                        
  index.ts                     |     100 |      100 |     100 |     100 |                           
  wallet-adapter.ts            |   63.09 |     90.9 |   55.55 |   63.09 | ...6,53-73,91-124,131-157 
 ccip-sdk/src/hasher           |   94.29 |    78.94 |     100 |   94.29 |                           
  common.ts                    |     100 |      100 |     100 |     100 |                           
  hasher.ts                    |     100 |    66.66 |     100 |     100 | 19                        
  index.ts                     |     100 |      100 |     100 |     100 |                           
  merklemulti.ts               |   93.43 |       78 |     100 |   93.43 | ...59-260,306-307,315-316 
 ccip-sdk/src/shared           |   88.05 |    69.23 |     100 |   88.05 |                           
  bcs-codecs.ts                |   87.87 |    66.66 |     100 |   87.87 | 75-87,104-106             
  constants.ts                 |     100 |      100 |     100 |     100 |                           
 ccip-sdk/src/solana           |   72.61 |    67.29 |   77.01 |   72.61 |                           
  cleanup.ts                   |   26.63 |    66.66 |   33.33 |   26.63 | 43-53,59-101,113-226      
  exec.ts                      |   68.47 |    63.63 |   66.66 |   68.47 | ...66,283-290,433,450-452 
  fork.test.data.ts            |     100 |      100 |     100 |     100 |                           
  hasher.ts                    |   96.58 |    81.81 |     100 |   96.58 | 67-70                     
  index.ts                     |   76.88 |       75 |   78.84 |   76.88 | ...52,1556-1577,1581-1614 
  logs.ts                      |   74.83 |    38.88 |     100 |   74.83 | 38-39,50-51,53-54,56-88   
  offchain.ts                  |   68.88 |    33.33 |     100 |   68.88 | 30-43                     
  patchBorsh.ts                |   78.31 |       50 |     100 |   78.31 | 34-35,41-47,65-66,72-78   
  send.ts                      |    76.5 |    38.09 |      80 |    76.5 | ...71-272,277-285,327-366 
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |   67.41 |    68.96 |   63.63 |   67.41 | ...36-439,442-444,476-491 
 ccip-sdk/src/sui              |   32.62 |    89.47 |   17.24 |   32.62 |                           
  discovery.ts                 |   14.86 |      100 |       0 |   14.86 | 20-36,49-185,188-222      
  events.ts                    |    19.9 |      100 |       0 |    19.9 | ...18-275,280-397,406-427 
  exec.ts                      |   31.29 |      100 |       0 |   31.29 | 31-74,86-131              
  hasher.ts                    |   98.16 |    66.66 |     100 |   98.16 | 33,49                     
  index.ts                     |   40.44 |    93.18 |   17.94 |   40.44 | ...12-813,817-818,822-823 
  objects.ts                   |   18.93 |      100 |       0 |   18.93 | ...04-119,133-184,195-338 
 ccip-sdk/src/sui/manuallyExec |   39.63 |      100 |       0 |   39.63 |                           
  encoder.ts                   |   47.67 |      100 |       0 |   47.67 | 42-86                     
  index.ts                     |   34.35 |      100 |       0 |   34.35 | 46-131                    
 ccip-sdk/src/ton              |   74.68 |    82.05 |   64.78 |   74.68 |                           
  exec.ts                      |     100 |      100 |     100 |     100 |                           
  hasher.ts                    |   77.95 |    77.77 |      75 |   77.95 | 99-107,155-186            
  index.ts                     |   70.77 |    75.86 |   52.27 |   70.77 | ...08,1215-1216,1223-1224 
  logs.ts                      |     100 |    98.43 |     100 |     100 | 56                        
  send.ts                      |   96.49 |    70.83 |     100 |   96.49 | 38-45                     
  types.ts                     |   77.94 |    69.23 |   66.66 |   77.94 | ...-73,91,118-131,133-136 
  utils.ts                     |   60.88 |    83.33 |    87.5 |   60.88 | ...55-261,269-327,329-332 
-------------------------------|---------|----------|---------|---------|---------------------------

@aelmanaa aelmanaa requested a review from andrevmatos April 3, 2026 10:32
@andrevmatos andrevmatos merged commit 419b0ed into main Apr 9, 2026
13 checks passed
@andrevmatos andrevmatos deleted the feat/cli-update-notifier-v2 branch April 9, 2026 10:45
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.

2 participants