Skip to content

Conversation

@Adam-it
Copy link
Member

@Adam-it Adam-it commented Jun 19, 2025

Closes #6717

Copy link
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool enhancement @Adam-it! This will improve the command a lot.
However, while reviewing, I found a few things we should take a look at first.

@milanholemans milanholemans marked this pull request as draft October 17, 2025 22:54
@milanholemans milanholemans requested a review from Copilot October 17, 2025 22:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates CI/CD workflow commands to dynamically determine the Node.js version based on the SharePoint Framework (SPFx) project version rather than using a hardcoded version. The PR refactors shared compatibility data into a separate module and adds logic to compute the appropriate Node.js version from version ranges.

  • Extracts SPFx version compatibility matrix to a shared module
  • Adds utility function to parse version ranges and determine highest compatible Node.js version
  • Updates GitHub workflow and Azure DevOps pipeline commands to set Node.js version dynamically

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/spfx.ts Added utility function to extract highest Node version from semver range
src/utils/spfx.spec.ts Added test coverage for the new utility function
src/m365/spfx/commands/spfx-doctor.ts Removed duplicate compatibility matrix, now imports from shared module
src/m365/spfx/commands/project/project-github-workflow-add.ts Added logic to determine and set Node version based on SPFx project version
src/m365/spfx/commands/project/project-github-workflow-add.spec.ts Added test coverage for version determination and error handling
src/m365/spfx/commands/project/project-azuredevops-pipeline-add.ts Added logic to determine and set Node version based on SPFx project version
src/m365/spfx/commands/project/project-azuredevops-pipeline-add.spec.ts Added test coverage for version determination and error handling
src/m365/spfx/commands/project/DeployWorkflow.ts Changed default Node version from hardcoded "22.x" to empty string
src/m365/spfx/commands/SpfxCompatibilityMatrix.ts New shared module containing SPFx compatibility matrix data

@Adam-it Adam-it force-pushed the updates-ci-cd-commands-to-support-all-spfx-versions branch from 47d9054 to d6cbe35 Compare October 18, 2025 00:06
@Adam-it
Copy link
Member Author

Adam-it commented Oct 18, 2025

@milanholemans I added the first batch of fixes to your comments that I could do without thinking 😁.
As for the rest, I will look into them ASAP. In order to solve them, I need to remind myself how it works and why it works this way, as after such a time gap, I have no idea why some of the code was written this way 😁

@Adam-it Adam-it force-pushed the updates-ci-cd-commands-to-support-all-spfx-versions branch from ebb5e21 to 136ddf6 Compare November 22, 2025 22:04
@Adam-it Adam-it marked this pull request as ready for review November 22, 2025 23:07
@Adam-it
Copy link
Member Author

Adam-it commented Nov 22, 2025

@milanholemans it took a while, and I do apologize for that. Lately, I have more tasks/work in a day than I can simply manage within 24 hours

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.

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

2 participants