diff --git a/CHANGELOG.md b/CHANGELOG.md index 010d3094e..d0cea8339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 4.4.0 - 2024-Aug-12 + +- sp + - Addresses #3091 - Update return types from Shares + - Addresses #3104 - Replaces an in-function await to just return the promise. + +- graph + - Addresses #3083 - Adds the ability to pass in retrieveProperties to getAllChildrenAsTree. V2 and V3 had this functionality. Only supports Shared Custom Properties, not Local Custom Properties. + + ## 4.3.0 - 2024-July-15 - sp diff --git a/docs/graph/shares.md b/docs/graph/shares.md index 30ceafdc2..ce16f59fa 100644 --- a/docs/graph/shares.md +++ b/docs/graph/shares.md @@ -71,7 +71,9 @@ const shareLinkInfo = { encodedSharingUrl: shareLink, redeemSharingLink: false }; +// default shared drive item response (id, name) const sharedDriveItem = await graph.shares.useSharingLink(shareLinkInfo); + ``` ## Create Sharing Link diff --git a/docs/graph/taxonomy.md b/docs/graph/taxonomy.md index 8df23696c..cc91bc11d 100644 --- a/docs/graph/taxonomy.md +++ b/docs/graph/taxonomy.md @@ -203,7 +203,6 @@ This method will get all of a set's child terms in an ordered array. It is a cos ```TypeScript import { graphfi } from "@pnp/graph"; import "@pnp/graph/taxonomy"; -import { ITermInfo } from "@pnp/graph/taxonomy"; import { dateAdd, PnPClientStorage } from "@pnp/core"; const graph = graphfi(...); @@ -276,12 +275,11 @@ Access term set information ```TypeScript import { graphfi } from "@pnp/graph"; import "@pnp/graph/taxonomy"; -import { ITermInfo } from "@pnp/graph/taxonomy"; - +import { TermStore } from '@microsoft/microsoft-graph-types'; const graph = graphfi(...); // list all the terms that are direct children of this set -const infos: ITermInfo[] = await graph.termStore.groups.getById("338666a8-1111-2222-3333-f72471314e72").sets.getById("338666a8-1111-2222-3333-f72471314e72").children(); +const infos: TermStore.Term[] = await graph.termStore.groups.getById("338666a8-1111-2222-3333-f72471314e72").sets.getById("338666a8-1111-2222-3333-f72471314e72").children(); ``` ### List (terms) @@ -291,15 +289,15 @@ You can use the terms property to get a flat list of all terms in the set. These ```TypeScript import { graphfi } from "@pnp/graph"; import "@pnp/graph/taxonomy"; -import { ITermInfo } from "@pnp/graph/taxonomy"; +import { TermStore } from '@microsoft/microsoft-graph-types'; const graph = graphfi(...); // list all the terms available in this term set by group id then by term set id -const infos: ITermInfo[] = await graph.termStore.groups.getById("338666a8-1111-2222-3333-f72471314e72").sets.getById("338666a8-1111-2222-3333-f72471314e72").terms(); +const infos: TermStore.Term[] = await graph.termStore.groups.getById("338666a8-1111-2222-3333-f72471314e72").sets.getById("338666a8-1111-2222-3333-f72471314e72").terms(); // list all the terms available in this term set by term set id -const infosByTermSetId: ITermInfo[] = await graph.termStore.sets.getById("338666a8-1111-2222-3333-f72471314e72").terms(); +const infosByTermSetId: TermStore.Term[] = await graph.termStore.sets.getById("338666a8-1111-2222-3333-f72471314e72").terms(); ``` ### Get By Id @@ -307,12 +305,12 @@ const infosByTermSetId: ITermInfo[] = await graph.termStore.sets.getById("338666 ```TypeScript import { graphfi } from "@pnp/graph"; import "@pnp/graph/taxonomy"; -import { ITermInfo } from "@pnp/graph/taxonomy"; +import { TermStore } from '@microsoft/microsoft-graph-types'; const graph = graphfi(...); // get term set data -const info: ITermInfo = await graph.termStore.groups.getById("338666a8-1111-2222-3333-f72471314e72").sets.getById("338666a8-1111-2222-3333-f72471314e72").getTermById("338666a8-1111-2222-3333-f72471314e72")(); +const info: TermStore.Term = await graph.termStore.groups.getById("338666a8-1111-2222-3333-f72471314e72").sets.getById("338666a8-1111-2222-3333-f72471314e72").getTermById("338666a8-1111-2222-3333-f72471314e72")(); ``` ### Add @@ -320,7 +318,6 @@ const info: ITermInfo = await graph.termStore.groups.getById("338666a8-1111-2222 ```TypeScript import { graphfi, SPFxToken, SPFx } from "@pnp/graph"; import "@pnp/graph/taxonomy"; -import { ITermInfo } from "@pnp/graph/taxonomy"; const graph = graphfi(...); diff --git a/docs/sp/files.md b/docs/sp/files.md index 9077c3cc1..cd46ec7be 100644 --- a/docs/sp/files.md +++ b/docs/sp/files.md @@ -156,9 +156,11 @@ if (file.size <= 10485760) { result = await sp.web.getFolderByServerRelativePath("Shared Documents").files.addUsingPath(fileNamePath, file, { Overwrite: true }); } else { // large upload - result = await sp.web.getFolderByServerRelativePath("Shared Documents").files.addChunked(fileNamePath, file, data => { - console.log(`progress`); - }, true); + result = await sp.web.getFolderByServerRelativePath("Shared Documents").files.addChunked(fileNamePath, file, + { progress: data => { console.log(`progress`); }, + Overwrite: true + } + ); } console.log(`Result of file upload: ${JSON.stringify(result)}`); @@ -186,7 +188,7 @@ const stream = createReadStream("c:/temp/file.txt"); // now add the stream as a new file const sp = spfi(...); -const fr = await sp.web.lists.getByTitle("Documents").rootFolder.files.addChunked( "new.txt", stream, undefined, true ); +const fileInfo = await sp.web.lists.getByTitle("Documents").rootFolder.files.addChunked("new.txt", stream, { progress: data => { console.log(`progress`); }, Overwrite: true }); ``` ### Setting Associated Item Values @@ -200,7 +202,7 @@ import "@pnp/sp/files"; import "@pnp/sp/folders"; const sp = spfi(...); -const file = await sp.web.getFolderByServerRelativePath("/sites/dev/Shared%20Documents/test/").files.addUsingPath("file.name", "content", {Overwrite: true}); +const fileInfo = await sp.web.getFolderByServerRelativePath("/sites/dev/Shared%20Documents/test/").files.addUsingPath("file.name", "content", {Overwrite: true}); const item = await file.file.getItem(); await item.update({ Title: "A Title", @@ -560,4 +562,3 @@ import "@pnp/sp/files"; const sp = spfi(...); const user = await sp.web.getFolderByServerRelativePath("{folder relative path}").files.getByUrl("name.txt").getLockedByUser(); ``` - diff --git a/package-lock.json b/package-lock.json index ed5ab6bdc..bd749591b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,28 +1,28 @@ { "name": "@pnp/monorepo", - "version": "4.3.0", + "version": "4.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pnp/monorepo", - "version": "4.3.0", + "version": "4.4.0", "license": "MIT", "devDependencies": { - "@azure/identity": "4.3.0", - "@azure/msal-browser": "3.19.0", - "@azure/msal-node": "2.11.0", + "@azure/identity": "4.4.1", + "@azure/msal-browser": "3.20.0", + "@azure/msal-node": "2.12.0", "@microsoft/microsoft-graph-types": "2.40.0", "@pnp/buildsystem": "^4.0.1", - "@pnp/logging": "^4.2.0", - "@types/chai": "4.3.16", + "@pnp/logging": "^4.3.0", + "@types/chai": "4.3.17", "@types/chai-as-promised": "7.1.8", "@types/core-js": "2.5.8", "@types/findup-sync": "4.0.5", "@types/mocha": "10.0.7", "@types/node": "18.11.9", "@types/webpack": "5.28.5", - "@types/yargs": "17.0.32", + "@types/yargs": "17.0.33", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", "chai": "4.3.10", @@ -31,7 +31,7 @@ "eslint": "8.57.0", "findup-sync": "5.0.0", "globby": "14.0.2", - "mocha": "10.6.0", + "mocha": "10.7.3", "node-fetch": "3.3.2", "prettyjson": "1.2.5", "string-replace-loader": "3.1.0", @@ -115,9 +115,9 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.2.tgz", - "integrity": "sha512-Hnhm/PG9/SQ07JJyLDv3l9Qr8V3xgAe1hFoBYzt6LaalMxfL/ZqFaZf/bz5VN3pMcleCPwl8ivlS2Fjxq/iC8Q==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.3.tgz", + "integrity": "sha512-VxLk4AHLyqcHsfKe4MZ6IQ+D+ShuByy+RfStKfSjxJoL3WBWq17VNmrz8aT8etKzqc2nAeIyLxScjpzsS4fz8w==", "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", @@ -158,9 +158,9 @@ } }, "node_modules/@azure/core-util": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.9.1.tgz", - "integrity": "sha512-OLsq0etbHO1MA7j6FouXFghuHrAFGk+5C1imcpQ2e+0oZhYF07WLA+NW2Vqs70R7d+zOAWiWM3tbE1sXcDN66g==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.9.2.tgz", + "integrity": "sha512-l1Qrqhi4x1aekkV+OlcqsJa4AnAkj5p0JV8omgwjaV9OAbP41lvrMvs+CptfetKkeEaGRGSzby7sjPZEX7+kkQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", @@ -183,9 +183,9 @@ } }, "node_modules/@azure/identity": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.3.0.tgz", - "integrity": "sha512-LHZ58/RsIpIWa4hrrE2YuJ/vzG1Jv9f774RfTTAVDZDriubvJ0/S5u4pnw4akJDlS0TiJb6VMphmVUFsWmgodQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.4.1.tgz", + "integrity": "sha512-DwnG4cKFEM7S3T+9u05NstXU/HN0dk45kPOinUyNKsn5VWwpXd9sbPKEg6kgJzGbm1lMuhx9o31PVbCtM5sfBA==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", @@ -195,7 +195,7 @@ "@azure/core-tracing": "^1.0.0", "@azure/core-util": "^1.3.0", "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^3.11.1", + "@azure/msal-browser": "^3.14.0", "@azure/msal-node": "^2.9.2", "events": "^3.0.0", "jws": "^4.0.0", @@ -208,9 +208,9 @@ } }, "node_modules/@azure/logger": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.3.tgz", - "integrity": "sha512-J8/cIKNQB1Fc9fuYqBVnrppiUtW+5WWJPCj/tAokC5LdSTwkWWttN+jsRgw9BLYD7JDBx7PceiqOBxJJ1tQz3Q==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", + "integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==", "dev": true, "dependencies": { "tslib": "^2.6.2" @@ -220,33 +220,33 @@ } }, "node_modules/@azure/msal-browser": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.19.0.tgz", - "integrity": "sha512-3unHlh3qWtXbqks/TLq3qGWzxfmwRfk9tXSGvVCcHHnCH5QKtcg/JiDIeP/1B2qFlqnSgtYY0JPLy9EIVoZ7Ag==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.20.0.tgz", + "integrity": "sha512-ErsxbfCGIwdqD8jipqdxpfAGiUEQS7MWUe39Rjhl0ZVPsb1JEe9bZCe2+0g23HDH6DGyCAtnTNN9scPtievrMQ==", "dev": true, "dependencies": { - "@azure/msal-common": "14.13.0" + "@azure/msal-common": "14.14.0" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "14.13.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.13.0.tgz", - "integrity": "sha512-b4M/tqRzJ4jGU91BiwCsLTqChveUEyFK3qY2wGfZ0zBswIBZjAxopx5CYt5wzZFKuN15HqRDYXQbztttuIC3nA==", + "version": "14.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.0.tgz", + "integrity": "sha512-OxcOk9H1/1fktHh6//VCORgSNJc2dCQObTm6JNmL824Z6iZSO6eFo/Bttxe0hETn9B+cr7gDouTQtsRq3YPuSQ==", "dev": true, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.11.0.tgz", - "integrity": "sha512-yNRCp4Do4CGSBe1WXq4DWhfa/vYZCUgGrweYLC5my/6eDnYMt0fYGPHuTMw0iRslQGXF3CecGAxXp7ab57V4zg==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.12.0.tgz", + "integrity": "sha512-jmk5Im5KujRA2AcyCb0awA3buV8niSrwXZs+NBJWIvxOz76RvNlusGIqi43A0h45BPUy93Qb+CPdpJn82NFTIg==", "dev": true, "dependencies": { - "@azure/msal-common": "14.13.0", + "@azure/msal-common": "14.14.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -677,9 +677,9 @@ } }, "node_modules/@jsonjoy.com/json-pack": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.0.4.tgz", - "integrity": "sha512-aOcSN4MeAtFROysrbqG137b7gaDDSmVrl5mpo6sT/w+kcXpWnzhMjmY/Fh/sDx26NBxyIE7MB1seqLeCAzy9Sg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.1.0.tgz", + "integrity": "sha512-zlQONA+msXPPwHWZMKFVS78ewFczIll5lXiVPwFPCZUsrOKdxc2AvxU1HoNBmMRhqDZUR9HkC3UOm+6pME6Xsg==", "dev": true, "dependencies": { "@jsonjoy.com/base64": "^1.1.1", @@ -699,9 +699,9 @@ } }, "node_modules/@jsonjoy.com/util": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.2.0.tgz", - "integrity": "sha512-4B8B+3vFsY4eo33DMKyJPlQ3sBMpPFUZK2dr3O3rXrOGKKbYG44J0XSFkDo1VOQiri5HFEhIeVvItjR2xcazmg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.3.0.tgz", + "integrity": "sha512-Cebt4Vk7k1xHy87kHY7KSPLT77A7Ev7IfOblyLZhtYEhrdQ6fX4EoLq3xOQ3O/DRMEh2ok5nyC180E+ABS8Wmw==", "dev": true, "engines": { "node": ">=10.0" @@ -795,9 +795,9 @@ } }, "node_modules/@pnp/core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@pnp/core/-/core-4.2.0.tgz", - "integrity": "sha512-6dewgrUxl2wavAWZAWDQzmEmvztI6dXoMJOfcgdxX+MUhF83YYtjLCJaRfxMJsrnHmMJbTiIhnIAsZbaO5IczQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@pnp/core/-/core-4.3.0.tgz", + "integrity": "sha512-aTCx1gLCKOZIG6B1ArqZGTVPEVM//UCyjApY6DHJSQL65OdlSUS/ik5HpNttxF88XWOUY3sYY2V0qVI0bBvarA==", "dev": true, "dependencies": { "tslib": "2.6.3" @@ -811,9 +811,9 @@ } }, "node_modules/@pnp/logging": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@pnp/logging/-/logging-4.2.0.tgz", - "integrity": "sha512-/i0hipGGeje7+iSoIfjjaYqbtLDFRKA2jxC/AmXLink2/Yl5IvcahLagNUGeLAOx43A63jM/FW0XPeMCsCXfMQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@pnp/logging/-/logging-4.3.0.tgz", + "integrity": "sha512-ebf1MSK1AFtXKGf52v1cBfC9h+VHal3hDPxyVH/NCXDiN/PnX78PTjnRHMrtou73q59npQ8ohgXGcyxhA6W60Q==", "dev": true, "dependencies": { "tslib": "2.6.3" @@ -864,9 +864,9 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.16", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz", - "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", + "version": "4.3.17", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.17.tgz", + "integrity": "sha512-zmZ21EWzR71B4Sscphjief5djsLre50M6lI622OSySTmn9DB3j+C3kWroHfBQWXbOBwbgg/M8CG/hUxDLIloow==", "dev": true }, "node_modules/@types/chai-as-promised": { @@ -904,9 +904,9 @@ "dev": true }, "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", + "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", "dev": true, "dependencies": { "@types/estree": "*", @@ -969,9 +969,9 @@ "dev": true }, "node_modules/@types/http-proxy": { - "version": "1.17.14", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", - "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", + "version": "1.17.15", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", + "integrity": "sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -1106,18 +1106,18 @@ } }, "node_modules/@types/ws": { - "version": "8.5.11", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.11.tgz", - "integrity": "sha512-4+q7P5h3SpJxaBft0Dzpbr6lmMaqh0Jr2tbhJZ/luAwvD7ohSCniYkwz/pLxuT2h0EOa6QADgJj1Ko+TzRfZ+w==", + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -1925,9 +1925,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", - "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -1944,9 +1944,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", "update-browserslist-db": "^1.1.0" }, "bin": { @@ -2063,9 +2063,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001642", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", - "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", "dev": true, "funding": [ { @@ -2423,9 +2423,9 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2740,9 +2740,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.827", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.827.tgz", - "integrity": "sha512-VY+J0e4SFcNfQy19MEoMdaIcZLmDCprqvBtkii1WTCTQHpRvf5N8+3kTYCgL/PcntvwQvmMJWTuDPsq+IlhWKQ==", + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.6.tgz", + "integrity": "sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==", "dev": true }, "node_modules/emoji-regex": { @@ -2770,9 +2770,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -3441,9 +3441,9 @@ } }, "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -4037,9 +4037,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -4062,9 +4062,9 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -4174,9 +4174,9 @@ } }, "node_modules/is-core-module": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", - "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", "dev": true, "dependencies": { "hasown": "^2.0.2" @@ -4600,9 +4600,9 @@ } }, "node_modules/launch-editor": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.0.tgz", - "integrity": "sha512-vJranOAJrI/llyWGRQqiDM+adrw+k83fvmmx3+nV47g3+36xM15jE+zyZ6Ffel02+xSvuM0b2GDRosXZkbb6wA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.1.tgz", + "integrity": "sha512-elBx2l/tp9z99X5H/qev8uyDywVh0VXAwEbjk8kJhnc5grOFkGh7aW6q55me9xnYbss261XtnUrysZ+XvGbhQA==", "dev": true, "dependencies": { "picocolors": "^1.0.0", @@ -4813,13 +4813,13 @@ } }, "node_modules/memfs": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.9.3.tgz", - "integrity": "sha512-bsYSSnirtYTWi1+OPMFb0M048evMKyUYe0EbtuGQgq6BVQM1g1W8/KIUJCCvjgI/El0j6Q4WsmMiBwLUBSw8LA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.11.1.tgz", + "integrity": "sha512-LZcMTBAgqUUKNXZagcZxvXXfgF1bHX7Y7nQ0QyEiNbRJgE29GhgPd8Yna1VQcLlPiHt/5RFJMWYN9Uv/VPNvjQ==", "dev": true, "dependencies": { "@jsonjoy.com/json-pack": "^1.0.3", - "@jsonjoy.com/util": "^1.1.2", + "@jsonjoy.com/util": "^1.3.0", "tree-dump": "^1.0.1", "tslib": "^2.0.0" }, @@ -5017,9 +5017,9 @@ } }, "node_modules/mocha": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", - "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", "dev": true, "dependencies": { "ansi-colors": "^4.1.3", @@ -5200,9 +5200,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-package-data": { @@ -6224,9 +6224,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -6740,9 +6740,9 @@ } }, "node_modules/terser": { - "version": "5.31.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.2.tgz", - "integrity": "sha512-LGyRZVFm/QElZHy/CPr/O4eNZOZIzsrQ92y4v9UJe/pFJjypje2yI3C2FmPtvUEnhadlSbmG2nXtdcjHOjCfxw==", + "version": "5.31.5", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.5.tgz", + "integrity": "sha512-YPmas0L0rE1UyLL/llTWA0SiDOqIcAQYLeUj7cJYzXHlRTAnMSg9pPe4VJ5PlKvTrPQsdVFuiRiwyeNlYgwh2Q==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -6895,9 +6895,9 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "engines": { "node": ">=4" @@ -7186,9 +7186,9 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.2.1.tgz", - "integrity": "sha512-hRLz+jPQXo999Nx9fXVdKlg/aehsw1ajA9skAneGmT03xwmyuhvF93p6HUKKbWhXdcERtGTzUCtIQr+2IQegrA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.3.0.tgz", + "integrity": "sha512-xD2qnNew+F6KwOGZR7kWdbIou/ud7cVqLEXeK1q0nHcNsX/u7ul/fSdlOTX4ntSL5FNFy7ZJJXbf0piF591JYw==", "dev": true, "dependencies": { "colorette": "^2.0.10", @@ -7441,9 +7441,9 @@ } }, "node_modules/webpack-dev-server/node_modules/rimraf": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.9.tgz", - "integrity": "sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", "dev": true, "dependencies": { "glob": "^10.3.7" @@ -7451,9 +7451,6 @@ "bin": { "rimraf": "dist/esm/bin.mjs" }, - "engines": { - "node": "14 >=14.20 || 16 >=16.20 || >=18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } diff --git a/package.json b/package.json index fe2b886c5..36cc113a5 100644 --- a/package.json +++ b/package.json @@ -2,23 +2,23 @@ "name": "@pnp/monorepo", "private": true, "type": "module", - "version": "4.3.0", + "version": "4.4.0", "description": "A JavaScript library for SharePoint & Graph development.", "devDependencies": { - "@azure/identity": "4.3.0", - "@azure/msal-browser": "3.19.0", - "@azure/msal-node": "2.11.0", + "@azure/identity": "4.4.1", + "@azure/msal-browser": "3.20.0", + "@azure/msal-node": "2.12.0", "@microsoft/microsoft-graph-types": "2.40.0", "@pnp/buildsystem": "^4.0.1", - "@pnp/logging": "^4.2.0", - "@types/chai": "4.3.16", + "@pnp/logging": "^4.3.0", + "@types/chai": "4.3.17", "@types/chai-as-promised": "7.1.8", "@types/core-js": "2.5.8", "@types/findup-sync": "4.0.5", "@types/mocha": "10.0.7", "@types/node": "18.11.9", "@types/webpack": "5.28.5", - "@types/yargs": "17.0.32", + "@types/yargs": "17.0.33", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", "chai": "4.3.10", @@ -27,7 +27,7 @@ "eslint": "8.57.0", "findup-sync": "5.0.0", "globby": "14.0.2", - "mocha": "10.6.0", + "mocha": "10.7.3", "node-fetch": "3.3.2", "prettyjson": "1.2.5", "string-replace-loader": "3.1.0", diff --git a/packages/azidjsclient/package.json b/packages/azidjsclient/package.json index ba73e9636..8b7582975 100644 --- a/packages/azidjsclient/package.json +++ b/packages/azidjsclient/package.json @@ -7,7 +7,7 @@ "dependencies": { "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER", - "@azure/identity": "4.3.0", + "@azure/identity": "4.4.1", "tslib": "2.6.3" } } \ No newline at end of file diff --git a/packages/graph/shares/types.ts b/packages/graph/shares/types.ts index a2e2aa590..ce2d3238f 100644 --- a/packages/graph/shares/types.ts +++ b/packages/graph/shares/types.ts @@ -45,7 +45,7 @@ export class _Shares extends _GraphCollection { * @param share: string - Share Id or Encoded Sharing Url * @returns Microsoft Graph - SharingLink */ - public async useSharingLink(shareLink: IShareLinkInfo): Promise { + public async useSharingLink(shareLink: IShareLinkInfo): Promise> { const q = Shares(this, shareLink.shareId || shareLink.encodedSharingUrl); if (shareLink.redeemSharingLink) { q.using(InjectHeaders({ @@ -60,7 +60,7 @@ export class _Shares extends _GraphCollection { return graphPost(q, body(shareLinkAccess)); } } -export interface IShares extends _Shares, IGetById { } +export interface IShares extends _Shares, IGetById { } export const Shares = graphInvokableFactory(_Shares); diff --git a/packages/graph/taxonomy/types.ts b/packages/graph/taxonomy/types.ts index a9f58510b..db0c7fd1c 100644 --- a/packages/graph/taxonomy/types.ts +++ b/packages/graph/taxonomy/types.ts @@ -77,16 +77,14 @@ export class _TermSet extends _GraphInstance { * * @returns Array of children for this item */ - public async getAllChildrenAsTree(): Promise { + public async getAllChildrenAsTree(props?: {retrieveProperties?: boolean}): Promise { - const visitor = async (source: { children(): Promise }, parent: IOrderedTermInfo[]) => { - - const children = await source.children(); + const visitor = async (source: ITerm | ITermSet, parent: IOrderedTermInfo[]) => { + const children = await source.children.select(...selects)(); for (let i = 0; i < children.length; i++) { const child = children[i]; - const orderedTerm: Partial = { children: [], defaultLabel: child.labels.find(l => l.isDefault).name, @@ -99,9 +97,15 @@ export class _TermSet extends _GraphInstance { } }; + let selects = ["*"]; + if(props?.retrieveProperties){ + // graph does not let us wildcard + select properties + selects=["id", "labels", "createdDateTime", "lastModifiedDateTime", "labels", "descriptions", "properties"]; + } + const tree: IOrderedTermInfo[] = []; - await visitor(this, tree); + await visitor(this, tree); return tree; } diff --git a/packages/msaljsclient/package.json b/packages/msaljsclient/package.json index 9b1955e23..5d6901351 100644 --- a/packages/msaljsclient/package.json +++ b/packages/msaljsclient/package.json @@ -5,7 +5,7 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "@azure/msal-browser": "3.19.0", + "@azure/msal-browser": "3.20.0", "@pnp/queryable": "0.0.0-PLACEHOLDER", "tslib": "2.6.3" } diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index ec8ac90ad..49fe5244f 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -5,7 +5,7 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "@azure/msal-node": "2.11.0", + "@azure/msal-node": "2.12.0", "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/logging": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER", diff --git a/packages/sp/security/funcs.ts b/packages/sp/security/funcs.ts index 48b6b9cbd..8d5ce4128 100644 --- a/packages/sp/security/funcs.ts +++ b/packages/sp/security/funcs.ts @@ -28,7 +28,7 @@ export async function getCurrentUserEffectivePermissions(this: SecurableQueryabl * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object */ export async function breakRoleInheritance(this: SecurableQueryable, copyRoleAssignments = false, clearSubscopes = false): Promise { - await spPost(SPQueryable(this, `breakroleinheritance(copyroleassignments=${copyRoleAssignments}, clearsubscopes=${clearSubscopes})`)); + return spPost(SPQueryable(this, `breakroleinheritance(copyroleassignments=${copyRoleAssignments}, clearsubscopes=${clearSubscopes})`)); } /** @@ -36,7 +36,7 @@ export async function breakRoleInheritance(this: SecurableQueryable, copyRoleAss * */ export async function resetRoleInheritance(this: SecurableQueryable): Promise { - await spPost(SPQueryable(this, "resetroleinheritance")); + return spPost(SPQueryable(this, "resetroleinheritance")); } /**