Adds support for SPFx v1.23.1. Closes #7395#7396
Conversation
|
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. |
|
@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 |
|
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. |
|
@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? |
|
This container is not really aligned with the SPFx requirements, but rather the development requirements of CLI for Microsoft 365. |
|
cli-microsoft365-dev in cli-microsoft365 is 📦 11.9.0 via ⬢ v21.7.3 took 45.8s … |
|
@waldekmastykarz @milanholemans is "webpart-optionaldeps" equivalent of "Minimal" (given "webpart-nolib" seems to correlate to "No Library")? |
|
Optionaldeps installs all optional dependencies. See existing test projects for reference. |
|
Yes, I see, so use No Framework and add all the @microsoft/sp-* to the package.json? |
|
@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. |
|
@brianpmccullough, at first sight, it looks ok. If you're ready for a review, you can press the |
|
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. |
|
@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 |
|
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. |
|
@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. |
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. |
|
Hi @brianpmccullough, we're going to close this PR and wait for |
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.1doctor-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 tosupportedVersionsSpfxCompatibilityMatrix.ts— add 1.23.1 environment prerequisites entryproject-upgrade.mdx— update latest supported version reference to v1.23.1Closes #7395