updatePackageVersions() — react Function Reference
Architecture documentation for the updatePackageVersions() function in prepare-release.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 413171ec_8ac2_f8b1_beb0_a88bed756da2["updatePackageVersions()"] 497982e7_e1b1_28ad_fd0c_dc03591e3177["prepare-release.js"] 413171ec_8ac2_f8b1_beb0_a88bed756da2 -->|defined in| 497982e7_e1b1_28ad_fd0c_dc03591e3177 cadb4d3f_5109_b4e0_6f72_18067565caef["main()"] cadb4d3f_5109_b4e0_6f72_18067565caef -->|calls| 413171ec_8ac2_f8b1_beb0_a88bed756da2 style 413171ec_8ac2_f8b1_beb0_a88bed756da2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/devtools/prepare-release.js lines 264–284
function updatePackageVersions(previousVersion, nextVersion) {
PACKAGE_PATHS.forEach(partialPath => {
const path = join(ROOT_PATH, partialPath);
const json = readJsonSync(path);
json.version = nextVersion;
for (let key in json.dependencies) {
if (key.startsWith('react-devtools')) {
const version = json.dependencies[key];
json.dependencies[key] = version.replace(previousVersion, nextVersion);
}
}
console.log(chalk.dim(' Updating package JSON: ' + partialPath));
if (!DRY_RUN) {
writeJsonSync(path, json, {spaces: 2});
}
});
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does updatePackageVersions() do?
updatePackageVersions() is a function in the react codebase, defined in scripts/devtools/prepare-release.js.
Where is updatePackageVersions() defined?
updatePackageVersions() is defined in scripts/devtools/prepare-release.js at line 264.
What calls updatePackageVersions()?
updatePackageVersions() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free