mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Detect externalModule dependencies inside subflow modules
Not sure this is 100% the right approach. If a subflow module has a dependency it should be in the subflow's package.json and therefore installed next to the subflow module in ~/.node-red/node_modules. By treating it as a 'normal' external module, it will be dynamically installed in ~/.node-red/externalModules. That then exposes the module to the user who won't know why its there and may remove it. It would be better to allow nodes inside a subflow module to require from ~/.node-red/node_modules and not limit it to the externalModules dir. The hard part is knowing when to do that.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "test-subflow-mod",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"license": "ISC",
|
||||
@@ -13,6 +13,7 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"node-red-node-random": "*"
|
||||
"node-red-node-random": "*",
|
||||
"cowsay2": "*"
|
||||
}
|
||||
}
|
||||
|
@@ -189,6 +189,7 @@
|
||||
"noerr": 0,
|
||||
"initialize": "",
|
||||
"finalize": "",
|
||||
"libs": [ {"var":"cowsay2","module":"cowsay2"}],
|
||||
"x": 240,
|
||||
"y": 100,
|
||||
"wires": [
|
||||
|
Binary file not shown.
BIN
test/resources/subflow/test-subflow-mod-1.0.2.tgz
Normal file
BIN
test/resources/subflow/test-subflow-mod-1.0.2.tgz
Normal file
Binary file not shown.
Reference in New Issue
Block a user