Updated sample.json, readme, added container
This commit is contained in:
parent
49844c4dc7
commit
73a3d2b7e1
|
@ -1,39 +1,38 @@
|
||||||
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
|
|
||||||
{
|
{
|
||||||
"name": "SPFx 1.16.1",
|
"name": "SPFx 1.19.0",
|
||||||
"image": "docker.io/m365pnp/spfx:1.16.1",
|
"image": "docker.io/m365pnp/spfx:1.19.0",
|
||||||
// Set *default* container specific settings.json values on container create.
|
"customizations": {
|
||||||
"settings": {},
|
"vscode": {
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
"extensions": [
|
||||||
"extensions": [
|
"editorconfig.editorconfig",
|
||||||
"editorconfig.editorconfig",
|
"dbaeumer.vscode-eslint"
|
||||||
"dbaeumer.vscode-eslint"
|
]
|
||||||
],
|
}
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
},
|
||||||
"forwardPorts": [
|
"forwardPorts": [
|
||||||
4321,
|
4321,
|
||||||
35729
|
35729,
|
||||||
],
|
5432
|
||||||
"portsAttributes": {
|
],
|
||||||
"4321": {
|
"portsAttributes": {
|
||||||
"protocol": "https",
|
"4321": {
|
||||||
"label": "Manifest",
|
"protocol": "https",
|
||||||
"onAutoForward": "silent",
|
"label": "Manifest",
|
||||||
"requireLocalPort": true
|
"onAutoForward": "silent",
|
||||||
},
|
"requireLocalPort": true
|
||||||
// Not needed for SPFx>= 1.12.1
|
},
|
||||||
// "5432": {
|
"5432": {
|
||||||
// "protocol": "https",
|
"protocol": "https",
|
||||||
// "label": "Workbench",
|
"label": "Workbench",
|
||||||
// "onAutoForward": "silent"
|
"onAutoForward": "silent"
|
||||||
// },
|
},
|
||||||
"35729": {
|
"35729": {
|
||||||
"protocol": "https",
|
"protocol": "https",
|
||||||
"label": "LiveReload",
|
"label": "LiveReload",
|
||||||
"onAutoForward": "silent",
|
"onAutoForward": "silent",
|
||||||
"requireLocalPort": true
|
"requireLocalPort": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
|
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
|
||||||
"remoteUser": "node"
|
"remoteUser": "node"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
v18.17.1
|
|
@ -15,16 +15,16 @@ MyOneDriveInfo solution contains Adaptive card extension for Viva connection wit
|
||||||
|
|
||||||
| :warning: Important |
|
| :warning: Important |
|
||||||
|:---------------------------|
|
|:---------------------------|
|
||||||
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|
| Every SPFx version is optimally compatible with specific versions of Node.js. In order to be able to build this sample, you need to ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|
||||||
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
|
||||||
|
|
||||||
This sample is optimally compatible with the following environment configuration:
|
This sample is optimally compatible with the following environment configuration:
|
||||||
|
|
||||||
![SPFx 1.16.1](https://img.shields.io/badge/SPFx-1.16.1-green.svg)
|
![SPFx 1.19.0](https://img.shields.io/badge/SPFx-1.19.0-green.svg)
|
||||||
![Node.js v16 | v14 | v12](https://img.shields.io/badge/Node.js-v16%20%7C%20v14%20%7C%20v12-green.svg)
|
![Node.js v18](https://img.shields.io/badge/Node.js-v18-green.svg)
|
||||||
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
|
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
|
||||||
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
|
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
|
||||||
![Does not work with SharePoint 2016 (Feature Pack 2)](<https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg> "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
|
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
|
||||||
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
|
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
|
||||||
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
|
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
|
||||||
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
|
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
|
||||||
|
@ -38,16 +38,16 @@ For more information about SPFx compatibility, please refer to <https://aka.ms/s
|
||||||
|
|
||||||
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](https://aka.ms/m365/devprogram)
|
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](https://aka.ms/m365/devprogram)
|
||||||
|
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
* [Harminder Singh](https://github.com/HarminderSethi)
|
- [Harminder Singh](https://github.com/HarminderSethi)
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
| Version | Date | Comments |
|
| Version | Date | Comments |
|
||||||
| ------- | ---------------- | --------------- |
|
| ------- | ---------------- | --------------- |
|
||||||
| 1.1 | January 24, 2021 | Initial Release |
|
| 1.1 | January 24, 2021 | Initial Release |
|
||||||
|
| 1.2 | August 26, 2024 | Upgraded to SPFx 1.19.0 and @fluentui/react-components to 9.54.13 |
|
||||||
|
|
||||||
## Minimal Path to Awesome
|
## Minimal Path to Awesome
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
"name": "pnp-sp-dev-spfx-web-parts-react-my-onedrive-info",
|
"name": "pnp-sp-dev-spfx-web-parts-react-my-onedrive-info",
|
||||||
"source": "pnp",
|
"source": "pnp",
|
||||||
"title": "My OneDrive Info Web Part",
|
"title": "My OneDrive Info",
|
||||||
"shortDescription": "MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities",
|
"shortDescription": "MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities",
|
||||||
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-my-onedrive-info",
|
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-my-onedrive-info",
|
||||||
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-my-onedrive-info",
|
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-my-onedrive-info",
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
"MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities"
|
"MyOneDriveInfo solution contains Adaptive card extension for Viva connection with below functionalities"
|
||||||
],
|
],
|
||||||
"creationDateTime": "2023-02-03",
|
"creationDateTime": "2023-02-03",
|
||||||
"updateDateTime": "2023-02-03",
|
"updateDateTime": "2024-08-26",
|
||||||
"products": [
|
"products": [
|
||||||
"SharePoint"
|
"SharePoint"
|
||||||
],
|
],
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "SPFX-VERSION",
|
"key": "SPFX-VERSION",
|
||||||
"value": "1.16.1"
|
"value": "1.19.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"thumbnails": [
|
"thumbnails": [
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"typescript": "4.7.4"
|
"typescript": "4.7.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.13.0 <17.0.0"
|
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
|
|
@ -1,275 +0,0 @@
|
||||||
# Upgrade project react-my-one-drive-info-client-side-solution to v1.19.0
|
|
||||||
|
|
||||||
Date: 8/28/2024
|
|
||||||
|
|
||||||
## Findings
|
|
||||||
|
|
||||||
Following is the list of steps required to upgrade your project to SharePoint Framework version 1.19.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.19.0
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:17: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.19.0
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:18:5](./package.json)
|
|
||||||
|
|
||||||
### FN001034 @microsoft/sp-adaptive-card-extension-base | Optional
|
|
||||||
|
|
||||||
Upgrade 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.19.0
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:16: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.20.1
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:26: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.20.1
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:27:5](./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.20.1
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:23: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.20.1
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:22:5](./package.json)
|
|
||||||
|
|
||||||
### FN010001 .yo-rc.json version | Recommended
|
|
||||||
|
|
||||||
Update version in .yo-rc.json
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"@microsoft/generator-sharepoint": {
|
|
||||||
"version": "1.19.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./.yo-rc.json:10:5](./.yo-rc.json)
|
|
||||||
|
|
||||||
### FN002026 typescript | Required
|
|
||||||
|
|
||||||
Upgrade SharePoint Framework dev dependency package typescript
|
|
||||||
|
|
||||||
Execute the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm i -DE typescript@4.7.4
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:33:5](./package.json)
|
|
||||||
|
|
||||||
### FN002028 @microsoft/rush-stack-compiler-4.7 | Required
|
|
||||||
|
|
||||||
Install SharePoint Framework dev dependency package @microsoft/rush-stack-compiler-4.7
|
|
||||||
|
|
||||||
Execute the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm i -DE @microsoft/rush-stack-compiler-4.7@0.1.0
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:21:3](./package.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.12.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./.yo-rc.json:2:3](./.yo-rc.json)
|
|
||||||
|
|
||||||
### FN012017 tsconfig.json extends property | Required
|
|
||||||
|
|
||||||
Update tsconfig.json extends property
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./tsconfig.json:2:3](./tsconfig.json)
|
|
||||||
|
|
||||||
### FN021003 package.json engines.node | Required
|
|
||||||
|
|
||||||
Update package.json engines.node property
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:6:5](./package.json)
|
|
||||||
|
|
||||||
### FN002024 eslint | Required
|
|
||||||
|
|
||||||
Install SharePoint Framework dev dependency package eslint
|
|
||||||
|
|
||||||
Execute the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm i -DE eslint@8.7.0
|
|
||||||
```
|
|
||||||
|
|
||||||
File: [./package.json:21:3](./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)
|
|
||||||
|
|
||||||
### 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.19.0 @microsoft/sp-property-pane@1.19.0 @microsoft/sp-adaptive-card-extension-base@1.19.0
|
|
||||||
npm i -DE @microsoft/sp-build-web@1.20.1 @microsoft/sp-module-interfaces@1.20.1 @microsoft/eslint-plugin-spfx@1.20.1 @microsoft/eslint-config-spfx@1.20.1 typescript@4.7.4 @microsoft/rush-stack-compiler-4.7@0.1.0 eslint@8.7.0
|
|
||||||
npm dedupe
|
|
||||||
```
|
|
||||||
|
|
||||||
### Modify files
|
|
||||||
|
|
||||||
#### [./.yo-rc.json](./.yo-rc.json)
|
|
||||||
|
|
||||||
Update version in .yo-rc.json:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"@microsoft/generator-sharepoint": {
|
|
||||||
"version": "1.19.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Update @microsoft/teams-js SDK version in .yo-rc.json:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"@microsoft/generator-sharepoint": {
|
|
||||||
"sdkVersions": {
|
|
||||||
"@microsoft/teams-js": "2.12.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### [./tsconfig.json](./tsconfig.json)
|
|
||||||
|
|
||||||
Update tsconfig.json extends property:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### [./package.json](./package.json)
|
|
||||||
|
|
||||||
Update package.json engines.node property:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### [./config/serve.json](./config/serve.json)
|
|
||||||
|
|
||||||
Update serve.json initialPage URL:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
|
|
||||||
}
|
|
||||||
```
|
|
Loading…
Reference in New Issue