Upgraded Teams Lead Dashboard to SPFx 1.17.0

This commit is contained in:
Paolo Pialorsi 2023-04-07 18:47:57 +02:00
parent da40b1d5c0
commit 5b62296958
6 changed files with 10058 additions and 7420 deletions

View File

@ -1,6 +1,6 @@
{
"@microsoft/generator-sharepoint": {
"version": "1.16.0-rc.0",
"version": "1.17.0",
"libraryName": "lead-assist",
"libraryId": "c311a0fc-3dcb-4316-a798-fd7d8a6d5344",
"environment": "spo",
@ -11,7 +11,7 @@
"componentType": "webpart",
"sdkVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.4.1"
"@microsoft/teams-js": "2.9.1"
}
}
}

View File

@ -9,9 +9,10 @@
"This sample shows how to use SPFx to create a Microsoft Teams dashboard personal app."
],
"creationDateTime": "2021-10-05",
"updateDateTime": "2022-11-15",
"updateDateTime": "2023-04-07",
"products": [
"SharePoint"
"SharePoint",
"Teams"
],
"metadata": [
{
@ -20,7 +21,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.16.0"
"value": "1.17.0"
}
],
"thumbnails": [

View File

@ -0,0 +1,3 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}

File diff suppressed because it is too large Load Diff

View File

@ -15,11 +15,12 @@
"dependencies": {
"@microsoft/mgt-react": "^2.2.0",
"@microsoft/mgt-spfx": "^2.2.0",
"@microsoft/sp-core-library": "1.16.0",
"@microsoft/sp-lodash-subset": "1.16.0",
"@microsoft/sp-office-ui-fabric-core": "1.16.0",
"@microsoft/sp-property-pane": "1.16.0",
"@microsoft/sp-webpart-base": "1.16.0",
"@microsoft/sp-adaptive-card-extension-base": "1.17.0",
"@microsoft/sp-core-library": "1.17.0",
"@microsoft/sp-lodash-subset": "1.17.0",
"@microsoft/sp-office-ui-fabric-core": "1.17.0",
"@microsoft/sp-property-pane": "1.17.0",
"@microsoft/sp-webpart-base": "1.17.0",
"@pnp/sp": "^2.7.0",
"@pnp/spfx-controls-react": "3.11.0",
"@pnp/spfx-property-controls": "3.10.0",
@ -29,11 +30,11 @@
"tslib": "2.3.1"
},
"devDependencies": {
"@microsoft/eslint-plugin-spfx": "1.16.0",
"@microsoft/eslint-config-spfx": "1.16.0",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/sp-build-web": "1.16.0-rc.0",
"@microsoft/sp-module-interfaces": "1.16.0",
"@microsoft/eslint-config-spfx": "1.17.0",
"@microsoft/eslint-plugin-spfx": "1.17.0",
"@microsoft/rush-stack-compiler-4.5": "0.4.0",
"@microsoft/sp-build-web": "1.17.0",
"@microsoft/sp-module-interfaces": "1.17.0",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",

View File

@ -0,0 +1,260 @@
# Upgrade project react-teams-lead-dashboard to v1.17.0
Date: 4/7/2023
## Findings
Following is the list of steps required to upgrade your project to SharePoint Framework version 1.17.0. [Summary](#Summary) of the modifications is included at the end of the report.
### FN001001 @microsoft/sp-core-library | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-core-library
Execute the following command:
```sh
npm i -SE @microsoft/sp-core-library@1.17.0
```
File: [./package.json:18:5](./package.json)
### FN001002 @microsoft/sp-lodash-subset | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-lodash-subset
Execute the following command:
```sh
npm i -SE @microsoft/sp-lodash-subset@1.17.0
```
File: [./package.json:19:5](./package.json)
### FN001003 @microsoft/sp-office-ui-fabric-core | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-office-ui-fabric-core
Execute the following command:
```sh
npm i -SE @microsoft/sp-office-ui-fabric-core@1.17.0
```
File: [./package.json:20:5](./package.json)
### FN001004 @microsoft/sp-webpart-base | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-webpart-base
Execute the following command:
```sh
npm i -SE @microsoft/sp-webpart-base@1.17.0
```
File: [./package.json:22:5](./package.json)
### FN001021 @microsoft/sp-property-pane | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-property-pane
Execute the following command:
```sh
npm i -SE @microsoft/sp-property-pane@1.17.0
```
File: [./package.json:21:5](./package.json)
### FN001034 @microsoft/sp-adaptive-card-extension-base | Optional
Install SharePoint Framework dependency package @microsoft/sp-adaptive-card-extension-base
Execute the following command:
```sh
npm i -SE @microsoft/sp-adaptive-card-extension-base@1.17.0
```
File: [./package.json:15:3](./package.json)
### FN002022 @microsoft/eslint-plugin-spfx | Required
Upgrade SharePoint Framework dev dependency package @microsoft/eslint-plugin-spfx
Execute the following command:
```sh
npm i -DE @microsoft/eslint-plugin-spfx@1.17.0
```
File: [./package.json:32:5](./package.json)
### FN002023 @microsoft/eslint-config-spfx | Required
Upgrade SharePoint Framework dev dependency package @microsoft/eslint-config-spfx
Execute the following command:
```sh
npm i -DE @microsoft/eslint-config-spfx@1.17.0
```
File: [./package.json:33:5](./package.json)
### FN002001 @microsoft/sp-build-web | Required
Upgrade SharePoint Framework dev dependency package @microsoft/sp-build-web
Execute the following command:
```sh
npm i -DE @microsoft/sp-build-web@1.17.0
```
File: [./package.json:35:5](./package.json)
### FN002002 @microsoft/sp-module-interfaces | Required
Upgrade SharePoint Framework dev dependency package @microsoft/sp-module-interfaces
Execute the following command:
```sh
npm i -DE @microsoft/sp-module-interfaces@1.17.0
```
File: [./package.json:36:5](./package.json)
### FN002020 @microsoft/rush-stack-compiler-4.5 | Required
Upgrade SharePoint Framework dev dependency package @microsoft/rush-stack-compiler-4.5
Execute the following command:
```sh
npm i -DE @microsoft/rush-stack-compiler-4.5@0.4.0
```
File: [./package.json:31:22](./package.json)
### FN007002 serve.json initialPage | Required
Update serve.json initialPage URL
```json
{
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
}
```
File: [./config/serve.json:5:3](./config/serve.json)
### FN010001 .yo-rc.json version | Recommended
Update version in .yo-rc.json
```json
{
"@microsoft/generator-sharepoint": {
"version": "1.17.0"
}
}
```
File: [./.yo-rc.json:3:5](./.yo-rc.json)
### FN010010 .yo-rc.json @microsoft/teams-js SDK version | Recommended
Update @microsoft/teams-js SDK version in .yo-rc.json
```json
{
"@microsoft/generator-sharepoint": {
"sdkVersions": {
"@microsoft/teams-js": "2.9.1"
}
}
}
```
File: [./.yo-rc.json:14:7](./.yo-rc.json)
### FN015009 config\sass.json | Required
Add file config\sass.json
Execute the following command:
```sh
cat > "config\sass.json" << EOF
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
EOF
```
File: [config\sass.json](config\sass.json)
### FN017001 Run npm dedupe | Optional
If, after upgrading npm packages, when building the project you have errors similar to: "error TS2345: Argument of type 'SPHttpClientConfiguration' is not assignable to parameter of type 'SPHttpClientConfiguration'", try running 'npm dedupe' to cleanup npm packages.
Execute the following command:
```sh
npm dedupe
```
File: [./package.json](./package.json)
## Summary
### Execute script
```sh
npm i -SE @microsoft/sp-core-library@1.17.0 @microsoft/sp-lodash-subset@1.17.0 @microsoft/sp-office-ui-fabric-core@1.17.0 @microsoft/sp-webpart-base@1.17.0 @microsoft/sp-property-pane@1.17.0 @microsoft/sp-adaptive-card-extension-base@1.17.0
npm i -DE @microsoft/eslint-plugin-spfx@1.17.0 @microsoft/eslint-config-spfx@1.17.0 @microsoft/sp-build-web@1.17.0 @microsoft/sp-module-interfaces@1.17.0 @microsoft/rush-stack-compiler-4.5@0.4.0
npm dedupe
cat > "config\sass.json" << EOF
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
EOF
```
### Modify files
#### [./config/serve.json](./config/serve.json)
Update serve.json initialPage URL:
```json
{
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
}
```
#### [./.yo-rc.json](./.yo-rc.json)
Update version in .yo-rc.json:
```json
{
"@microsoft/generator-sharepoint": {
"version": "1.17.0"
}
}
```
Update @microsoft/teams-js SDK version in .yo-rc.json:
```json
{
"@microsoft/generator-sharepoint": {
"sdkVersions": {
"@microsoft/teams-js": "2.9.1"
}
}
}
```