Skip to content

Make MapStore compatible with NodeJS 22 and next #11577

@offtherailz

Description

@offtherailz

See #11481and in particular this comment

We need to make MapStore compatible with future versions of NodeJS.

Image

From a first test, only docma build looks to be fail. In order to make MapStore compatible with Node 22 (and next), we need to find a solution for Docma documentation.

Docma project has been abandoned, and even updating to the latest version do not work with Node 22, because of some deprecation warnings due to jsdoc-x lib (from the same author, and looks abandoned too).

Error: (node:347738) [DEP0055] DeprecationWarning: The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:347738) [DEP0047] DeprecationWarning: The `util.isDate` API is deprecated.  Please use `arg instanceof Date` instead.
(node:347738) [DEP0048] DeprecationWarning: The `util.isError` API is deprecated. Please use `ObjectPrototypeToString(e) === "[object Error]" || e instanceof Error` instead.
 
Executed JSDoc Command: jsdoc -X 

[...]

with JSON configuration: {"tags":{"allowUnknownTags":true,"dictionaries":["jsdoc","closure"]},"source":{"includePattern":".+\\.js(doc|x)?$","excludePattern":"(^|\\/|\\\\)_"},"templates":{"cleverLinks":false,"monospaceLinks":false},"plugins":["plugins/markdown"]}
    at ChildProcess.<anonymous> (/home/offtherailz/work/projects/mapstore/MapStore2/node_modules/jsdoc-x/src/lib/helper.js:141:54)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)

Possible solutions are:

  1. Isolate the docma build in a separate project (e.g. build/docs/package.json, or separate program to run with npx to build ms documentation)
  2. Use pure JSDoc
  3. Fork docma and jsdoc-x to update
  4. Use another tool for building documentation

(wip):
NODE_OPTIONS="--no-deprecation" npm run jsdoc:build works!!

Metadata

Metadata

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions