[GH-ISSUE #52] Remove/update deprecated/unsupported packages #26

Open
opened 2026-03-03 13:52:18 +03:00 by kerem · 4 comments
Owner

Originally created by @0xdevalias on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/jehna/humanify/issues/52

⇒ node --version
v22.6.0

⇒ npm --version
10.8.2
⇒ npm install humanifyjs
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
NODE_OPTIONS="--trace-deprecation" npx humanifyjs -h
(node:95592) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
    at loadBuiltinModule (node:internal/modules/helpers:98:7)
    at Module._load (node:internal/modules/cjs/loader:1099:17)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:125:16)
    at Object.<anonymous> (/Users/devalias/dev/foohumanify/node_modules/whatwg-url/lib/url-state-machine.js:2:18)

⇒ npm why npmlog
npmlog@6.0.2
node_modules/npmlog
  npmlog@"^6.0.2" from cmake-js@7.3.0
  node_modules/cmake-js
    cmake-js@"^7.3.0" from node-llama-cpp@3.0.0-beta.44
    node_modules/node-llama-cpp
      node-llama-cpp@"^3.0.0-beta.40" from humanifyjs@2.1.0
      node_modules/humanifyjs
        humanifyjs@"^2.1.0" from the root project
⇒ npm why are-we-there-yet
are-we-there-yet@3.0.1
node_modules/are-we-there-yet
  are-we-there-yet@"^3.0.0" from npmlog@6.0.2
  node_modules/npmlog
    npmlog@"^6.0.2" from cmake-js@7.3.0
    node_modules/cmake-js
      cmake-js@"^7.3.0" from node-llama-cpp@3.0.0-beta.44
      node_modules/node-llama-cpp
        node-llama-cpp@"^3.0.0-beta.40" from humanifyjs@2.1.0
        node_modules/humanifyjs
          humanifyjs@"^2.1.0" from the root project
⇒ npm why gauge
gauge@4.0.4
node_modules/gauge
  gauge@"^4.0.3" from npmlog@6.0.2
  node_modules/npmlog
    npmlog@"^6.0.2" from cmake-js@7.3.0
    node_modules/cmake-js
      cmake-js@"^7.3.0" from node-llama-cpp@3.0.0-beta.44
      node_modules/node-llama-cpp
        node-llama-cpp@"^3.0.0-beta.40" from humanifyjs@2.1.0
        node_modules/humanifyjs
          humanifyjs@"^2.1.0" from the root project
⇒ npm why whatwg-url
whatwg-url@5.0.0
node_modules/whatwg-url
  whatwg-url@"^5.0.0" from node-fetch@2.7.0
  node_modules/node-fetch
    node-fetch@"^2.6.7" from openai@4.56.0
    node_modules/openai
      openai@"^4.55.1" from humanifyjs@2.1.0
      node_modules/humanifyjs
        humanifyjs@"^2.1.0" from the root project
Originally created by @0xdevalias on GitHub (Aug 23, 2024). Original GitHub issue: https://github.com/jehna/humanify/issues/52 ```shell ⇒ node --version v22.6.0 ⇒ npm --version 10.8.2 ``` ```shell ⇒ npm install humanifyjs npm warn deprecated npmlog@6.0.2: This package is no longer supported. npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported. npm warn deprecated gauge@4.0.4: This package is no longer supported. ``` ```shell ⇒ NODE_OPTIONS="--trace-deprecation" npx humanifyjs -h (node:95592) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. at node:punycode:3:9 at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7) at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10) at loadBuiltinModule (node:internal/modules/helpers:98:7) at Module._load (node:internal/modules/cjs/loader:1099:17) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) at Module.require (node:internal/modules/cjs/loader:1339:12) at require (node:internal/modules/helpers:125:16) at Object.<anonymous> (/Users/devalias/dev/foohumanify/node_modules/whatwg-url/lib/url-state-machine.js:2:18) ``` --- ```shell ⇒ npm why npmlog npmlog@6.0.2 node_modules/npmlog npmlog@"^6.0.2" from cmake-js@7.3.0 node_modules/cmake-js cmake-js@"^7.3.0" from node-llama-cpp@3.0.0-beta.44 node_modules/node-llama-cpp node-llama-cpp@"^3.0.0-beta.40" from humanifyjs@2.1.0 node_modules/humanifyjs humanifyjs@"^2.1.0" from the root project ``` ```shell ⇒ npm why are-we-there-yet are-we-there-yet@3.0.1 node_modules/are-we-there-yet are-we-there-yet@"^3.0.0" from npmlog@6.0.2 node_modules/npmlog npmlog@"^6.0.2" from cmake-js@7.3.0 node_modules/cmake-js cmake-js@"^7.3.0" from node-llama-cpp@3.0.0-beta.44 node_modules/node-llama-cpp node-llama-cpp@"^3.0.0-beta.40" from humanifyjs@2.1.0 node_modules/humanifyjs humanifyjs@"^2.1.0" from the root project ``` ```shell ⇒ npm why gauge gauge@4.0.4 node_modules/gauge gauge@"^4.0.3" from npmlog@6.0.2 node_modules/npmlog npmlog@"^6.0.2" from cmake-js@7.3.0 node_modules/cmake-js cmake-js@"^7.3.0" from node-llama-cpp@3.0.0-beta.44 node_modules/node-llama-cpp node-llama-cpp@"^3.0.0-beta.40" from humanifyjs@2.1.0 node_modules/humanifyjs humanifyjs@"^2.1.0" from the root project ``` ```shell ⇒ npm why whatwg-url whatwg-url@5.0.0 node_modules/whatwg-url whatwg-url@"^5.0.0" from node-fetch@2.7.0 node_modules/node-fetch node-fetch@"^2.6.7" from openai@4.56.0 node_modules/openai openai@"^4.55.1" from humanifyjs@2.1.0 node_modules/humanifyjs humanifyjs@"^2.1.0" from the root project ```
Author
Owner

@0xdevalias commented on GitHub (Feb 25, 2025):

RE: This error:

NODE_OPTIONS="--trace-deprecation" npx humanifyjs -h
(node:95592) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
    at loadBuiltinModule (node:internal/modules/helpers:98:7)
    at Module._load (node:internal/modules/cjs/loader:1099:17)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:125:16)
    at Object.<anonymous> (/Users/devalias/dev/foohumanify/node_modules/whatwg-url/lib/url-state-machine.js:2:18)

Which comes from the openai package:

⇒ npm why whatwg-url
whatwg-url@5.0.0
node_modules/whatwg-url
  whatwg-url@"^5.0.0" from node-fetch@2.7.0
  node_modules/node-fetch
    node-fetch@"^2.6.7" from openai@4.56.0
    node_modules/openai
      openai@"^4.55.1" from humanifyjs@2.1.0
      node_modules/humanifyjs
        humanifyjs@"^2.1.0" from the root project

Here's some updates on the timeline as to when node-fetch will no longer be included in it, which I believe will resolve this error:

seems that openai is still using node-fetch, so it might not work

Related upstream issues / workarounds for node-fetch not supporting HTTP_PROXY / etc:

Originally posted by @0xdevalias in https://github.com/jehna/humanify/issues/265#issuecomment-2664841266

<!-- gh-comment-id:2679978874 --> @0xdevalias commented on GitHub (Feb 25, 2025): RE: This error: > ```shell > ⇒ NODE_OPTIONS="--trace-deprecation" npx humanifyjs -h > (node:95592) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. > at node:punycode:3:9 > at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7) > at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10) > at loadBuiltinModule (node:internal/modules/helpers:98:7) > at Module._load (node:internal/modules/cjs/loader:1099:17) > at TracingChannel.traceSync (node:diagnostics_channel:315:14) > at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) > at Module.require (node:internal/modules/cjs/loader:1339:12) > at require (node:internal/modules/helpers:125:16) > at Object.<anonymous> (/Users/devalias/dev/foohumanify/node_modules/whatwg-url/lib/url-state-machine.js:2:18) > ``` Which comes from the `openai` package: > ```shell > ⇒ npm why whatwg-url > whatwg-url@5.0.0 > node_modules/whatwg-url > whatwg-url@"^5.0.0" from node-fetch@2.7.0 > node_modules/node-fetch > node-fetch@"^2.6.7" from openai@4.56.0 > node_modules/openai > openai@"^4.55.1" from humanifyjs@2.1.0 > node_modules/humanifyjs > humanifyjs@"^2.1.0" from the root project > ``` Here's some updates on the timeline as to when `node-fetch` will no longer be included in it, which I believe will resolve this error: > > seems that openai is still using `node-fetch`, so it might not work > > - https://github.com/openai/openai-node/blob/212710db8c8c139392c6532c0eccfd13558ef2d4/README.md?plain=1#L1-L5 > - > We're actively working on a new alpha version that migrates from `node-fetch` to builtin `fetch`. > > > > Please try it out and let us know if you run into any issues! > > > > - https://community.openai.com/t/your-feedback-requested-node-js-sdk-5-0-0-alpha/1063774 > - > **We’re pleased to share that a new alpha of the 5.0.0 version of the JavaScript / TypeScript SDK is [available on npm](https://www.npmjs.com/package/openai/v/5.0.0-alpha.0) and in the [alpha branch of the GitHub repository](https://github.com/openai/openai-node/tree/alpha)**. This version of the SDK represents a breaking change to the existing 4.x SDK, as **we have migrated completely to using built-in `fetch` for HTTP requests across all environments** (Node.js, Deno, etc). However, we do expect that most of your code will “just work” with minor adjustments in types. > - > We’re dropping all support for v16 as active support was dropped over 2 years [ago](https://endoflife.date/nodejs). **Our [minimum](https://github.com/openai/openai-node#requirements) supported version is v18.** > > > > You’ll have to use a polyfill if you want to continue using v16. > > Related upstream issues / workarounds for `node-fetch` not supporting `HTTP_PROXY` / etc: > > - https://github.com/node-fetch/node-fetch/issues/1770 > - > I've been using [global-agent](https://github.com/gajus/global-agent) with node-fetch for a while now *(though on v2.7 and only for node < v18)* > > > > ```js > > > > import * as globalAgent from 'global-agent'; > > > > process.env["GLOBAL_AGENT_HTTP_PROXY"] = process.env.HTTP_PROXY || "http://my.proxy.address:8888"; > > > > globalAgent.bootstrap(); > > > > ``` > > > > _Originally posted by @lselden in [#1770](https://github.com/node-fetch/node-fetch/issues/1770#issuecomment-1854439586)_ > - https://github.com/node-fetch/node-fetch/issues/195 > - > For anybody who stumbles on this issue like I did, the easiest way to support http proxies that I've found so far is to use [`global-agent`](https://github.com/gajus/global-agent). It's super easy to install and worked for me so far. > > > > _Originally posted by @zicklag in https://github.com/node-fetch/node-fetch/issues/195#issuecomment-1240855743_ > - https://github.com/gajus/global-agent > - > Global HTTP/HTTPS proxy agent configurable using environment variables. > > _Originally posted by @0xdevalias in https://github.com/jehna/humanify/issues/265#issuecomment-2664841266_
Author
Owner

@0xdevalias commented on GitHub (Feb 25, 2025):

RE: These deprecated warnings that all come from node-llama-cpp@3.0.0-beta.44:

⇒ npm install humanifyjs
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.

Solving the build error in this package bump would likely allow us to resolve this issue:

See my previous exploration/analysis into the build failures for that dependency upgrade in the following comments:

It's been failing for quite a while now:

Looking at the pull request history for bumping node-llama-cpp:

It seems there has been test failures as far back as:

With the last successful upgrade being:

Using a script from my dotfiles to check the old PR checks, and whether they still have logs available:

Old PR Checks
⇒ gh-check-pr-test-logs-exist --repo jehna/humanify --dependabot 'node-llama-cpp' --workflow 'Test'
🔍 Using auto-generated Dependabot search query: 'Bump node-llama-cpp author:app/dependabot'

🔍 Fetching PRs in jehna/humanify (Search: 'Bump node-llama-cpp author:app/dependabot')...

📋 Matching PRs:
  PR #25: Bump node-llama-cpp from 3.0.0-beta.42 to 3.0.0-beta.44
  PR #110: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.45
  PR #113: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.46
  PR #119: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0
  PR #123: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.1
  PR #126: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.3
  PR #148: Bump node-llama-cpp from 3.0.0-beta.44 to 3.1.1
  PR #194: Bump node-llama-cpp from 3.0.0-beta.44 to 3.2.0
  PR #235: Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.0
  PR #243: Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.1
  PR #259: Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.2
  PR #270: Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.0
  PR #289: Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.1
  PR #298: Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.2
  PR #301: Bump node-llama-cpp from 3.0.0-beta.44 to 3.5.0

🚀 Fetching workflow checks for each PR (workflow: 'Test')...
  📝 PR #25 - Bump node-llama-cpp from 3.0.0-beta.42 to 3.0.0-beta.44
    SUCCESS Run: 10342020426, Job: 28624470785, Completed: 2024-08-11T18:55:39Z, https://github.com/jehna/humanify/actions/runs/10342020426/job/28624470785
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/10342020426/job/28624470785

  📝 PR #110 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.45
    FAILURE Run: 10952237439, Job: 30410578743, Completed: 2024-09-20T02:44:38Z, https://github.com/jehna/humanify/actions/runs/10952237439/job/30410578743
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/10952237439/job/30410578743

  📝 PR #113 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.46
    FAILURE Run: 10986565195, Job: 30500102243, Completed: 2024-09-23T02:21:16Z, https://github.com/jehna/humanify/actions/runs/10986565195/job/30500102243
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/10986565195/job/30500102243

  📝 PR #119 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0
    FAILURE Run: 11006198263, Job: 30560096048, Completed: 2024-09-24T03:07:11Z, https://github.com/jehna/humanify/actions/runs/11006198263/job/30560096048
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11006198263/job/30560096048

  📝 PR #123 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.1
    FAILURE Run: 11025072536, Job: 30619327495, Completed: 2024-09-25T02:18:48Z, https://github.com/jehna/humanify/actions/runs/11025072536/job/30619327495
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11025072536/job/30619327495

  📝 PR #126 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.3
    FAILURE Run: 11044698764, Job: 30681065017, Completed: 2024-09-26T02:57:16Z, https://github.com/jehna/humanify/actions/runs/11044698764/job/30681065017
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11044698764/job/30681065017

  📝 PR #148 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.1.1
    FAILURE Run: 11411055050, Job: 31754595756, Completed: 2024-10-18T21:13:18Z, https://github.com/jehna/humanify/actions/runs/11411055050/job/31754595756
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11411055050/job/31754595756

  📝 PR #194 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.2.0
    FAILURE Run: 11605087286, Job: 32314887872, Completed: 2024-10-31T02:37:10Z, https://github.com/jehna/humanify/actions/runs/11605087286/job/32314887872
    ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11605087286/job/32314887872

  📝 PR #235 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.0
    FAILURE Run: 12131715473, Job: 33824331143, Completed: 2024-12-03T02:29:45Z, https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143
    📋 View failed logs: gh run view 12131715473 --repo jehna/humanify --log-failed

  📝 PR #243 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.1
    FAILURE Run: 12228072358, Job: 34105732535, Completed: 2024-12-09T03:00:43Z, https://github.com/jehna/humanify/actions/runs/12228072358/job/34105732535
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12228072358/job/34105732535
    📋 View failed logs: gh run view 12228072358 --repo jehna/humanify --log-failed

  📝 PR #259 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.2
    FAILURE Run: 12554593031, Job: 35003489033, Completed: 2024-12-31T02:37:09Z, https://github.com/jehna/humanify/actions/runs/12554593031/job/35003489033
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12554593031/job/35003489033
    📋 View failed logs: gh run view 12554593031 --repo jehna/humanify --log-failed

  📝 PR #270 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.0
    FAILURE Run: 12663197159, Job: 35289351219, Completed: 2025-01-08T02:58:25Z, https://github.com/jehna/humanify/actions/runs/12663197159/job/35289351219
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12663197159/job/35289351219
    📋 View failed logs: gh run view 12663197159 --repo jehna/humanify --log-failed

  📝 PR #289 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.1
    FAILURE Run: 12941994481, Job: 36098955172, Completed: 2025-01-24T02:26:22Z, https://github.com/jehna/humanify/actions/runs/12941994481/job/36098955172
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12941994481/job/36098955172
    📋 View failed logs: gh run view 12941994481 --repo jehna/humanify --log-failed

  📝 PR #298 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.2
    FAILURE Run: 13002502354, Job: 36263639435, Completed: 2025-01-28T02:39:24Z, https://github.com/jehna/humanify/actions/runs/13002502354/job/36263639435
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/13002502354/job/36263639435
    📋 View failed logs: gh run view 13002502354 --repo jehna/humanify --log-failed

  📝 PR #301 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.5.0
    FAILURE Run: 13065242932, Job: 36456364632, Completed: 2025-01-31T02:32:51Z, https://github.com/jehna/humanify/actions/runs/13065242932/job/36456364632
    ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/13065242932/job/36456364632
    📋 View failed logs: gh run view 13065242932 --repo jehna/humanify --log-failed

The oldest PR that still does have test error logs available seems to be:

  • https://github.com/jehna/humanify/pull/235
    • https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143
      • ..snip..
        
        # [2024-12-03 02:28:15]  Loading model with options {
        #   modelPath: '/Users/runner/.humanifyjs/models/Phi-3.1-mini-4k-instruct-Q4_K_M.gguf',
        #   gpuLayers: 0
        # }
        # Subtest: Unminifies an example file successfully
        not ok 4 - Unminifies an example file successfully
          ---
          duration_ms: 87609.07725
          location: '/Users/runner/work/humanify/humanify/src/test/local.e2etest.ts:1:468'
          failureType: 'testCodeFailure'
          error: |-
            Expected "UNREADABLE" but got GOOD
        
            The provided function `a` appears to be a sublist generator for slicing a string or an array in JavaScript
          code: 'ERR_ASSERTION'
          name: 'AssertionError'
          expected: true
          actual: false
          operator: '=='
          stack: |-
            expectStartsWith (/Users/runner/work/humanify/humanify/src/test/local.e2etest.ts:24:5)
            TestContext.<anonymous> (/Users/runner/work/humanify/humanify/src/test/local.e2etest.ts:30:9)
            async Test.run (node:internal/test_runner/test:797:9)
            async Test.processPendingSubtests (node:internal/test_runner/test:527:7)
          ...
        1..4
        # tests 4
        # suites 0
        # pass 3
        # fail 1
        # cancelled 0
        # skipped 0
        # todo 0
        # duration_ms 125798.5[195](https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143#step:9:196)41
        Error: Process completed with exit code 1.
        

Looking at the CHANGELOG entry for the version that started breaking:


The following links may be relevant for understanding if/what changes need to be made to the Gbnf grammar (or other ways to achieve similar):

Originally posted by @0xdevalias in https://github.com/jehna/humanify/issues/301#issuecomment-2642723208

<!-- gh-comment-id:2679997649 --> @0xdevalias commented on GitHub (Feb 25, 2025): RE: These deprecated warnings that all come from `node-llama-cpp@3.0.0-beta.44`: > ```shell > ⇒ npm install humanifyjs > npm warn deprecated npmlog@6.0.2: This package is no longer supported. > npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported. > npm warn deprecated gauge@4.0.4: This package is no longer supported. > ``` Solving the build error in this package bump would likely allow us to resolve this issue: - https://github.com/jehna/humanify/pull/343#issuecomment-2679947137 See my previous exploration/analysis into the build failures for that dependency upgrade in the following comments: - https://github.com/jehna/humanify/pull/301#issuecomment-2642041534 - https://github.com/jehna/humanify/pull/301#issuecomment-2642723208 It's been failing for quite a while now: > Looking at the pull request history for bumping `node-llama-cpp`: > > - https://github.com/jehna/humanify/pulls?q=sort%3Aupdated-desc+is%3Apr+%22Bump+node-llama-cpp%22 > > It seems there has been test failures as far back as: > > - https://github.com/jehna/humanify/pull/110 > - Unfortunately this was so long ago that the logs have expired and are no longer available: https://github.com/jehna/humanify/actions/runs/10952237439/job/30410578743?pr=110 > > With the last successful upgrade being: > > - https://github.com/jehna/humanify/pull/25 > - Unfortunately this was so long ago that the logs have expired and are no longer available: https://github.com/jehna/humanify/actions/runs/10342020426/job/28624470785?pr=25 > > Using [a script from my dotfiles](https://github.com/0xdevalias/dotfiles/blob/63d2ab1e0c3fe9e6a6ef4bf89541ab948c32ac90/bin/gh-check-pr-test-logs-exist) to check the old PR checks, and whether they still have logs available: > > <details><summary>Old PR Checks</summary> > > - https://github.com/0xdevalias/dotfiles/blob/63d2ab1e0c3fe9e6a6ef4bf89541ab948c32ac90/bin/gh-check-pr-test-logs-exist > > ```shell > ⇒ gh-check-pr-test-logs-exist --repo jehna/humanify --dependabot 'node-llama-cpp' --workflow 'Test' > 🔍 Using auto-generated Dependabot search query: 'Bump node-llama-cpp author:app/dependabot' > > 🔍 Fetching PRs in jehna/humanify (Search: 'Bump node-llama-cpp author:app/dependabot')... > > 📋 Matching PRs: > PR #25: Bump node-llama-cpp from 3.0.0-beta.42 to 3.0.0-beta.44 > PR #110: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.45 > PR #113: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.46 > PR #119: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0 > PR #123: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.1 > PR #126: Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.3 > PR #148: Bump node-llama-cpp from 3.0.0-beta.44 to 3.1.1 > PR #194: Bump node-llama-cpp from 3.0.0-beta.44 to 3.2.0 > PR #235: Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.0 > PR #243: Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.1 > PR #259: Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.2 > PR #270: Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.0 > PR #289: Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.1 > PR #298: Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.2 > PR #301: Bump node-llama-cpp from 3.0.0-beta.44 to 3.5.0 > > 🚀 Fetching workflow checks for each PR (workflow: 'Test')... > 📝 PR #25 - Bump node-llama-cpp from 3.0.0-beta.42 to 3.0.0-beta.44 > SUCCESS Run: 10342020426, Job: 28624470785, Completed: 2024-08-11T18:55:39Z, https://github.com/jehna/humanify/actions/runs/10342020426/job/28624470785 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/10342020426/job/28624470785 > > 📝 PR #110 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.45 > FAILURE Run: 10952237439, Job: 30410578743, Completed: 2024-09-20T02:44:38Z, https://github.com/jehna/humanify/actions/runs/10952237439/job/30410578743 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/10952237439/job/30410578743 > > 📝 PR #113 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0-beta.46 > FAILURE Run: 10986565195, Job: 30500102243, Completed: 2024-09-23T02:21:16Z, https://github.com/jehna/humanify/actions/runs/10986565195/job/30500102243 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/10986565195/job/30500102243 > > 📝 PR #119 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.0 > FAILURE Run: 11006198263, Job: 30560096048, Completed: 2024-09-24T03:07:11Z, https://github.com/jehna/humanify/actions/runs/11006198263/job/30560096048 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11006198263/job/30560096048 > > 📝 PR #123 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.1 > FAILURE Run: 11025072536, Job: 30619327495, Completed: 2024-09-25T02:18:48Z, https://github.com/jehna/humanify/actions/runs/11025072536/job/30619327495 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11025072536/job/30619327495 > > 📝 PR #126 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.0.3 > FAILURE Run: 11044698764, Job: 30681065017, Completed: 2024-09-26T02:57:16Z, https://github.com/jehna/humanify/actions/runs/11044698764/job/30681065017 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11044698764/job/30681065017 > > 📝 PR #148 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.1.1 > FAILURE Run: 11411055050, Job: 31754595756, Completed: 2024-10-18T21:13:18Z, https://github.com/jehna/humanify/actions/runs/11411055050/job/31754595756 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11411055050/job/31754595756 > > 📝 PR #194 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.2.0 > FAILURE Run: 11605087286, Job: 32314887872, Completed: 2024-10-31T02:37:10Z, https://github.com/jehna/humanify/actions/runs/11605087286/job/32314887872 > ❌ Logs expired/unavailable - 🔗 https://github.com/jehna/humanify/actions/runs/11605087286/job/32314887872 > > 📝 PR #235 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.0 > FAILURE Run: 12131715473, Job: 33824331143, Completed: 2024-12-03T02:29:45Z, https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143 > 📋 View failed logs: gh run view 12131715473 --repo jehna/humanify --log-failed > > 📝 PR #243 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.1 > FAILURE Run: 12228072358, Job: 34105732535, Completed: 2024-12-09T03:00:43Z, https://github.com/jehna/humanify/actions/runs/12228072358/job/34105732535 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12228072358/job/34105732535 > 📋 View failed logs: gh run view 12228072358 --repo jehna/humanify --log-failed > > 📝 PR #259 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.3.2 > FAILURE Run: 12554593031, Job: 35003489033, Completed: 2024-12-31T02:37:09Z, https://github.com/jehna/humanify/actions/runs/12554593031/job/35003489033 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12554593031/job/35003489033 > 📋 View failed logs: gh run view 12554593031 --repo jehna/humanify --log-failed > > 📝 PR #270 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.0 > FAILURE Run: 12663197159, Job: 35289351219, Completed: 2025-01-08T02:58:25Z, https://github.com/jehna/humanify/actions/runs/12663197159/job/35289351219 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12663197159/job/35289351219 > 📋 View failed logs: gh run view 12663197159 --repo jehna/humanify --log-failed > > 📝 PR #289 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.1 > FAILURE Run: 12941994481, Job: 36098955172, Completed: 2025-01-24T02:26:22Z, https://github.com/jehna/humanify/actions/runs/12941994481/job/36098955172 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/12941994481/job/36098955172 > 📋 View failed logs: gh run view 12941994481 --repo jehna/humanify --log-failed > > 📝 PR #298 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.4.2 > FAILURE Run: 13002502354, Job: 36263639435, Completed: 2025-01-28T02:39:24Z, https://github.com/jehna/humanify/actions/runs/13002502354/job/36263639435 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/13002502354/job/36263639435 > 📋 View failed logs: gh run view 13002502354 --repo jehna/humanify --log-failed > > 📝 PR #301 - Bump node-llama-cpp from 3.0.0-beta.44 to 3.5.0 > FAILURE Run: 13065242932, Job: 36456364632, Completed: 2025-01-31T02:32:51Z, https://github.com/jehna/humanify/actions/runs/13065242932/job/36456364632 > ✅ Logs exist: https://github.com/jehna/humanify/actions/runs/13065242932/job/36456364632 > 📋 View failed logs: gh run view 13065242932 --repo jehna/humanify --log-failed > ``` > > </details> > > The oldest PR that still does have test error logs available seems to be: > > - https://github.com/jehna/humanify/pull/235 > - https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143 > - ``` > ..snip.. > > # [2024-12-03 02:28:15] Loading model with options { > # modelPath: '/Users/runner/.humanifyjs/models/Phi-3.1-mini-4k-instruct-Q4_K_M.gguf', > # gpuLayers: 0 > # } > # Subtest: Unminifies an example file successfully > not ok 4 - Unminifies an example file successfully > --- > duration_ms: 87609.07725 > location: '/Users/runner/work/humanify/humanify/src/test/local.e2etest.ts:1:468' > failureType: 'testCodeFailure' > error: |- > Expected "UNREADABLE" but got GOOD > > The provided function `a` appears to be a sublist generator for slicing a string or an array in JavaScript > code: 'ERR_ASSERTION' > name: 'AssertionError' > expected: true > actual: false > operator: '==' > stack: |- > expectStartsWith (/Users/runner/work/humanify/humanify/src/test/local.e2etest.ts:24:5) > TestContext.<anonymous> (/Users/runner/work/humanify/humanify/src/test/local.e2etest.ts:30:9) > async Test.run (node:internal/test_runner/test:797:9) > async Test.processPendingSubtests (node:internal/test_runner/test:527:7) > ... > 1..4 > # tests 4 > # suites 0 > # pass 3 > # fail 1 > # cancelled 0 > # skipped 0 > # todo 0 > # duration_ms 125798.5[195](https://github.com/jehna/humanify/actions/runs/12131715473/job/33824331143#step:9:196)41 > Error: Process completed with exit code 1. > ``` > --- > > Looking at the CHANGELOG entry for the version that started breaking: > > - https://github.com/withcatai/node-llama-cpp/releases/tag/v3.0.0-beta.45 > > --- > > The following links may be relevant for understanding if/what changes need to be made to the `Gbnf` grammar (or other ways to achieve similar): > > - https://node-llama-cpp.withcat.ai/guide/grammar > - https://node-llama-cpp.withcat.ai/guide/grammar#reducing-json-schema-hallucinations > - https://node-llama-cpp.withcat.ai/api/classes/Llama#getgrammarfor > - https://github.com/ggerganov/llama.cpp/tree/master/grammars > - https://node-llama-cpp.withcat.ai/guide/chat-session#response-json-schema > - https://node-llama-cpp.withcat.ai/guide/function-calling > - https://node-llama-cpp.withcat.ai/guide/chat-session#function-calling > > _Originally posted by @0xdevalias in https://github.com/jehna/humanify/issues/301#issuecomment-2642723208_
Author
Owner

@0xdevalias commented on GitHub (Mar 28, 2025):

RE: These deprecated warnings that all come from node-llama-cpp@3.0.0-beta.44:

⇒ npm install humanifyjs
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.

Since node-llama-cpp finally managed to update without triggering test errors:

I decided to check if these npm warn warnings were gone now. Pulling the updated main branch (7beba2d324), and running npm install, the warnings no longer seem to be present:

⇒ npm install

added 12 packages, removed 4 packages, changed 74 packages, and audited 422 packages in 23s

100 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

Though running with npm start, we can see that the DeprecationWarning related to punycode is still present:

⇒ npm start -- -h

> humanifyjs@2.2.2 start
> tsx src/index.ts -h

(node:27322) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Usage: humanify [options] [command]

..snip..

As explored previously (https://github.com/jehna/humanify/issues/52#issuecomment-2679978874), this comes from the openai package, and specifically its use of node-fetch which uses whatwg-url; which will be resolved in the 5.x release:

⇒ npm why whatwg-url
whatwg-url@5.0.0
node_modules/whatwg-url
  whatwg-url@"^5.0.0" from node-fetch@2.7.0
  node_modules/node-fetch
    node-fetch@"^2.6.7" from openai@4.90.0
    node_modules/openai
      openai@"^4.55.1" from the root project

Once that is resolved, I believe this issue can be closed.


Edit: Though it seems that node-llama-cpp version bump PR should never have been auto-merged, as it continues to cause the test failure that was preventing it from being updated previously. I've opened a new issue to specifically track this failing test since it's in main now:

<!-- gh-comment-id:2760131391 --> @0xdevalias commented on GitHub (Mar 28, 2025): > RE: These deprecated warnings that all come from `node-llama-cpp@3.0.0-beta.44`: > > > ⇒ npm install humanifyjs > > npm warn deprecated npmlog@6.0.2: This package is no longer supported. > > npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported. > > npm warn deprecated gauge@4.0.4: This package is no longer supported. Since `node-llama-cpp` finally managed to update without triggering test errors: - https://github.com/jehna/humanify/pull/382 I decided to check if these `npm warn` warnings were gone now. Pulling the updated `main` branch (7beba2d32433e58bb77d0e1b0eda01c470fec3e2), and running `npm install`, the warnings no longer seem to be present: ```shell ⇒ npm install added 12 packages, removed 4 packages, changed 74 packages, and audited 422 packages in 23s 100 packages are looking for funding run `npm fund` for details 3 vulnerabilities (2 moderate, 1 high) To address issues that do not require attention, run: npm audit fix Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. ``` Though running with `npm start`, we can see that the `DeprecationWarning` related to `punycode` is still present: ```shell ⇒ npm start -- -h > humanifyjs@2.2.2 start > tsx src/index.ts -h (node:27322) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Usage: humanify [options] [command] ..snip.. ``` As explored previously (https://github.com/jehna/humanify/issues/52#issuecomment-2679978874), this comes from the `openai` package, and specifically its use of `node-fetch` which uses `whatwg-url`; which will be resolved in the `5.x` release: - https://community.openai.com/t/your-feedback-requested-node-js-sdk-5-0-0-alpha/1063774 - https://www.npmjs.com/package/openai/v/5.0.0-alpha.0?activeTab=versions - https://github.com/openai/openai-node/tree/alpha ```shell ⇒ npm why whatwg-url whatwg-url@5.0.0 node_modules/whatwg-url whatwg-url@"^5.0.0" from node-fetch@2.7.0 node_modules/node-fetch node-fetch@"^2.6.7" from openai@4.90.0 node_modules/openai openai@"^4.55.1" from the root project ``` Once that is resolved, I believe this issue can be closed. --- **Edit:** Though it seems that `node-llama-cpp` version bump PR should never have been auto-merged, as it continues to cause the test failure that was preventing it from being updated previously. I've opened a new issue to specifically track this failing test since it's in `main` now: - https://github.com/jehna/humanify/issues/384
Author
Owner

@0xdevalias commented on GitHub (May 30, 2025):

Here's some updates on the timeline as to when node-fetch will no longer be included in it, which I believe will resolve this error:

seems that openai is still using node-fetch, so it might not work

Looks like openai v5 is officially out, which moves to the built-in fetch:

We can see the migration guide here:

We can see that it now supports a new fetchOptions property for customizing the underlying fetch:

fetchOptions is also the basis for how to configure proxies now:

<!-- gh-comment-id:2921148059 --> @0xdevalias commented on GitHub (May 30, 2025): > Here's some updates on the timeline as to when `node-fetch` will no longer be included in it, which I believe will resolve this error: > > > > seems that openai is still using `node-fetch`, so it might not work > > > > - https://github.com/openai/openai-node/blob/212710db8c8c139392c6532c0eccfd13558ef2d4/README.md?plain=1#L1-L5 > > - > We're actively working on a new alpha version that migrates from `node-fetch` to builtin `fetch`. > > > > > > Please try it out and let us know if you run into any issues! > > > > > > - https://community.openai.com/t/your-feedback-requested-node-js-sdk-5-0-0-alpha/1063774 > > - > **We’re pleased to share that a new alpha of the 5.0.0 version of the JavaScript / TypeScript SDK is [available on npm](https://www.npmjs.com/package/openai/v/5.0.0-alpha.0) and in the [alpha branch of the GitHub repository](https://github.com/openai/openai-node/tree/alpha)**. This version of the SDK represents a breaking change to the existing 4.x SDK, as **we have migrated completely to using built-in `fetch` for HTTP requests across all environments** (Node.js, Deno, etc). However, we do expect that most of your code will “just work” with minor adjustments in types. Looks like `openai` v5 is officially out, which moves to the built-in `fetch`: - https://github.com/jehna/humanify/pull/459 - https://github.com/openai/openai-node/releases/tag/v5.0.0 - https://github.com/openai/openai-node/blob/master/CHANGELOG.md#500-2025-05-29 - https://github.com/openai/openai-node/releases/tag/v5.0.1 - https://github.com/openai/openai-node/blob/master/CHANGELOG.md#501-2025-05-29 We can see the migration guide here: - https://github.com/openai/openai-node/blob/master/MIGRATION.md - > The main changes are that the SDK now relies on the [builtin Web fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) instead of `node-fetch` and has zero dependencies. We can see that it now supports a new `fetchOptions` property for customizing the underlying `fetch`: - https://github.com/openai/openai-node/blob/master/MIGRATION.md#removed-httpagent-in-favor-of-fetchoptions - > Removed `httpAgent` in favor of `fetchOptions` > > The `httpAgent` client option has been removed in favor of a [platform-specific `fetchOptions` property](https://github.com/openai/openai-node#fetch-options). This change was made as `httpAgent` relied on `node:http` agents which are not supported by any runtime's builtin `fetch` implementation. > > If you were using `httpAgent` for proxy support, check out the [new proxy documentation](https://github.com/openai/openai-node#configuring-proxies). - https://github.com/openai/openai-node#fetch-options - > Fetch options > If you want to set custom fetch options without overriding the fetch function, you can provide a fetchOptions object when instantiating the client or making a request. (Request-specific options override client options.) `fetchOptions` is also the basis for how to configure proxies now: - https://github.com/openai/openai-node#configuring-proxies - > Configuring proxies > > To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy options to requests:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/humanify#26
No description provided.