This was working until recently, don't think it is something I've done?
The following used to work to add some extra definitions to the function node:
window.monaco.languages.typescript.javascriptDefaults.addExtraLib(
typeDeclarations,
'file://types/uibuilder/uib-util.d.ts'
)
But as of v5.0.9, it no longer works.
It now looks as though it has moved to:
window.monaco.typescript.javascriptDefaults.addExtraLib
Can someone confirm if this is correct please?
If it is correct, it is really a Node-RED breaking change isn't it? At the very least, doing this now requires additional checks for the correct location.
The changelogs support your finding. Monaco lists the move from monaco.languages.typescript to monaco.typescript as a breaking change in 0.55.0. Node-RED's changelog records the update to Monaco 0.55.1 under 5.0.0-beta.3, rather than under 5.0.9. That points to the namespace change arriving during the 5.0 development cycle, not being newly introduced by the 5.0.9 maintenance release. Code using the old namespace needs to account for that upstream API change.
Yes, they removed the languages object.
Thanks both, I've had to add a test for which version is being used in order for it not to be broken in different versions of Node-RED.
For now though, anyone using v7 UIBUILDER with Node-RED v5.0.9 will not get the function node help for the uibuilder functions. The fix will be in v8.