From f754db356b5c31c890784a19792e0eecc5792e27 Mon Sep 17 00:00:00 2001 From: Ashish Jullia Date: Fri, 25 Sep 2026 14:28:53 -0400 Subject: [PATCH 1/2] fasttext - load wasm from disk on Node 22+ --- README.md | 9 ++------- lib/utils.js | 8 ++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f75728c..a1515c6 100644 --- a/README.md +++ b/README.md @@ -76,11 +76,6 @@ Since v3.1.0, the sub-command `tag` identifies the version inside the commit mes The above command reads from the latest three commits (by default, change with the `-n` flag.) -## Important note for Node.js 18 +## Node.js -When running the CLI commands on Node.js 18, you may need to add the `--no-experimental-fetch` flag to the `NODE_OPTIONS` environment variable. This flag is required to disable the experimental fetch feature introduced in Node.js 18. - -To execute the CLI commands with the `--no-experimental-fetch` flag, use the following syntax: - -```shell -% NODE_OPTIONS=--no-experimental-fetch npx @eqworks/release \ No newline at end of file +Current Node.js releases can run the CLI directly. Commit classification loads a local WebAssembly model from disk, so `NODE_OPTIONS=--no-experimental-fetch` is not required. That flag is invalid on Node.js 22 and later. diff --git a/lib/utils.js b/lib/utils.js index 97870b6..021fd61 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -3,6 +3,14 @@ const { execSync } = require('child_process') const { Octokit } = require('@octokit/core') const chalk = require('chalk') + +/* global WebAssembly */ +// fasttext.js streams its wasm with fetch() when WebAssembly.instantiateStreaming +// exists. Node 22+ fetch rejects a filesystem path and aborts the process. +// Dropping streaming makes Emscripten read the wasm file from disk. +if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.instantiateStreaming === 'function') { + delete WebAssembly.instantiateStreaming +} const FastText = require('fasttext.js') const { GITHUB_TOKEN } = process.env From 4c7f43b517ee8528e71698ff37523e2cd2a76af8 Mon Sep 17 00:00:00 2001 From: Ashish Jullia Date: Fri, 25 Sep 2026 14:28:53 -0400 Subject: [PATCH 2/2] version - bump v3.5.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b284ece..028667e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eqworks/release", - "version": "3.5.3", + "version": "3.5.4", "main": "index.js", "license": "MIT", "source": "index.js",