Skip to content

Update Node.js from v14 to v22 (current LTS)#536

Merged
b-g merged 11 commits into
hfg-gmuend:masterfrom
kili-ilo:update_node_version
Aug 8, 2025
Merged

Update Node.js from v14 to v22 (current LTS)#536
b-g merged 11 commits into
hfg-gmuend:masterfrom
kili-ilo:update_node_version

Conversation

@kili-ilo

Copy link
Copy Markdown
Contributor

Node.js v14 reached end-of-life in 2023. This will make it easier and safer to work with this repo.

Closes #482
Succeeds #484

~/_code/hfg-gmuend/openmoji 🌿 npm install
npm warn old lockfile
npm warn old lockfile The package-lock.json file was created with an old version of npm,
npm warn old lockfile so supplemental metadata must be fetched from the registry.
npm warn old lockfile
npm warn old lockfile This is a one-time fix-up, please be patient...
npm warn old lockfile

up to date, audited 319 packages in 1s

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

21 vulnerabilities (8 moderate, 10 high, 3 critical)

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

To address all issues possible (including breaking changes), run:
  npm audit fix --force

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

Run `npm audit` for details.
~/_code/hfg-gmuend/openmoji 🌿

@kili-ilo

kili-ilo commented Apr 13, 2025

Copy link
Copy Markdown
Contributor Author

I successfully ran npm run export-svg and npm run generate-font on this branch.

@kili-ilo

Copy link
Copy Markdown
Contributor Author

npm test barely fails, but I see the same result on my branch for #535 (and I'm unable to npm install on master).

Saved working directory and index state WIP on update_node_version: 6169ae0a2 Update Node.js from v14 to v22 (curr
~/_code/hfg-gmuend/openmoji 🌿 npm test

> openmoji@15.1.0 test
> mocha --parallel --reporter min test/*.{js,mjs} --openmoji-data-json $PWD/data/openmoji.json --openmoji-src-fold



































  77944 passing (32s)
  1 failing

  1) Uncaught error outside test suite:
     Uncaught TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
      at Object.basename (node:path:1404:5)
      at /home/jan/_code/hfg-gmuend/openmoji/test/file-exists-src.js:30:28
      at Array.forEach (<anonymous>)
      at Suite.<anonymous> (test/file-exists-src.js:28:14)
      at Suite.<anonymous> (test/file-exists-src.js:27:3)
      at Object.<anonymous> (test/file-exists-src.js:14:1)



~/_code/hfg-gmuend/openmoji 🌿

@kili-ilo

Copy link
Copy Markdown
Contributor Author

Here's the output while updating package-lock.json:

~/_code/hfg-gmuend/openmoji 🌿 npm install
npm warn old lockfile
npm warn old lockfile The package-lock.json file was created with an old version of npm,
npm warn old lockfile so supplemental metadata must be fetched from the registry.
npm warn old lockfile
npm warn old lockfile This is a one-time fix-up, please be patient...
npm warn old lockfile
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated request-promise-native@1.0.7: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm warn deprecated har-validator@5.1.3: this library is no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated domexception@1.0.1: Use your platform's native DOMException instead
npm warn deprecated abab@2.0.0: Use your platform's native atob() and btoa() methods instead
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated glob@7.2.0: Glob versions prior to v9 are no longer supported
npm warn deprecated w3c-hr-time@1.0.1: Use your platform's native performance.now() and performance.timeOrigin.
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm warn deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated loupe@2.3.3: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5
npm warn deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.

added 330 packages, and audited 331 packages in 43s

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

21 vulnerabilities (8 moderate, 10 high, 3 critical)

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

To address all issues possible (including breaking changes), run:
  npm audit fix --force

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

Run `npm audit` for details.
~/_code/hfg-gmuend/openmoji 🌿

@kili-ilo

Copy link
Copy Markdown
Contributor Author

npm test now passes! 🤷🏻‍♀️

~/_code/hfg-gmuend/openmoji 🌿 npm test

> openmoji@15.1.0 test
> mocha --parallel --reporter min test/*.{js,mjs} --openmoji-data-jso
n $PWD/data/openmoji.json --openmoji-src-folder $PWD/src

[...]

  82778 passing (33s)

~/_code/hfg-gmuend/openmoji 🌿

@kili-ilo

Copy link
Copy Markdown
Contributor Author

CC @b-g

@b-g

b-g commented Apr 23, 2025

Copy link
Copy Markdown
Member

Hi @kili-ilo, many many thanks for tackling this. However, besides the test it would be important to check:

  • npm run generate: Delete before running all derived assets in /black/* and /color/*. Add some non snese line break in a few svg source files ... is the openmoji svg source file format enforced after running "generate"?
  • npm run generate-fonts: make sure that docker is running in background
  • are all the little helpers working?
  • npm test

Could you please double check the things above? Sorry to bother ... but node v22 would be mega, but I'm very hesitant to change the current working system. I hope you understand.

@kili-ilo

Copy link
Copy Markdown
Contributor Author

I totally understand! I'm happy to super-test this like that. I'm afk this week, so I can do those next week.

@kili-ilo

kili-ilo commented Apr 29, 2025

Copy link
Copy Markdown
Contributor Author
  • npm run generate
    • Runs smoothly
    • SVGs:
      • Modifies every exported SVG with no-op changes (whitespace, /> vs. ></), perhaps due to some formatting change in a JS dependency (since I see no SVG export diffs on master)
      • I've added a helpers/pretty-exported-svg.sh helper script to eliminate those discrepancies from git diffs. It takes a very long time to run (on my machine, like all of the export/generate scripts too), so I'm happy to remove it if you'd prefer to just manually ignore these touches after every export.
    • PNGs:
      • Modifies every exported PNG with no-op changes (I can't tell what they are - images look identical), but this also happens for me on master - I infer that this is an existing problem and that you prefer to just manually ignore these touches after every export.
  • npm run generate-fonts
    • Runs smoothly
  • all the little helpers
    • all those that are called by the generate script run smoothly
      • helpers/find-emojis.js
      • helpers/generate-data-tables.js
      • helpers/generate-index-html.js
      • helpers/generate-index-list-html.js
      • helpers/pretty-src-svg.js
    • ./helpers/force-color-palette-svg.js runs smoothly
    • I think that's enough of a sample size to consider them happy, but let me know if you'd like a complete inventory.
  • npm test
    • still green

FWIW, here are recordings of me working on the above tests (too long, don't watch all, haha):

(expired, not worth re-posting)

@b-g

b-g commented May 7, 2025

Copy link
Copy Markdown
Member

Hi @kili-ilo, many thanks for this great gift! This is super! Just I'm hyper busy the next 2 weeks and don't have time to test this in detail. Sorry! Will look into it asap after. Stay tuned. All the best.

@kili-ilo

kili-ilo commented May 7, 2025

Copy link
Copy Markdown
Contributor Author

No problem, I'm not blocked by this. Take your time!

@b-g
b-g merged commit a2b4fc1 into hfg-gmuend:master Aug 8, 2025
1 check passed
@b-g

b-g commented Aug 8, 2025

Copy link
Copy Markdown
Member

Hi @kili-ilo, my apologies that it took that long! This is all mega! Merged + many many thanks!! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update nodejs version

2 participants