Skip to content

Update spfx project azuredevops pipeline add and spfx project github workflow add to work with any version of SPFx #6717

@Adam-it

Description

@Adam-it

🎯 Aim

Currently the spfx project github workflow add and spfx project azuredevops pipeline add will scaffold an flow for the currently latest SPFx version. What we do is in both commands expose a variable that allow to specify the Node version that should be used in the flow and we set a default value as Node v22 which is currently ok for latest version of SPFx -> example result

What we could do is reuse the compatibility matrix we have in the spfx doctor command, maybe extract it to a separate file, and then based on the SPFx version found in the project pick the correct version of node and set it in the Node version variable.
That way we will allow to create a workflow/pipeline for any version of SPFx.

🤔 Considirations

We need to check as I wonder if GitHub allows running workflows with very old (legacy) versions of Node.js like v8 or v10 🤔. I am sure Azure DevOps does not have problem with it but I think we should recheck this for GitHub.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions