codebuff 1.0.510 → 1.0.512

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -93,22 +93,15 @@ function httpGet(url, options = {}) {
93
93
  async function getLatestVersion() {
94
94
  try {
95
95
  const res = await httpGet(
96
- `https://github.com/${CONFIG.githubRepo}/releases.atom`,
96
+ `https://registry.npmjs.org/${packageName}/latest`,
97
97
  )
98
98
 
99
99
  if (res.statusCode !== 200) return null
100
100
 
101
101
  const body = await streamToString(res)
102
+ const packageData = JSON.parse(body)
102
103
 
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+)<\/id>/,
106
- )
107
- if (tagMatch && tagMatch[1]) {
108
- return tagMatch[1]
109
- }
110
-
111
- return null
104
+ return packageData.version || null
112
105
  } catch (error) {
113
106
  return null
114
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebuff",
3
- "version": "1.0.510",
3
+ "version": "1.0.512",
4
4
  "description": "AI coding agent",
5
5
  "license": "MIT",
6
6
  "bin": {