Skip to content

docs: clarify settings.js nodesDir accepts an array of paths - #5925

Merged
dceejay merged 1 commit into
node-red:mainfrom
Bryandero98:1131-document-nodesdir-array
Sep 7, 2026
Merged

dceejay merged 1 commit into
node-red:mainfrom
Bryandero98:1131-document-nodesdir-array

Conversation

@Bryandero98

Copy link
Copy Markdown
Contributor

Related issue

Fixes #1131

What changed

The nodesDir comment in settings.js only said "an additional directory", but the runtime has accepted an array of paths since 0b8e8de2 (0.7.0, April 2014) — confirmed in localfilesystem.js:

nodesDir = Array.isArray(settings.nodesDir) ? settings.nodesDir : [settings.nodesDir]

This was never reflected in the comment, so the array support could only be discovered by reading the source (as the issue reporter did). Updated the comment to mention both forms and added a commented-out array example, matching the existing single-path example style.

A follow-up PR will update the matching entry in docs/user-guide/runtime/configuration.md on node-red.github.io.

🤖 Generated with Claude Code

The nodesDir comment only mentioned "an additional directory",
but the runtime has accepted an array of paths since 0.7.0 (2014) -
verified in localfilesystem.js, which normalizes the setting with
Array.isArray(settings.nodesDir) ? settings.nodesDir : [settings.nodesDir].
This was never reflected here, so users could only discover the
array support by reading the source.

Fixes node-red#1131

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Bryandero98 / name: Bryandero98 (723e999)

dceejay pushed a commit to node-red/node-red.github.io that referenced this pull request Sep 7, 2026
The configuration reference only mentioned "a directory", but the
runtime has accepted an array of paths since 0.7.0 (April 2014) -
verified against localfilesystem.js in node-red/node-red, which
normalizes the setting to an array either way. Companion fix to the
settings.js comment in node-red/node-red#5925.

Fixes node-red/node-red#1131

Co-authored-by: Claude Sonnet 5 <[email protected]>
@dceejay
dceejay merged commit d5d883d into node-red:main Sep 7, 2026
3 checks passed
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.

array of paths as settings.nodesDir not documented (almost)

2 participants