updatePlaceholderReactVersionInCompiledArtifacts() — react Function Reference
Architecture documentation for the updatePlaceholderReactVersionInCompiledArtifacts() function in build-all-release-channels.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 96e8a694_22e2_8063_6b09_c6e72c4e5009["updatePlaceholderReactVersionInCompiledArtifacts()"] 39121ebe_f6d4_878e_0797_7a6b417f5f9a["build-all-release-channels.js"] 96e8a694_22e2_8063_6b09_c6e72c4e5009 -->|defined in| 39121ebe_f6d4_878e_0797_7a6b417f5f9a 01896c6c_c39f_713c_b9f5_5c924e738cdc["processStable()"] 01896c6c_c39f_713c_b9f5_5c924e738cdc -->|calls| 96e8a694_22e2_8063_6b09_c6e72c4e5009 07ae733a_8302_4852_ff9b_8b779bea6dc2["processExperimental()"] 07ae733a_8302_4852_ff9b_8b779bea6dc2 -->|calls| 96e8a694_22e2_8063_6b09_c6e72c4e5009 style 96e8a694_22e2_8063_6b09_c6e72c4e5009 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/rollup/build-all-release-channels.js lines 461–492
function updatePlaceholderReactVersionInCompiledArtifacts(
artifactsDirectory,
newVersion,
filteringClosure
) {
// Update the version of React in the compiled artifacts by searching for
// the placeholder string and replacing it with a new one.
if (filteringClosure == null) {
filteringClosure = filename => filename.endsWith('.js');
}
const artifactFilenames = String(
spawnSync('grep', [
'-lr',
PLACEHOLDER_REACT_VERSION,
'--',
artifactsDirectory,
]).stdout
)
.trim()
.split('\n')
.filter(filteringClosure);
for (const artifactFilename of artifactFilenames) {
const originalText = fs.readFileSync(artifactFilename, 'utf8');
const replacedText = originalText.replaceAll(
PLACEHOLDER_REACT_VERSION,
newVersion
);
fs.writeFileSync(artifactFilename, replacedText);
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does updatePlaceholderReactVersionInCompiledArtifacts() do?
updatePlaceholderReactVersionInCompiledArtifacts() is a function in the react codebase, defined in scripts/rollup/build-all-release-channels.js.
Where is updatePlaceholderReactVersionInCompiledArtifacts() defined?
updatePlaceholderReactVersionInCompiledArtifacts() is defined in scripts/rollup/build-all-release-channels.js at line 461.
What calls updatePlaceholderReactVersionInCompiledArtifacts()?
updatePlaceholderReactVersionInCompiledArtifacts() is called by 2 function(s): processExperimental, processStable.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free