@pnp/graph 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/behaviors/telemetry.js +1 -1
- package/package.json +6 -3
- package/post-install.cjs +20 -0
package/behaviors/telemetry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function Telemetry() {
|
|
2
2
|
return (instance) => {
|
|
3
3
|
instance.on.pre(async function (url, init, result) {
|
|
4
|
-
init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/3.3.
|
|
4
|
+
init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/3.3.2" };
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/dot-notation
|
|
6
6
|
this.log(`Request Tag: ${init.headers["SdkVersion"]}`, 0);
|
|
7
7
|
return [url, init, result];
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/graph",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "pnp - provides a fluent interface to query the Microsoft Graph",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"postinstall": "node ./post-install.cjs"
|
|
9
|
+
},
|
|
7
10
|
"dependencies": {
|
|
8
11
|
"@microsoft/microsoft-graph-types": "2.16.0",
|
|
9
12
|
"tslib": "2.3.1",
|
|
10
|
-
"@pnp/core": "3.3.
|
|
11
|
-
"@pnp/queryable": "3.3.
|
|
13
|
+
"@pnp/core": "3.3.2",
|
|
14
|
+
"@pnp/queryable": "3.3.2"
|
|
12
15
|
},
|
|
13
16
|
"funding": {
|
|
14
17
|
"type": "individual",
|
package/post-install.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { readFileSync } = require("fs");
|
|
2
|
+
const { join } = require("path");
|
|
3
|
+
const projectRoot = process.cwd();
|
|
4
|
+
const packageLoc = join(projectRoot, "package.json");
|
|
5
|
+
const packageFile = readFileSync(packageLoc, "utf8");
|
|
6
|
+
const packageJSON = JSON.parse(packageFile);
|
|
7
|
+
if (packageJSON.dependencies != null) {
|
|
8
|
+
const spfxVersion = packageJSON.dependencies["@microsoft/sp-core-library"];
|
|
9
|
+
if (spfxVersion != null) {
|
|
10
|
+
const spfxVersionFloat = parseFloat(spfxVersion);
|
|
11
|
+
if (spfxVersionFloat > 1.11 && spfxVersionFloat < 1.15) {
|
|
12
|
+
console.log("");
|
|
13
|
+
console.log("\x1b[43m%s\x1b[0m", " PnPjs WARNING ");
|
|
14
|
+
console.log("\x1b[33m%s\x1b[0m", " The version of SPFx you are using requires an update to work with PnPjs. Please make sure to follow the getting started instructions to make the appropriate changes. ➡ https://pnp.github.io/pnpjs/getting-started/#spfx-version-1121-later");
|
|
15
|
+
console.log("");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
} else {
|
|
19
|
+
console.log("Package has no dependencies");
|
|
20
|
+
}
|