We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7c0516 commit 488f243Copy full SHA for 488f243
1 file changed
npm-app/release-legacy/index.js
@@ -93,22 +93,15 @@ function httpGet(url, options = {}) {
93
async function getLatestLegacyVersion() {
94
try {
95
const res = await httpGet(
96
- `https://github.com/${CONFIG.githubRepo}/releases.atom`,
+ `https://registry.npmjs.org/${packageName}/legacy`,
97
)
98
99
if (res.statusCode !== 200) return null
100
101
const body = await streamToString(res)
102
+ const packageData = JSON.parse(body)
103
- // Parse the Atom XML to extract the latest release tag
104
- const tagMatch = body.match(
105
- /<id>tag:github\.com,2008:Repository\/\d+\/v(\d+\.\d+\.\d+-legacy.\d+)<\/id>/,
106
- )
107
- if (tagMatch && tagMatch[1]) {
108
- return tagMatch[1]
109
- }
110
-
111
- return null
+ return packageData.version || null
112
} catch (error) {
113
return null
114
}
0 commit comments