Nice work.
One minor issue running against uibuilder vNext, looks like the node parser can't cope with the alternate layout for the .js file right now.
C:\src\node-red-contrib-uibuilder [vNext ≡ +1 ~4 -0 !]
> node-red-dev validate
---Validating Package---
node-red-contrib-uibuilder@5.0.0-dev
✅ Package is Apache-2.0 licensed
✅ Repository/Bugs Link Supplied
» Warning: P04 New Packages should use a scoped name
✅ Package uses a valid name
✅ No similar named packages found
✅ Node-RED Keyword Found
✅ Compatible with Node-RED v2.2.0
✅ Compatible with Node-RED v1.3.7
» Warning: P07 Minimum Node version is not compatible with minimum supported Node-RED Version Node v12.0.0
---Validating Nodes---
Unable to parse nodes/uibuilder.js
Unable to parse nodes/uib-sender.js
Unable to parse nodes/uib-cache.js
✅ Nodes all have unique names
✅ Examples found for all nodes
---Validating Dependencies---
» Warning: D01 Package has a large number of dependencies (14)
> ✅ No incompatible packages found in dependency tree
» Warning: D03 execa is not at latest version, package.json specifies: ^5.1.1, latest is: 6.0.0
Complete
Similarly on the wiser nodes:
C:\src\node-red-contrib-drayton-wiser [main ≡ +4 ~4 -0 !]
> node-red-dev validate
---Validating Package---
@totallyinformation/node-red-contrib-drayton-wiser@0.0.3
✅ Package is Apache-2.0 licensed
✅ Repository/Bugs Link Supplied
✅ Package uses a Scoped Name
✅ Package uses a Scoped Name
✅ No similar named packages found
✅ Node-RED Keyword Found
✅ Compatible with Node-RED v2.2.0
» Warning: P06 NOT Compatible with Node-RED v1.3.7
» Warning: P07 Minimum Node version is not compatible with minimum supported Node-RED Version Node v12.0.0
---Validating Nodes---
Unable to parse nodes/wiser.js
Unable to parse nodes/wiser-listen.js
✅ Nodes all have unique names
» Warning: No examples found
---Validating Dependencies---
✅ Package has 5 dependencies
could not find a satisfactory version for string github:totallyinformation/ti-common-event-handler
✅ No incompatible packages found in dependency tree
✅ All prod dependencies using latest versions
Complete
Re the minimum node warning - it would, I think, be better to show what node-red requires and what the node requires? While I know, if that is also shown in the flows library, other people wouldn't know what the difference was. In the case of my newer nodes, the difference is that I have a minimum node.js version of 12.20 as there are a number of bug fixes and some revisions in that version that would probably be needed by the code in the nodes.
Also, the flow entry for the wiser nodes show:
But the package.json certainly has it:
UPDATE: re Unable to parse
in checks.
Checking the code, it appears that only the .html is actually checked, not the .js file so my assumption was wrong. The reason the checkNodes
funtion is struggling is that my .html files do not have type="...."
on the javascript script tag - this is correct for HTML v5.
checknodes.js - node-red/node-red-dev-cli - GitHub1s
/<script.+?type=['"]text\/javascript['"].*?>([\S\s]*?)<\/script>/ig
From MDN:
The HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.