Repository navigation
fix: read short flags joined with equals (#118) - #120
Conversation
|
Thanks for this, and for the clear write-up. It's cloudpin's first outside contribution. I checked #118's first to-do item for every CLI that passes a short name to
Two small changes, please:
On timing: #118 is in the 1.3.0 milestone, and |
|
Both changes are in, thanks for the detailed check.
Local verification: |
|
Thanks, both changes look right, and CI is green. I'll merge this after v1.2.0 is tagged on Thursday 2026-10-29 (the release moved up a week). |
|
Okay, got ya. Thanks for the quick review, I'll keep an eye out after the 29th. |
cloudflare.ts: main's profile lookup, with shortEquals on the --env read. The CHANGELOG line moves under [Unreleased]; ROADMAP says done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CHANGELOG keeps both sides' lines under [Unreleased]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Fixes #118.
flagValueinsrc/args.tsonly recognized the=form for long names, because the branch was guarded byname.startsWith("--"). A command such aswrangler deploy -e=productiontherefore looked like it had no--envvalue;cloudflare.resolvefell through to the top-level account orwhoamiinstead of the[env.production]account.The shared reader now accepts
name=valuefor both short and long flag names. Names without=behave exactly as before.Tests
test/args.test.ts: the new test failed before the change withexpected undefined to be 'production'and passes after it.wrangler deploy -e=productionresolves the[env.production]account.npm run typecheck: passed.npm test: 42 files passed, 1067 passed, 7 skipped.npm run build: passed.git diff --check: clean.CLI behavior
Wrangler uses yargs and accepts the short joined form (the failure described in #118). The long form is unchanged. This change only affects names already passed to
flagValue; Azure, AWS, gcloud, GitHub and Supabase continue to pass long names only.AI assistance
This change was prepared with AI coding assistance under the repository's
AGENTS.mdandCONTRIBUTING.mdrules. I reviewed the diff and ran the checks above.