Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade react-directory to SPFx 1.20.0 #5284

Merged
merged 4 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions samples/react-directory/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "SPFx 1.20.0",
"image": "docker.io/m365pnp/spfx:1.20.0",
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
]
}
},
"forwardPorts": [
4321,
35729,
5432
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
"5432": {
"protocol": "https",
"label": "Workbench",
"onAutoForward": "silent"
},
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}
33 changes: 33 additions & 0 deletions samples/react-directory/.devcontainer/spfx-startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
echo
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
npm install

## commands to create dev certificate and copy it to the root folder of the project
echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
gulp trust-dev-cert

# Convert the generated PEM certificate to a CER certificate
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer

# Copy the PEM ecrtificate for non-Windows hosts
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem

## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
then
echo "# .CER Certificates" >> .gitignore
echo "*.cer" >> .gitignore
fi

## add *.pem to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.pem' ./.gitignore
then
echo "# .PEM Certificates" >> .gitignore
echo "*.pem" >> .gitignore
fi

echo
echo -e "\e[1;92mReady!\e[0m"

echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"
1 change: 1 addition & 0 deletions samples/react-directory/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.2
6 changes: 3 additions & 3 deletions samples/react-directory/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"@microsoft/generator-sharepoint": {
"plusBeta": false,
"nodeVersion": "16.13.2",
"nodeVersion": "18.18.2",
"sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.9.1"
"@microsoft/teams-js": "2.24.0"
},
"version": "1.17.3",
"version": "1.20.0",
"libraryName": "react-directory",
"libraryId": "5b62bc16-3a71-461d-be2f-16bfcb011e8a",
"environment": "spo",
Expand Down
6 changes: 4 additions & 2 deletions samples/react-directory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Search People from Organization Directory and show live persona card on hover.
| 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.|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |

![SPFx 1.17.3](https://img.shields.io/badge/SPFx-1.17.3-green.svg)
![Node.js v16](https://img.shields.io/badge/Node.js-v16-green.svg)
![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-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)
![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")
Expand Down Expand Up @@ -70,6 +70,7 @@ Results per page | number | Yes | Number of people result to be displayed per pa
* [Peter Paul Kirschner](https://github.com/petkir)
* Sudharsan K
* [Abderahman Moujahid](https://github.com/Abderahman88)
* [Sandeep P S](https://github.com/Sandeep-FED)

## Version history

Expand All @@ -83,6 +84,7 @@ Version|Date|Comments
3.0.2|Oct 3 2022|Minor styling fixes and people container position
3.0.3|Oct 4 2022|Fix for LivePersonaCard
3.0.4|Jun 20 2023|Upgrade to SPFx 1.17.3
3.0.5|Oct 05 2024|Upgrade to SPFx 1.20.0

## Minimal Path to Awesome

Expand Down
4 changes: 2 additions & 2 deletions samples/react-directory/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Search People from Organization Directory and show live persona card on hover."
],
"creationDateTime": "2021-03-04",
"updateDateTime": "2023-06-20",
"updateDateTime": "2024-10-05",
"products": [
"SharePoint"
],
Expand All @@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.17.3"
"value": "1.20.0"
},
{
"key": "SPFX-TEAMSTAB",
Expand Down
4 changes: 2 additions & 2 deletions samples/react-directory/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"name": "Search Directory",
"id": "5b62bc16-3a71-461d-be2f-16bfcb011e8a",
"version": "3.0.4.0",
"version": "3.0.5.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
Expand All @@ -30,7 +30,7 @@
"title": "react-directory DirectoryWebPart Feature",
"description": "The feature that activates DirectoryWebPart from the react-directory solution.",
"id": "fae479bf-405f-4f80-a086-eea22eff3d6f",
"version": "3.0.4.0",
"version": "3.0.5.0",
"componentIds": [
"fae479bf-405f-4f80-a086-eea22eff3d6f"
]
Expand Down
Loading
Loading