Cli-microsoft365: spfx project upgrade missing suggestion for some standard @microsoft packages

Created on 28 Nov 2019  路  8Comments  路  Source: pnp/cli-microsoft365

Repro

  1. scaffold a spfx 1.8.2 project
  2. npm i install @microsoft/[email protected] -DE (can't remember if it's here by default or not)
  3. run o365 spfx project upgrade -o md -f upgrade.md

Current behavior

The report won't suggest you to upgrade the @microsoft/sp-page-context package

Desired behavior

The report to suggest upgrading that package as well.

enhancement help wanted

Most helpful comment

@baywet , this module does not come with OOTB scaffolded solution from yeoman. This is the reason we have not tracked it.

@waldekmastykarz, we can add it to the report, it should not be an issue. Does that mean we should account for the other @microsoft/sp-.. modules that are not part of the yeoman initial project? As far as I remember there are few more.

All 8 comments

@baywet , this module does not come with OOTB scaffolded solution from yeoman. This is the reason we have not tracked it.

@waldekmastykarz, we can add it to the report, it should not be an issue. Does that mean we should account for the other @microsoft/sp-.. modules that are not part of the yeoman initial project? As far as I remember there are few more.

IMHO we should: the reasoning is if you don't upgrade those as well you might end up with a broken solution because of misaligned type definitions or other things like that.

thanks for the quick answer!

My concern is that I do not have a clear path if these modules will always be updated accordingly. What is Microsoft saying about them? Any change you to know if there is official documentation on these modules. For me is more like a grey area.

Ok, I found something here: https://docs.microsoft.com/en-us/javascript/api/sp-application-base?view=sp-typescript-latest
image

Maybe we can turn it into enhancement and implement it. Waldek what do you think?

We could absolutely implement a rule that checks if the package is being used and if it is, recommend updating it to the suitable version.

Yes , I faced this issue while upgrading a project from 1.8.1 to 1.10.0 for @microsoft/sp-page-context and build errors in the solution for PageContext. Was resolved by manually updating the package

We'll close this issue in favor of separate issues one for each package so that we can track the work more easily.

Was this page helpful?
0 / 5 - 0 ratings