summaries.js — react Source File
Architecture documentation for summaries.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
'use strict';
const fs = require('fs');
const path = require('path');
const {execFileAsync, repoRoot, noopLogger} = require('./utils');
function readChangelogSnippet(preferredPackage) {
const cacheKey =
preferredPackage === 'eslint-plugin-react-hooks'
? preferredPackage
: 'root';
if (!readChangelogSnippet.cache) {
readChangelogSnippet.cache = new Map();
}
const cache = readChangelogSnippet.cache;
if (cache.has(cacheKey)) {
return cache.get(cacheKey);
}
const targetPath =
preferredPackage === 'eslint-plugin-react-hooks'
? path.join(
repoRoot,
'packages',
'eslint-plugin-react-hooks',
'CHANGELOG.md'
)
: path.join(repoRoot, 'CHANGELOG.md');
let content = '';
try {
content = fs.readFileSync(targetPath, 'utf8');
} catch {
content = '';
}
const snippet = content.slice(0, 4000);
cache.set(cacheKey, snippet);
return snippet;
}
function sanitizeSummary(text) {
if (!text) {
return '';
}
const trimmed = text.trim();
const withoutBullet = trimmed.replace(/^([-*]\s+|\d+\s*[\.)]\s+)/, '');
return withoutBullet.replace(/\s+/g, ' ').trim();
}
async function summarizePackages({
summarizer,
packageSpecs,
packageTargets,
commitsByPackage,
log,
}) {
// ... (247 more lines)
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does summaries.js do?
summaries.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in summaries.js?
summaries.js defines 8 function(s): parseCodexSummary, parseSummariesResponse, readChangelogSnippet, runSummarizer, sanitizeSummary, stripClaudeBanner, summarizePackageCommits, summarizePackages.
Where is summaries.js in the architecture?
summaries.js is located at scripts/tasks/generate-changelog/summaries.js (domain: BabelCompiler, subdomain: Entrypoint, directory: scripts/tasks/generate-changelog).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free