MCPcopy Index your code
hub / github.com/nodejs/node / getNSSVersion

Function getNSSVersion

tools/dep_updaters/update-root-certs.mjs:66–83  ·  view source on GitHub ↗
(release)

Source from the content-addressed store, hash-verified

64};
65
66const getNSSVersion = async (release) => {
67 const latestFirefox = release.version;
68 const firefoxTag = `FIREFOX_${latestFirefox.replaceAll('.', '_')}_RELEASE`;
69 const tagInfoURL = `https://hg.mozilla.org/releases/mozilla-release/raw-file/${firefoxTag}/security/nss/TAG-INFO`;
70 if (values.verbose) {
71 console.log(`Fetching NSS tag from ${tagInfoURL}.`);
72 }
73 const tagInfo = await fetch(tagInfoURL);
74 if (!tagInfo.ok) {
75 console.error(`Failed to fetch ${tagInfoURL}: ${tagInfo.status}: ${tagInfo.statusText}`);
76 }
77 const tag = await tagInfo.text();
78 if (values.verbose) {
79 console.log(`Found tag ${tag}.`);
80 }
81 // Tag will be of form `NSS_x_y_RTM`. Convert to `x.y`.
82 return tag.split('_').slice(1, -1).join('.');
83};
84
85const options = {
86 help: {

Callers 1

Calls 7

fetchFunction · 0.85
textMethod · 0.65
sliceMethod · 0.65
logMethod · 0.45
errorMethod · 0.45
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…