node-red / node-red-dev-cli

Command-line tool for Node-RED Node authors
Apache License 2.0
7 stars 6 forks source link

Check Editor Compatibility #13

Open sammachin opened 2 years ago

sammachin commented 2 years ago

Test for compatibility with the Monaco editor

Steve-Mcl commented 2 years ago

The issue was an old (but well used) node-red contrib node was duplicated (and modified) by several users to create new nodes. The original contrib node had a copy of multiple-select.js (V1.4.2) embeded in its src (rather than required

While it might prove difficult to test for this embeded js file & its version, we can certainly check for installs of the below nodes where version is < the version of the known fix for these items?

sammachin commented 2 years ago

So if we were checking a new node outside of a Node-RED install we would need to look for that multiple-select.js file in the static folder?

What about if the node is fetching it externally, can it come from npm? or is it a CDN thing?

Steve-Mcl commented 2 years ago

What about if the node is fetching it externally, can it come from npm? or is it a CDN thing?

If we can check the version is > 1.4.2 then it is ok (as we can with a NPM and sometimes a CDN if it is encoded in the name or meta data is available).

If we find a file in a static folder named multiple-select.js then perhaps a warning unless we know the package to by updated (as above)?

In fact, static files are prone to falling behind the original repo/package (assuming they are a copy of an actual package as this one is) - hmmmm - can-o-worms