Skip to content

Adds support for SPFx v1.23.1. Closes #7395#7396

Closed
brianpmccullough wants to merge 3 commits into
pnp:mainfrom
brianpmccullough:spfx-v1.23.1
Closed

Adds support for SPFx v1.23.1. Closes #7395#7396
brianpmccullough wants to merge 3 commits into
pnp:mainfrom
brianpmccullough:spfx-v1.23.1

Conversation

@brianpmccullough

Copy link
Copy Markdown

Summary

This PR adds support for upgrading SharePoint Framework projects to v1.23.1.

Changes

  • upgrade-1.23.1.ts — upgrade rules bumping all @microsoft/sp-* packages and build tooling to 1.23.1
  • doctor-1.23.1.ts — doctor rules for v1.23.1 (same Node/TS/React prerequisites as 1.23.0)
  • project-upgrade.ts / project-doctor.ts — add 1.23.1 to supportedVersions
  • SpfxCompatibilityMatrix.ts — add 1.23.1 environment prerequisites entry
  • project-upgrade.mdx — update latest supported version reference to v1.23.1

Note: test project fixtures are not included in this PR and can be contributed separately.

Closes #7395

@waldekmastykarz waldekmastykarz marked this pull request as draft June 9, 2026 05:40
@waldekmastykarz

Copy link
Copy Markdown
Member

Thanks for the PR @brianpmccullough. That's however only a part of the story. We'd also need sample projects and tests to ensure we cover everything. Check out other versions deltas for example of how we're doing it. Let's the PR as a draft until then so that we don't merge it accidentally.

@brianpmccullough

brianpmccullough commented Jun 9, 2026

Copy link
Copy Markdown
Author

@waldekmastykarz I was basing on #7116 with the 1.22.1 > 1.22.2 upgrade.

It looks like test projects get created for the source versions, so in this case, I would create the missing /test-projects for 1.23.0 (e.g. spfx-1230-webpart-nolib, spfx-1230-applicationcustomizer).

Additionally, appropriate to create one react web part for 1.23.1 (just as in the referenced PR, spfx-1222-webpart-react (https://github.com/pnp/cli-microsoft365/pull/7116/changes#diff-16d711b439377162a27bcf2c77031102b89fd30f860209966091c5a40b756377)

Do I have this correct?

cc/ @milanholemans

@milanholemans

Copy link
Copy Markdown
Contributor

Yes, this is correct, you'll have to provide test projects of the previous version. This is because we implement tests that validate whether we can upgrade from the previous version to the latest version.
The single latest version test project is to validate the spfx project doctor command, if I'm not mistaken.

@brianpmccullough

brianpmccullough commented Jun 9, 2026

Copy link
Copy Markdown
Author

@milanholemans @waldekmastykarz Cool. Will work on it, most likely later this evening (eastern united states). Looks like my codespace has Node 21. But the SPFx 1.23 requires 22.x. Should PR include changes to dev container to bump node? Or just make these environmental changes locally without inclusion in PR?

@milanholemans

Copy link
Copy Markdown
Contributor

This container is not really aligned with the SPFx requirements, but rather the development requirements of CLI for Microsoft 365.
Normally, it should install the current version of Node.js if I'm not mistaken?

@brianpmccullough

Copy link
Copy Markdown
Author

cli-microsoft365-dev in cli-microsoft365 is 📦 11.9.0 via ⬢ v21.7.3 took 45.8s …
➜ node --version
v21.7.3

@brianpmccullough

Copy link
Copy Markdown
Author

@waldekmastykarz @milanholemans is "webpart-optionaldeps" equivalent of "Minimal" (given "webpart-nolib" seems to correlate to "No Library")?

@waldekmastykarz

Copy link
Copy Markdown
Member

Optionaldeps installs all optional dependencies. See existing test projects for reference.

@brianpmccullough

brianpmccullough commented Jun 9, 2026

Copy link
Copy Markdown
Author

Yes, I see, so use No Framework and add all the @microsoft/sp-* to the package.json?

@brianpmccullough

brianpmccullough commented Jun 9, 2026

Copy link
Copy Markdown
Author

@waldekmastykarz @milanholemans added /test-projects and tests based on pattern established with SPFx 1.22.2 upgrade PR. For the optionaldeps I ended up going with No Framework, then adding the 1.23.0 versions of the dependencies included in the same test project for 1.22.0. If this isn't correct please lmk. Please review tests as I believe I followed pattern correctly, but not 100% sure.

@milanholemans

Copy link
Copy Markdown
Contributor

@brianpmccullough, at first sight, it looks ok. If you're ready for a review, you can press the Ready for review button below.

@milanholemans milanholemans self-assigned this Jun 11, 2026
@brianpmccullough brianpmccullough marked this pull request as ready for review June 11, 2026 22:25
@milanholemans

milanholemans commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Hi @brianpmccullough, question from my side. Is the SPFx v1.23.1 working on your side? For me it seems like even a blank HelloWorld project instantly crashes.
Are you able to successfully upgrade from v1.23.0 to v1.23.1 and have a working web part as a result?

@brianpmccullough

Copy link
Copy Markdown
Author

@milanholemans I cannot. I will change this to DRAFT until there is more clarity around the 1.23.1 situation. SharePoint/sp-dev-docs#10905

@brianpmccullough brianpmccullough marked this pull request as draft June 16, 2026 17:52
@milanholemans

Copy link
Copy Markdown
Contributor

v1.23.1 of SPFx has been deprecated by Microsoft. We're currently discussing whether we want to include this version in CLI. Since this version completely breaks your SPFx project, I don't see much added benefit in adding it personally. I'll keep you updated.
Maybe if you still have the energy, you can work on the v1.23.2 version when it's released.

@brianpmccullough

Copy link
Copy Markdown
Author

@milanholemans I would agree if 1.23.1 is officially deprecated, that this CLI not support it.

The team I work with are keen on getting moved to SPFx @latest ASAP after release - we target having solutions upgraded within 45 days of release, so yes, I'll look to contribute PRs supporting upgrades.

Curious, any discussion on the upgrade capability making it into the new SPFx CLI? From a perspective of keeping the tooling ecosystem streamlined for developers it might make sense - that is one tool (cli) to handle all aspects of project lifecycle - new, additions, upgrades.

@milanholemans

Copy link
Copy Markdown
Contributor

Curious, any discussion on the upgrade capability making it into the new SPFx CLI?

There are no plans yet, AFAIK, but it's an interesting idea. If I'm not mistaken, the CLI will be open source and people will be able to contribute to it. So it might be an interesting idea to expose CLI through it.

@milanholemans

Copy link
Copy Markdown
Contributor

Hi @brianpmccullough, we're going to close this PR and wait for v1.23.2 to be released. Happy so see you again for another PR.

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.

m365 spfx project upgrade 1.23.1

3 participants