updateChangelog() — react Function Reference
Architecture documentation for the updateChangelog() function in prepare-release.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6f97f41e_88e7_52db_efea_f43d42900a1d["updateChangelog()"] 497982e7_e1b1_28ad_fd0c_dc03591e3177["prepare-release.js"] 6f97f41e_88e7_52db_efea_f43d42900a1d -->|defined in| 497982e7_e1b1_28ad_fd0c_dc03591e3177 cadb4d3f_5109_b4e0_6f72_18067565caef["main()"] cadb4d3f_5109_b4e0_6f72_18067565caef -->|calls| 6f97f41e_88e7_52db_efea_f43d42900a1d style 6f97f41e_88e7_52db_efea_f43d42900a1d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/devtools/prepare-release.js lines 224–244
function updateChangelog(nextVersion, commitLog) {
const path = join(ROOT_PATH, CHANGELOG_PATH);
const oldChangelog = readFileSync(path, 'utf8');
const [beginning, end] = oldChangelog.split(RELEASE_SCRIPT_TOKEN);
const dateString = new Date().toLocaleDateString('en-us', {
year: 'numeric',
month: 'long',
day: 'numeric',
});
const header = `---\n\n### ${nextVersion}\n${dateString}`;
const newChangelog = `${beginning}${RELEASE_SCRIPT_TOKEN}\n\n${header}\n${commitLog}${end}`;
console.log(chalk.dim(' Updating changelog: ' + CHANGELOG_PATH));
if (!DRY_RUN) {
writeFileSync(path, newChangelog);
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does updateChangelog() do?
updateChangelog() is a function in the react codebase, defined in scripts/devtools/prepare-release.js.
Where is updateChangelog() defined?
updateChangelog() is defined in scripts/devtools/prepare-release.js at line 224.
What calls updateChangelog()?
updateChangelog() 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