Skip to content

fix(cli): apply --deps.never-bundle by camel-casing dotted flag keys - #1058

Open
dylanpulver wants to merge 1 commit into
rolldown:mainfrom
dylanpulver:fix/cli-deps-dotted-flag-camelcase
Open

fix(cli): apply --deps.never-bundle by camel-casing dotted flag keys#1058
dylanpulver wants to merge 1 commit into
rolldown:mainfrom
dylanpulver:fix/cli-deps-dotted-flag-camelcase

Conversation

@dylanpulver

Copy link
Copy Markdown

AI usage

  • No AI was used in this PR.
  • AI was used: Claude Code + Opus 5
    • I have carefully reviewed the AI-generated content myself.

Description

--deps.never-bundle has been a no-op since the deps namespace rename (7f50966). cac's camelcaseOptionName camel-cases only the first segment of a dotted option name, so the flag parses to deps['never-bundle'] while resolveDepsConfig reads deps.neverBundle. Nothing errors, because the command sets allowUnknownOptions.

On main, with leftpad present in node_modules:

tsdown --deps.never-bundle leftpad   # leftpad inlined into the bundle
tsdown --deps.neverBundle leftpad    # leftpad external
tsdown --external leftpad            # leftpad external (deprecated flag)

Renaming the option to --deps.neverBundle was the alternative. That leaves the kebab spelling silently doing nothing, and the kebab spelling is what docs/reference/cli.md and skills/tsdown/references/ document, so this normalizes the parsed keys and both spellings work.

Normalization is scoped to flags.deps at one level. --env.* is excluded since its keys are user-supplied variable names. A future dotted option in another namespace would need the same handling.

src/cli.test.ts parses through the real cli instance, which required exporting it. The first case fails on main; the other two pin current behavior.

Linked Issues

Additional context

@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit 72781b9
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6a88ad28b09f5f000834f501
😎 Deploy Preview https://deploy-preview-1058--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/tsdown@1058 -D
npm i https://pkg.pr.new/tsdown@1058 -D
yarn add https://pkg.pr.new/tsdown@1058.tgz -D

create-tsdown

pnpm add https://pkg.pr.new/create-tsdown@1058 -D
npm i https://pkg.pr.new/create-tsdown@1058 -D
yarn add https://pkg.pr.new/create-tsdown@1058.tgz -D

@tsdown/css

pnpm add https://pkg.pr.new/@tsdown/css@1058 -D
npm i https://pkg.pr.new/@tsdown/css@1058 -D
yarn add https://pkg.pr.new/@tsdown/css@1058.tgz -D

@tsdown/exe

pnpm add https://pkg.pr.new/@tsdown/exe@1058 -D
npm i https://pkg.pr.new/@tsdown/exe@1058 -D
yarn add https://pkg.pr.new/@tsdown/exe@1058.tgz -D

tsdown-migrate

pnpm add https://pkg.pr.new/tsdown-migrate@1058 -D
npm i https://pkg.pr.new/tsdown-migrate@1058 -D
yarn add https://pkg.pr.new/tsdown-migrate@1058.tgz -D

commit: 72781b9

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