MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / fetchVersionPolicy

Function fetchVersionPolicy

apps/site/scripts/release-post/index.mjs:170–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168};
169
170const fetchVersionPolicy = version => {
171 return fetchChangelog(version).then(section => {
172 // matches the policy for a given version (Stable, LTS etc) in the changelog
173 // ## 2015-10-07, Version 4.2.0 'Argon' (LTS), @jasnell
174 // ## 2015-12-04, Version 0.12.9 (LTS), @rvagg
175 const rxPolicy = /^## ?\d{4}-\d{2}-\d{2}, Version [^(].*\(([^)]+)\)/;
176 const matches = rxPolicy.exec(section);
177
178 return new Promise((resolve, reject) =>
179 matches && matches.length && matches[1]
180 ? resolve(matches[1])
181 : reject(ERRORS.NO_VERSION_POLICY(version))
182 );
183 });
184};
185
186const fetchShasums = version =>
187 request({ url: URLS.NODE_SHASUM(version) }).then(

Callers 1

fetchDocsFunction · 0.85

Calls 2

fetchChangelogFunction · 0.85
resolveFunction · 0.85

Tested by

no test coverage detected