sp-dev-fx-webparts/samples/react-script-editor/upgrade-report.md

20 KiB

# Upgrade project C:\repos\pnp\sp-dev-fx-webparts\samples\react-script-editor to v1.5.1

Date: 2018-8-9

Findings

Following is the list of steps required to upgrade your project to SharePoint Framework version 1.5.1.

FN001001 @microsoft/sp-core-library | Required

Upgrade SharePoint Framework dependency package @microsoft/sp-core-library

Execute the following command:

npm i @microsoft/sp-core-library@1.5.1 --save-exact

File: ./package.json

FN001004 @microsoft/sp-webpart-base | Required

Upgrade SharePoint Framework dependency package @microsoft/sp-webpart-base

Execute the following command:

npm i @microsoft/sp-webpart-base@1.5.1 --save-exact

File: ./package.json

FN002001 @microsoft/sp-build-web | Required

Upgrade SharePoint Framework dev dependency package @microsoft/sp-build-web

Execute the following command:

npm i @microsoft/sp-build-web@1.5.1 --save-exact -D

File: ./package.json

FN002002 @microsoft/sp-module-interfaces | Required

Upgrade SharePoint Framework dev dependency package @microsoft/sp-module-interfaces

Execute the following command:

npm i @microsoft/sp-module-interfaces@1.5.1 --save-exact -D

File: ./package.json

FN002003 @microsoft/sp-webpart-workbench | Required

Upgrade SharePoint Framework dev dependency package @microsoft/sp-webpart-workbench

Execute the following command:

npm i @microsoft/sp-webpart-workbench@1.5.1 --save-exact -D

File: ./package.json

Update version in .yo-rc.json

In file ./.yo-rc.json update the code as follows:

{
  "@microsoft/generator-sharepoint": {
    "version": "1.5.1"
  }
}

File: ./.yo-rc.json

FN001007 @types/webpack-env | Required

Upgrade SharePoint Framework dependency package @types/webpack-env

Execute the following command:

npm i @types/webpack-env@1.13.1 --save-exact

File: ./package.json

FN001010 @types/es6-promise | Required

Install SharePoint Framework dependency package @types/es6-promise

Execute the following command:

npm i @types/es6-promise@0.0.33 --save-exact

File: ./package.json

FN002005 @types/chai | Required

Upgrade SharePoint Framework dev dependency package @types/chai

Execute the following command:

npm i @types/chai@3.4.34 --save-exact -D

File: ./package.json

FN002006 @types/mocha | Required

Upgrade SharePoint Framework dev dependency package @types/mocha

Execute the following command:

npm i @types/mocha@2.2.38 --save-exact -D

File: ./package.json

FN003001 config.json schema | Required

Update config.json schema URL

In file ./config/config.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json"
}

File: ./config/config.json

FN004001 copy-assets.json schema | Required

Update copy-assets.json schema URL

In file ./config/copy-assets.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json"
}

File: ./config/copy-assets.json

FN005001 deploy-azure-storage.json schema | Required

Update deploy-azure-storage.json schema URL

In file ./config/deploy-azure-storage.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json"
}

File: ./config/deploy-azure-storage.json

FN006001 package-solution.json schema | Required

Update package-solution.json schema URL

In file ./config/package-solution.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json"
}

File: ./config/package-solution.json

FN007001 serve.json schema | Required

Update serve.json schema URL

In file ./config/serve.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json"
}

File: ./config/serve.json

FN008001 tslint.json schema | Required

Update tslint.json schema URL

In file ./config/tslint.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/core-build/tslint.schema.json"
}

File: ./config/tslint.json

FN009001 write-manifests.json schema | Required

Update write-manifests.json schema URL

In file ./config/write-manifests.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json"
}

File: ./config/write-manifests.json

Update isCreatingSolution in .yo-rc.json

In file ./.yo-rc.json update the code as follows:

{
  "@microsoft/generator-sharepoint": {
    "isCreatingSolution": true
  }
}

File: ./.yo-rc.json

Update packageManager in .yo-rc.json

In file ./.yo-rc.json update the code as follows:

{
  "@microsoft/generator-sharepoint": {
    "packageManager": "npm"
  }
}

File: ./.yo-rc.json

Update componentType in .yo-rc.json

In file ./.yo-rc.json update the code as follows:

{
  "@microsoft/generator-sharepoint": {
    "componentType": "webpart"
  }
}

File: ./.yo-rc.json

FN011001 Web part manifest schema | Required

Update schema in manifest src\webparts\scriptEditor\ScriptEditorWebPart.manifest.json

In file src\webparts\scriptEditor\ScriptEditorWebPart.manifest.json update the code as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json"
}

File: src\webparts\scriptEditor\ScriptEditorWebPart.manifest.json

FN012001 tsconfig.json module | Required

Update module type in tsconfig.json

In file ./tsconfig.json update the code as follows:

{
  "compilerOptions": {
    "module": "esnext"
  }
}

File: ./tsconfig.json

FN012002 tsconfig.json moduleResolution | Required

Update moduleResolution in tsconfig.json

In file ./tsconfig.json update the code as follows:

{
  "compilerOptions": {
    "moduleResolution": "node"
  }
}

File: ./tsconfig.json

Summary

Execute script

npm i @microsoft/sp-core-library@1.5.1 --save-exact
npm i @microsoft/sp-webpart-base@1.5.1 --save-exact
npm i @microsoft/sp-build-web@1.5.1 --save-exact -D
npm i @microsoft/sp-module-interfaces@1.5.1 --save-exact -D
npm i @microsoft/sp-webpart-workbench@1.5.1 --save-exact -D
npm i @types/webpack-env@1.13.1 --save-exact
npm i @types/es6-promise@0.0.33 --save-exact
npm i @types/chai@3.4.34 --save-exact -D
npm i @types/mocha@2.2.38 --save-exact -D

Modify files

./.yo-rc.json

{
  "@microsoft/generator-sharepoint": {
    "version": "1.5.1"
  }
}
{
  "@microsoft/generator-sharepoint": {
    "isCreatingSolution": true
  }
}
{
  "@microsoft/generator-sharepoint": {
    "packageManager": "npm"
  }
}
{
  "@microsoft/generator-sharepoint": {
    "componentType": "webpart"
  }
}

./config/config.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json"
}

./config/copy-assets.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json"
}

./config/deploy-azure-storage.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json"
}

./config/package-solution.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json"
}

./config/serve.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json"
}

./config/tslint.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/core-build/tslint.schema.json"
}

./config/write-manifests.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json"
}

src\webparts\scriptEditor\ScriptEditorWebPart.manifest.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json"
}

./tsconfig.json

{
  "compilerOptions": {
    "module": "esnext"
  }
}
{
  "compilerOptions": {
    "moduleResolution": "node"
  }
}