MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / readRuntimeVersions

Function readRuntimeVersions

scripts/check-release-coherence.mjs:265–275  ·  view source on GitHub ↗
(root, path, pattern, label, { ignoreVersions = new Set() } = {})

Source from the content-addressed store, hash-verified

263}
264
265async function readRuntimeVersions(root, path, pattern, label, { ignoreVersions = new Set() } = {}) {
266 const source = await readFile(resolve(root, path), 'utf8');
267 const versions = [...source.matchAll(pattern)].map((match) => match[1]).filter((version) => !ignoreVersions.has(version));
268 if (versions.length === 0) {
269 return [{ label: `${label} (${path}; missing version)`, version: undefined }];
270 }
271 return versions.map((version, index) => ({
272 label: versions.length === 1 ? `${label} (${path})` : `${label} ${index + 1} (${path})`,
273 version,
274 }));
275}
276
277export async function checkReleaseCoherence(root = repositoryRoot) {
278 const errors = auditReleaseCoherence(await readReleaseCoherenceInput(root));

Callers 1

Calls 2

mapMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected