sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Store the version of the generator used to create the project

Open waldekmastykarz opened this issue 10 years ago • 3 comments

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.

waldekmastykarz avatar Oct 27 '16 06:10 waldekmastykarz

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

patmill avatar Oct 28 '16 02:10 patmill

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

mpasarin avatar May 03 '17 20:05 mpasarin

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

msft-github-bot avatar Jan 30 '20 00:01 msft-github-bot