Skip to content

Incorrectly reports "Warning: P06 Not Compatible with any current Node-RED versions" #30

@twystd

Description

@twystd

The package validation check incorrectly reports a "Warning: P06 Not Compatible with any current Node-RED versions" if any version is not compatible, e.g.:

✅ Node-RED Keyword Found
 ›   Warning: P06 NOT Compatible with Node-RED v1.3.7
 ›   Warning: P06 Not Compatible with any current Node-RED versions
✅ Compatible with Node-RED v2.2.3
✅ Compatible with Node-RED v3.1.15
✅ Compatible with Node-RED v4.0.9

I think the problem is in checkpackage.js, lines L182-L200 - the if (!compatible){...} is inside the versions loop:

            //Test version against current versions
            let compatible = false
            let cv = []
            versions.forEach(v  => {
                if (semver.satisfies(v, package['node-red'].version)){
                    cli.log(`✅ Compatible with Node-RED v${v}`)
                    compatible = true
                    scorecard.P06 = { 'test' : true}
                    cv.push(v)
                } else {
                    cli.warn(`P06 NOT Compatible with Node-RED v${v}`)
                }
                if (!compatible){
                    cli.warn('P06 Not Compatible with any current Node-RED versions')
                    scorecard.P06 = { 'test' : false}
                } else {
                    scorecard.P06.versions = cv
                }
            })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions