Repository: nwutils/nw-builder (JavaScript)

Issue:
"The version manifest does not exist/was not downloaded. Please try again in some time."
The script that I was using usually works fine without any issues. However, this just happened now as I was trying to publish a release. The build failed and spit out this error:
```
"The version manifest does not exist/was not downloaded. Please try again in some time."
```
Followed by
```
Error: Either the specific version info does not exist or the version manifest itself does not exist. In case of the latter, please check your internet connection and try again later.
    at Object.validate (file:///D:/thisjt-projects/[redacted]/node_modules/.pnpm/nw-builder@4.7.8/node_modules/nw-builder/src/util.js:296:11)
    at nwbuild (file:///D:/thisjt-projects/[redacted]/node_modules/.pnpm/nw-builder@4.7.8/node_modules/nw-builder/src/index.js:81:16)    
    at async oraPromise (file:///D:/thisjt-projects/[redacted]/node_modules/.pnpm/ora@8.0.1/node_modules/ora/index.js:396:18)
    at async Step (file:///D:/thisjt-projects/[redacted]/Build.js:333:4)
    at async Builder (file:///D:/thisjt-projects/[redacted]/Build.js:115:4)
```

While trying to check the root cause, it seems that it's because the json decode failed because the version list that is downloaded from the internet with the url `https://nwjs.io/versions` is incorrect due to it expecting a json and instead receiving an html.

<img width="476" height="176" alt="Image" src="https://github.com/user-attachments/assets/fcae205f-936a-48b8-8c22-cbd13c993b3c" />

<img width="500" height="235" alt="Image" src="https://github.com/user-attachments/assets/d1443188-d219-4626-a986-72a958545d28" />

<img width="474" height="131" alt="Image" src="https://github.com/user-attachments/assets/90e08154-41ec-4672-a6a8-396a066d9229" />

Can confirm that it's showing an html from this url
<img width="1147" height="594" alt="Image" src="https://github.com/user-attachments/assets/a91099d1-08ab-45a3-95d6-7e51eb315486" />

Would it be possible if the default URL of this would instead point to a raw file in the nwjs repo instead? In case something happens with the nwjs URL provided which potentially can sometimes happen. I'd like to help with a PR but I don't know what the full structure of the json looks like from `https://nwjs.io/versions`.


Discussion: The fix would be to update the link from `https://nwjs.io/versions` to `https://nwjs.io/versions.json` in the repo. Feel free to open a PR!



Fix (patch):
diff --git a/.gitignore b/.gitignore
index 4141dd47..e8ab2294 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ node_modules
 
 tests/fixtures/cache
 tests/fixtures/out
+tests/fixtures/macos
diff --git a/README.md b/README.md
index f37caa13..16deabc5 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ Build [NW.js](https://github.com/nwjs/nw.js) applications for Mac, Windows and L
 npm i -D nw-builder
 ```
 
-Every NW.js release includes a modified Node.js binary at a specific version. It is recommended to [install](https://nodejs.org/en/download/package-manager) exactly that version on the host system. Not doing so may download ABI incompatible Node modules. Consult the NW.js [versions manifest](https://nwjs.io/versions) for what Node.js version to install. It is recommended to use a Node version manager (such as [volta](https://volta.sh), n, nvm, or nvm-windows) to be able to easily install and switch between Node versions.
+Every NW.js release includes a modified Node.js binary at a specific version. It is recommended to [install](https://nodejs.org/en/download/package-manager) exactly that version on the host system. Not doing so may download ABI incompatible Node modules. Consult the NW.js [versions manifest](https://nwjs.io/versions.json) for what Node.js version to install. It is recommended to use a Node version manager (such as [volta](https://volta.sh), n, nvm, or nvm-windows) to be able to easily install and switch between Node versions.
 
 ## Usage
 
@@ -215,7 +215,7 @@ Options
 | platform | `"linux" \| "osx" \| "win"` | | Host platform |
 | arch | `"ia32" \| "x64" \| "arm64"` | | Host architecture |
 | downloadUrl | `"https://dl.nwjs.io" \| "https://npm.taobao.org/mirrors/nwjs" \| https://npmmirror.com/mirrors/nwjs \| "https://github.com/corwin-of-amber/nw.js/releases/"` | `"https://dl.nwjs.io"` | Download server. Supports file systems too (for example `file:///home/localghost/nwjs_mirror`) |
-| manifestUrl | `"https://nwjs.io/versions" \| "https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json"` | `"https://nwjs.io/versions"` | Versions manifest |
+| manifestUrl | `"https://nwjs.io/versions.json" \| "https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json"` | `"https://nwjs.io/versions.json"` | Versions manifest |
 | cacheDir | `string` | `"./cache"` | Directory to cache NW binaries |
 | cache | `boolean` | `true`| If true the existing cache is used. Otherwise it removes and redownloads it. |
 | ffmpeg | `boolean` | `false`| If true the chromium ffmpeg is replaced by community version with proprietary codecs. |
diff --git a/src/bld.js b/src/bld.js
index 4cac6126..80d3dc92 100644
--- a/src/bld.js
+++ b/src/bld.js
@@ -89,7 +89,7 @@ import setOsxConfig from './bld/osx.js';
  * @property {"normal" | "sdk"}                     [flavor = "normal"]                         Build flavor
  * @property {"linux" | "osx" | "win"}              [platform]                                  Target platform
  * @property {"ia32" | "x64" | "arm64"}             [arch]                                      Target arch
- * @property {string}                               [manifestUrl = "https://nwjs.io/versions"]  Manifest URL
+ * @property {string}                               [manifestUrl = "https://nwjs.io/versions.json"]  Manifest URL
  * @property {string}                               [srcDir = "./src"]                          Source directory
  * @property {string}                               [cacheDir = "./cache"]                      Cache directory
  * @property {string}                               [outDir = "./out"]                          Out directory
diff --git a/src/index.d.ts b/src/index.d.ts
index 648745f1..8ca99788 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -24,7 +24,7 @@ export interface Options<P extends SupportedPlatform = SupportedPlatform> {
     /** URI to download NW binaries from */
     downloadUrl?: "https://dl.nwjs.io" | string,
     /** URI to download manifest */
-    manifestUrl?: "https://nwjs.io/versions" | string,
+    manifestUrl?: "https://nwjs.io/versions.json" | string,
     /** Refer to Linux/Windows/Osx specific options */
     app: AppOptions<P>,
     /** If true the existing cache is used. Otherwise it removes and redownloads it. */
diff --git a/src/index.js b/src/index.js
index 15ccc660..0a607cd5 100644
--- a/src/index.js
+++ b/src/index.js
@@ -16,7 +16,7 @@ import util from './util.js';
  * @property {"linux" | "osx" | "win"}             platform                                  Host platform
  * @property {"ia32" | "x64" | "arm64"}            arch                                      Host architecture
  * @property {"https://dl.nwjs.io" | string}       [downloadUrl="https://dl.nwjs.io"]        Download server
- * @property {"https://nwjs.io/versions" | string} [manifestUrl="https://nwjs.io/versions"]  Versions manifest
+ * @property {"https://nwjs.io/versions.json" | string} [manifestUrl="https://nwjs.io/versions.json"]  Versions manifest
  * @property {"./cache" | string}                  [cacheDir="./cache"]                      Directory to cache NW binaries
  * @property {"./" | string}                       [srcDir="./"]                             File paths to application code
  * @property {"./out" | string}                    [outDir="./out"]                          Directory to store build artifacts
diff --git a/src/util.js b/src/util.js
index eb66f17e..96bd8295 100644
--- a/src/util.js
+++ b/src/util.js
@@ -206,7 +206,7 @@ export const parse = async (options, pkg) => {
   options.platform = options.platform ?? PLATFORM_KV[process.platform];
   options.arch = options.arch ?? ARCH_KV[process.arch];
   options.downloadUrl = options.downloadUrl ?? 'https://dl.nwjs.io';
-  options.manifestUrl = options.manifestUrl ?? 'https://nwjs.io/versions';
+  options.manifestUrl = options.manifestUrl ?? 'https://nwjs.io/versions.json';
   options.cacheDir = options.cacheDir ?? './cache';
   options.cache = str2Bool(options.cache ?? true);
   options.ffmpeg = str2Bool(options.ffmpeg ?? false);