Skip to content

fix(cli): remove duplicate argument in npm view commands - #1136

Open
hobostay wants to merge 1 commit into
bytedance:mainfrom
hobostay:fix/cli-npm-view-command
Open

fix(cli): remove duplicate argument in npm view commands#1136
hobostay wants to merge 1 commit into
bytedance:mainfrom
hobostay:fix/cli-npm-view-command

Conversation

@hobostay

Copy link
Copy Markdown

Summary

Fix malformed npm view commands in the CLI create-app tool. The trailing latest argument was being interpreted as a second field name to query, not as a tag flag.

Root Cause

Two npm view commands in apps/cli/src/create-app/index.ts have a duplicate latest argument:

# Before (bug): queries both 'version' AND 'latest' fields
npm view @flowgram.ai/demo-fixed-layout version --tag=latest latest
npm view @flowgram.ai/core version --tag=latest latest

# After (fix): correctly queries only 'version' field  
npm view @flowgram.ai/demo-fixed-layout version
npm view @flowgram.ai/core version

The npm view <pkg> <field1> <field2> syntax queries multiple fields. The trailing latest was being treated as a field name, causing the output to include both the version and an undefined latest field, which could corrupt the version string.

Note: npm view already defaults to the latest tag, so --tag=latest is unnecessary.

Test plan

  • Verify npm view @flowgram.ai/demo-fixed-layout version returns a clean version string
  • Verify npm view @flowgram.ai/core version returns a clean version string

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Test User seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hobostay
hobostay force-pushed the fix/cli-npm-view-command branch from d376f1b to 0150dac Compare May 22, 2026 15:13
@sanmaopep

sanmaopep commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@hobostay please sign the CLA so we can continue to CI
image

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.

3 participants