cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

We should remove the possibility to generate pipeline/workflow with node 16.x

Open Adam-it opened this issue 1 year ago • 4 comments

Since in latest version of SPFx 1.19 node 16.x was deprecated image

I guess it makes no sense in giving the option to support that in our scaffolded flows since those commands target latest version of SPFx.

We should remove the following logic https://github.com/pnp/cli-microsoft365/blob/bf59841402cda9e3766ee4b7ae89fe12a4d57361/src/m365/spfx/commands/project/project-github-workflow-add.ts#L173-L187

and

https://github.com/pnp/cli-microsoft365/blob/bf59841402cda9e3766ee4b7ae89fe12a4d57361/src/m365/spfx/commands/project/project-github-workflow-add.ts#L173-L187

in order not to change the node version in our flows and always scaffold it with node 18 which what currently should be used for latest version of SPFx.

Adam-it avatar Aug 13 '24 08:08 Adam-it

@pnp/cli-for-microsoft-365-maintainers should we consider this a breaking change? and try to make it part of the upcoming v9?

Adam-it avatar Aug 13 '24 08:08 Adam-it

Does this command only support creating pipelines with the latest version of SPFx?

milanholemans avatar Aug 13 '24 11:08 milanholemans

Does this command only support creating pipelines with the latest version of SPFx?

Well we never supported all versions of SPFx due to node version that was scaffolded in the pipeline. Till ow we support 1.19 - 1.16. but we do not provide this in any docs. My aim is to align to node 18.x since older versions are deprecated, therefore support only 1.19

Adam-it avatar Aug 13 '24 15:08 Adam-it

Ok, might be a good thing to clarify which SPFx versions are supported by this command, no? Just to clarify we only support the latest version for example.

milanholemans avatar Aug 25 '24 22:08 milanholemans

I say it should always work for 'latest' SPFx version

Adam-it avatar Sep 10 '24 22:09 Adam-it

Ok, might be a good thing to clarify which SPFx versions are supported by this command, no? Just to clarify we only support the latest version for example.

yes we may add this remark in the docs 👍 @pnp/cli-for-microsoft-365-maintainers any other feed? I would like to move this forward since we already have SPFx 1.20 @martinlingstuyl since you have DevOps exp. maybe you have some comments?

Adam-it avatar Nov 27 '24 22:11 Adam-it

Isn't it tricky that we have to update the Node version ourselves and keep track of it every time a new SPFx version is released? Should be make it configurable using an option or so? In that case this command would still work for older projects as well.

milanholemans avatar Nov 27 '24 23:11 milanholemans

Isn't it tricky that we have to update the Node version ourselves and keep track of it every time a new SPFx version is released? Should be make it configurable using an option or so? In that case this command would still work for older projects as well.

yes like we update and add support every time new SPFx version is released. Also during this time we should check what node version is used in this command and align it. We may make it as a property so that it will be configurable but even then I guess we should provide some default value 🤔

Adam-it avatar Nov 28 '24 07:11 Adam-it

yes like we update and add support every time new SPFx version is released. Also during this time we should check what node version is used in this command and align it.

Yes, however I have a feeling that we might forget to update this command since this is another manual intervention we have to do 🙂

We may make it as a property so that it will be configurable but even then I guess we should provide some default value 🤔

Yeah, looks good to me, this way users are never blocked.

milanholemans avatar Nov 28 '24 11:11 milanholemans

ok lets expose the node version as an param in the flows. I will spec it out as part of this issue

Adam-it avatar Nov 28 '24 20:11 Adam-it

@milanholemans I finally found a bit of time to update the spec to include the information we discussed to expose the Node.js versions as variables in the flows with the default value set to 18.x I think it is ready to open it up.

Adam-it avatar Feb 03 '25 00:02 Adam-it

I'll take it

Adam-it avatar Apr 18 '25 22:04 Adam-it