pnp / vscode-viva

With the SharePoint Framework Toolkit extension, you can create and manage your SharePoint Framework solutions on your tenant. All actions you need to perform during the development flow are at your fingertips.
https://marketplace.visualstudio.com/items?itemName=m365pnp.viva-connections-toolkit
MIT License
34 stars 14 forks source link

💡 [Feature]: Extra tasks to update Patch, Minor and Major version of SPFx project #94

Open martinlingstuyl opened 9 months ago

martinlingstuyl commented 9 months ago

🎯 Aim of the feature

Add extra tasks so that you can update the patch, minor or major version of an SPFx project (package-solution.json) in one click. Extra nice would be if it would also update the package.json version as well.

📷 Images (if possible) with expected result

image

Adam-it commented 9 months ago

Thanks @martinlingstuyl for adding an idea 👍. A couple of things I would like to clarify:

martinlingstuyl commented 9 months ago

I usually update the version with every change that I'm deploying. Just like we would do with the CLI. Some are patch versions, some minor and some major, depending on what I feel about it / semver :-)

I'm not entirely sure about the specifics, as I can't find the documentation about this, but versioning does seem to have impact on the version of the webpart that's loaded on SharePoint pages. Some time ago you would not really need to update the version per site, but these days it seems like it's really necessary to update on the site as well. (after deploying)

Also: I believe it's good practice to align the npm version with the project version. Check out this blog on the topic as well: https://n8d.at/how-to-version-new-sharepoint-framework-projects

We use a gulp task to sync both numbers, so they are the same.

I'd suggest we need to be able to increase any part of the version. So patch, minor and major separately. Maybe three tasks, or one task that asks what version you want to upgrade.

martinlingstuyl commented 9 months ago

Do my answers clarify it a bit for you? I'd wish to be able to be more specific on the impact of version numbers. maybe we should ask Vesa :-)

Adam-it commented 9 months ago

Do my answers clarify it a bit for you? I'd wish to be able to be more specific on the impact of version numbers. maybe we should ask Vesa :-)

Yes that helped a lot. Thanks for the additional info. @VesaJuvonen is usually very busy (totally understandable), but if you have anything worth adding regarding versioning of spfx package please do 👍

Adam-it commented 8 months ago

@martinlingstuyl I will set this feature for v3 In your answer I noticed

We use a gulp task to sync both numbers, so they are the same.

So you use a custom defined gulp task for it, right? I think in there is no OOTB gupl task for it delivered with @microsoft/sp-build-core-tasks package 🤔? Viva Toolkit base on those tasks as then we assume in every project they exist. We don't deliver any custom gulp tasks for every project.

martinlingstuyl commented 8 months ago

I think in there is no OOTB gupl task for it delivered with @microsoft/sp-build-core-tasks package

No that's correct, we've copied it from internet somewhere. It's picking up on an npm event I believe.

Adam-it commented 8 months ago

I think in there is no OOTB gupl task for it delivered with @microsoft/sp-build-core-tasks package

No that's correct, we've copied it from internet somewhere. It's picking up on an npm event I believe.

hmmm.. not possible path for this extension. but we may for sure prototype a different approach