INNER CODE UNIT · JavaScript
docStr
rpldy/react-uploady · .github/actions/save-versions-to-wf/index.js:26
const docStr = yaml.dump(doc, { lineWidth: -1 });
fs.writeFileSync(wfPath, docStr, { encoding: "utf8" });
} catch (ex) {
console.error(`Failed to save updated yaml file: ${wfPath}`, ex);
throw new Error("Unable to save WF YAML");
}
};
const fetchNonDeprecatedVersions = () => {
console.log("Fetching versions from npm registry for @rpldy/uploady...");
try {
// Use the registry API directly
const registryUrl = "https://registry.npmjs.org/@rpldy/uploady";
const response = execSync(`curl -s ${registryUrl}`, { encoding: "utf8" });
const packageInfo = JSON.parse(response);
// Get all versions from the versions object