Skip to content

Allow node-red integrator access to available updates #5499

Merged
knolleary merged 4 commits intomasterfrom
palette-updates
Feb 25, 2026
Merged

Allow node-red integrator access to available updates #5499
knolleary merged 4 commits intomasterfrom
palette-updates

Conversation

@Steve-Mcl
Copy link
Copy Markdown
Contributor

@Steve-Mcl Steve-Mcl commented Feb 25, 2026

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

So that an integrators can determine if updates are available:

  • Allow access to available updates via RED API RED.palette.editor.getAvailableUpdates()
    • This permits integrator to request state of updates (init time)
  • Emit event "registry:updates-available" to emit updates on changes
    • This permits reactive integration (without polling

Example usage

        let nrUpdates
        function init () {
            // get state on startup
            nrUpdates = RED.palette.editor.getAvailableUpdates()
        }
        
        // receive updates reactively as they occur
        RED.events.on("registry:updates-available", (updates) => {
            nrUpdates = updates
            console.log("Updates available", updates)
        })

Example Output 1 palette item update available

{
    "count": 1,
    "core": null,
    "palette": [
        {
            "package": "node-red-contrib-thing",
            "current": "0.10.2-dev",
            "latest": "0.10.3"
        }
    ]
}

Example Output 1 palette item and core update available

{
    "count": 2,
    "core": {
            "current": "4.1.6",
            "latest": "5.0.0"        
    },
    "palette": [
        {
            "package": "node-red-contrib-thing",
            "current": "0.10.2-dev",
            "latest": "0.10.3"
        }
    ]
}

Example Output available updates cleared due to user updating

{
    "count": 0,
    "core": null,
    "palette": []
}

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run npm run test to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@Steve-Mcl Steve-Mcl requested a review from knolleary February 25, 2026 09:23
@Steve-Mcl Steve-Mcl requested a review from knolleary February 25, 2026 15:47
@knolleary knolleary merged commit 4cf4817 into master Feb 25, 2026
5 checks passed
@knolleary knolleary deleted the palette-updates branch February 25, 2026 15:55
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.

2 participants