shouldPromptForNpmFlag() — ui Function Reference
Architecture documentation for the shouldPromptForNpmFlag() function in update-dependencies.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 5f268d56_22ae_d80d_1c66_f0f4a3943411["shouldPromptForNpmFlag()"] 30cdaf3b_9156_5324_145d_5e18169a3338["update-dependencies.ts"] 5f268d56_22ae_d80d_1c66_f0f4a3943411 -->|defined in| 30cdaf3b_9156_5324_145d_5e18169a3338 adc8a174_5629_0978_1252_434223094dbc["updateDependencies()"] adc8a174_5629_0978_1252_434223094dbc -->|calls| 5f268d56_22ae_d80d_1c66_f0f4a3943411 style 5f268d56_22ae_d80d_1c66_f0f4a3943411 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/utils/updaters/update-dependencies.ts lines 76–90
function shouldPromptForNpmFlag(config: Config) {
const packageInfo = getPackageInfo(config.resolvedPaths.cwd, false)
if (!packageInfo?.dependencies?.react) {
return false
}
const hasReact19 = /^(?:\^|~)?19(?:\.\d+)*(?:-.*)?$/.test(
packageInfo.dependencies.react
)
const hasReactDayPicker8 =
packageInfo.dependencies["react-day-picker"]?.startsWith("8")
return hasReact19 && hasReactDayPicker8
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does shouldPromptForNpmFlag() do?
shouldPromptForNpmFlag() is a function in the ui codebase, defined in packages/shadcn/src/utils/updaters/update-dependencies.ts.
Where is shouldPromptForNpmFlag() defined?
shouldPromptForNpmFlag() is defined in packages/shadcn/src/utils/updaters/update-dependencies.ts at line 76.
What calls shouldPromptForNpmFlag()?
shouldPromptForNpmFlag() is called by 1 function(s): updateDependencies.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free