Skip to content

Commit 55bef34

Browse files
authored
Release v2.3.0 (#141)
## 🎯 Aim Is to prepare v2.3.0 release
1 parent f38d033 commit 55bef34

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [2.3.0] - 2023-11-16
4+
5+
- Updated dependencies validation to check for [email protected]
6+
37
## [2.2.0] - 2023-11-12
48

59
- Updated npm packages

Diff for: package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "viva-connections-toolkit",
33
"displayName": "Viva Connections Toolkit",
44
"description": "Viva Connections Toolkit aims to boost your productivity in developing and managing SharePoint Framework solutions helping at every stage of your development flow, from setting up your development workspace to deploying a solution straight to your tenant without the need to leave VS Code and now even create a CI/CD pipeline to introduce automate deployment of your app. This toolkit is provided by the community.",
5-
"version": "2.2.0",
5+
"version": "2.3.0",
66
"publisher": "m365pnp",
77
"preview": false,
88
"homepage": "https://github.com/pnp/vscode-viva",

Diff for: src/services/Dependencies.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Extension } from './Extension';
99

1010

1111
const SUPPORTED_VERSIONS = ['16.13', '18.17.1'];
12-
const DEPENDENCIES = ['gulp-cli', 'yo', '@microsoft/generator-sharepoint'];
12+
const DEPENDENCIES = ['gulp-cli', 'yo@4.3.1', '@microsoft/generator-sharepoint'];
1313

1414
export class Dependencies {
1515

@@ -59,8 +59,11 @@ export class Dependencies {
5959
const npmLs: NpmLs = JSON.parse(result.toString());
6060
const missingDependencies = [];
6161
for (const dependency of DEPENDENCIES) {
62-
const dependencyResult = npmLs.dependencies[dependency];
63-
if (!dependencyResult) {
62+
const dependencyDetails = Dependencies.splitDependency(dependency);
63+
const dependencyVersion = dependencyDetails.length > 1 ? dependencyDetails[1] : null;
64+
const dependencyName = dependencyDetails[0];
65+
const installedDependency = npmLs.dependencies[dependencyName];
66+
if (!installedDependency || (dependencyVersion && installedDependency.version !== dependencyVersion)) {
6467
missingDependencies.push(dependency);
6568
}
6669
}
@@ -140,4 +143,15 @@ export class Dependencies {
140143
return false;
141144
}
142145
}
146+
147+
/**
148+
* split dependency into name and version
149+
*/
150+
private static splitDependency(dependency: string): string[] {
151+
if (dependency.startsWith('@')) {
152+
return ['@' + dependency.substring(1).split('@')[0], dependency.substring(1).split('@')[1]];
153+
}
154+
155+
return dependency.split('@');
156+
}
143157
}

0 commit comments

Comments
 (0)