Sp-dev-docs: Store the version of the generator used to create the project

Created on 27 Oct 2016  路  3Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [ ] Question
  • [ ] Typo
  • [ ] Bug
  • [x] Enhancement / Suggestion
  • [ ] Additional article idea

    Expected or Desired Behavior

When creating new project store the version of the generator used to create that project. This will help developers maintain integrity of their SharePoint Framework projects.

Observed Behavior

Currently the only way to figure out which version of the generator has been used to create the project, is by analyzing the versions of the different dependencies recorded in package.json. Which version of the generator has been used to create the project might not be that important now, but it will become essential once the SharePoint Framework becomes generally available and developers start using it in production. Often developers must not only be able to create new project but also support existing projects created in the past. If they would always keep their generator updated to the latest version, it could contain changes incompatible with the version used to create the project. Adding a new web part to an existing project could lead to errors hard to debug.

When creating the project you could store the version of the generator used to create the project in .yo.rc.json. When adding new web parts you could check if the recorded version matches the version of the current generator and display a warning if it doesn't. When updating the project to a newer version of SPFx developers could update the version number recorded in .yo.rc.json accordingly. In cases developers need to work with multiple versions of the generator to support the different projects in their organization, they could use a Docker image with the specific version of the generator installed.

generator

Most helpful comment

Yes - this is being addressed now with some work to handle future framework versioning.

All 3 comments

Yes - this is being addressed now with some work to handle future framework versioning.

This information is now stored in the .yo-rc.json file

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StfBauer picture StfBauer  路  3Comments

byronwjones picture byronwjones  路  3Comments

karishmaTCS picture karishmaTCS  路  3Comments

byrongits picture byrongits  路  3Comments

christianbueschi picture christianbueschi  路  3Comments