Skip to content

[finding] create-objectstack has no --package-manager override, so its probe is the only way to choose — while objectstack init next door takes the flag #12042

Description

@os-zhuang

Observation recorded while implementing #11616 (PR #12041). Not folded into that PR: it changes what the tool does for a user, and #11616 was explicitly scoped to changing only what it reports.

What was measured

At 3954fb7df, the two scaffolders in this repo disagree on whether the user may name a package manager at all.

packages/cli/src/commands/init.ts takes an explicit override and falls back to detection only when the flag is absent (init.ts:711 declares it, init.ts:868 consumes it):

chosenPm=(flags['package-manager']astypeofchosenPm|undefined)??detectPackageManager();

packages/create-objectstack/src/index.ts declares exactly two flags — --skip-install and --skip-skills (index.ts:383-384). There is no override. Its probe is the only input, so whatever pnpm --version answers is final.

Why it is worth recording rather than acting on

#11616 made a failed probe say so instead of silently passing itself off as a considered npm choice. That warning now names a situation the user has no flag to answer:

⚠ pnpm is installed but `pnpm --version` failed (<reason>); using npm as a fallback.

It is not a dead end today — --skip-install plus running the install by hand gets there — so this is an asymmetry and a small papercut, not a measured failure. Recording it because the two tools sit one directory apart and read as if they share a contract: scaffold-next-steps-pm.test.ts's own header calls the cli one "the same contract for create-objectstack", which is true of the output it pins and not of the input surface.

The part that needs a decision, not an implementation

The two detectors deliberately answer different questions, and that is defensible rather than drift:

questionmechanism
objectstack initwhich PM invoked menpm_config_user_agent
create-objectstackwhich PM is availablespawned pnpm --version probe

A user running npm create objectstack has an npm user-agent while possibly preferring pnpm, so create-objectstack cannot simply adopt the sibling's strategy. Adding a flag is capability expansion with no measured pull behind it, which the startup scope discipline says to default against — so this is filed as an observation for grading, not as queued work.

Filed unassigned.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions