diff --git a/CHANGELOG.md b/CHANGELOG.md index d0cea8339..db5f57115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ 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.5.0 - 2024-Sept-16 + +- Only documentation and package updates + ## 4.4.0 - 2024-Aug-12 - sp @@ -14,7 +18,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - 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/debug/spfx/package.json b/debug/spfx/package.json index 12c254d75..44fda0dae 100644 --- a/debug/spfx/package.json +++ b/debug/spfx/package.json @@ -23,7 +23,7 @@ "@pnp/logging": "^4.0.1", "@pnp/sp": "^4.0.1", "@pnp/sp-admin": "^4.0.1", - "tslib": "2.3.1" + "tslib": "2.7.0" }, "devDependencies": { "@microsoft/eslint-config-spfx": "1.18.2", diff --git a/docs/graph/files.md b/docs/graph/files.md index 7448f8436..335ed9317 100644 --- a/docs/graph/files.md +++ b/docs/graph/files.md @@ -305,8 +305,7 @@ import * as fs from "fs"; import { graphfi } from "@pnp/graph"; import "@pnp/graph/files"; import "@pnp/graph/users"; -import {IFileUploadOptions} from "@pnp/graph/files"; - +import { DriveItem as DriveItemType } from "@microsoft/microsoft-graph-types"; const graph = graphfi(...); const fileBuff = fs.readFileSync("C:\\MyDocs\\TestDocument.docx"); @@ -317,7 +316,7 @@ const fileUploadOptions: IResumableUploadOptions }, }; -// Create the upload session +// Create the upload session, must get the drive root folder id to call createUploadSession const uploadSession = await graph.users.getById(userId).drive.getItemById(driveRoot.id).createUploadSession(fileUploadOptions); // Get the status of the upload session const status = await uploadSession.resumableUpload.status(); @@ -327,12 +326,14 @@ const upload = await uploadSession.resumableUpload.upload(fileBuff.length, fileB // Upload a chunk of the file to the upload session // Using a fragment size that doesn't divide evenly by 320 KiB results in errors committing some files. -const chunkSize = 327680; +const chunkFactor = 1; +const chunkSize = 327680 * chunkFactor; let startFrom = 0; +let driveItem: DriveItemType = null; while (startFrom < fileBuff.length) { - const fileChunk = fileBuff.slice(startFrom, startFrom + chunkSize); - const contentLength = `bytes ${startFrom}-${startFrom + chunkSize}/${fileBuff.length}` - const uploadChunk = await uploadSession.resumableUpload.upload(chunkSize, fileChunk, contentLength); + const fileChunk = Uint8Array.prototype.slice.call(fileBuff, startFrom, startFrom + chunkSize); + const range = `bytes ${startFrom}-${(startFrom + fileChunk.length) - 1}/${fileBuff.length}`; + driveItem = await uploadSession.resumableUpload.upload(fileChunk.length, fileChunk, range); startFrom += chunkSize; } ``` diff --git a/docs/graph/sites.md b/docs/graph/sites.md index ea2e6673c..c6376922c 100644 --- a/docs/graph/sites.md +++ b/docs/graph/sites.md @@ -43,7 +43,12 @@ import "@pnp/graph/sites"; const graph = graphfi(...); const sharepointHostName = "contoso.sharepoint.com"; const serverRelativeUrl = "/sites/teamsite1"; -const siteInfo = await graph.sites.getByUrl(sharepointHostName, serverRelativeUrl)(); +// Will be converted to a ISite object that can then be called, must be awaited. +const site: ISite = await graph.sites.getByUrl(sharepointHostName, serverRelativeUrl); +// Now use the ISite object to get drives +const drives = await site.drives(); +// Now use the ISite object to get the site information +const siteInfo = await site(); ``` ### getAllSites diff --git a/package.json b/package.json index 36cc113a5..8dc316127 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,20 @@ "name": "@pnp/monorepo", "private": true, "type": "module", - "version": "4.4.0", + "version": "4.5.0", "description": "A JavaScript library for SharePoint & Graph development.", "devDependencies": { "@azure/identity": "4.4.1", - "@azure/msal-browser": "3.20.0", - "@azure/msal-node": "2.12.0", + "@azure/msal-browser": "3.23.0", + "@azure/msal-node": "2.13.1", "@microsoft/microsoft-graph-types": "2.40.0", "@pnp/buildsystem": "^4.0.1", - "@pnp/logging": "^4.3.0", - "@types/chai": "4.3.17", + "@pnp/logging": "^4.4.0", + "@types/chai": "4.3.19", "@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/mocha": "10.0.8", "@types/node": "18.11.9", "@types/webpack": "5.28.5", "@types/yargs": "17.0.33", @@ -31,11 +31,11 @@ "node-fetch": "3.3.2", "prettyjson": "1.2.5", "string-replace-loader": "3.1.0", - "tslib": "2.6.3", + "tslib": "2.7.0", "typescript": "4.9.5", - "webpack": "5.93.0", + "webpack": "5.94.0", "webpack-cli": "5.1.4", - "webpack-dev-server": "5.0.4", + "webpack-dev-server": "5.1.0", "yargs": "17.7.2" }, "scripts": { diff --git a/packages/azidjsclient/package.json b/packages/azidjsclient/package.json index 8b7582975..2b580cdb6 100644 --- a/packages/azidjsclient/package.json +++ b/packages/azidjsclient/package.json @@ -8,6 +8,6 @@ "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER", "@azure/identity": "4.4.1", - "tslib": "2.6.3" + "tslib": "2.7.0" } } \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 0ec99cbec..04cf30a82 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,6 +5,6 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "tslib": "2.6.3" + "tslib": "2.7.0" } } \ No newline at end of file diff --git a/packages/graph/package.json b/packages/graph/package.json index be40999cb..91d686fbc 100644 --- a/packages/graph/package.json +++ b/packages/graph/package.json @@ -6,7 +6,7 @@ "typings": "./index", "dependencies": { "@microsoft/microsoft-graph-types": "2.40.0", - "tslib": "2.6.3", + "tslib": "2.7.0", "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER" } diff --git a/packages/logging/package.json b/packages/logging/package.json index 353f19fec..dd1046625 100644 --- a/packages/logging/package.json +++ b/packages/logging/package.json @@ -5,6 +5,6 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "tslib": "2.6.3" + "tslib": "2.7.0" } } \ No newline at end of file diff --git a/packages/msaljsclient/package.json b/packages/msaljsclient/package.json index 5d6901351..81848f23c 100644 --- a/packages/msaljsclient/package.json +++ b/packages/msaljsclient/package.json @@ -5,8 +5,8 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "@azure/msal-browser": "3.20.0", + "@azure/msal-browser": "3.23.0", "@pnp/queryable": "0.0.0-PLACEHOLDER", - "tslib": "2.6.3" + "tslib": "2.7.0" } } diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 49fe5244f..c95579630 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -5,13 +5,13 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "@azure/msal-node": "2.12.0", + "@azure/msal-node": "2.13.1", "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/logging": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER", "@pnp/sp": "0.0.0-PLACEHOLDER", "@pnp/graph": "0.0.0-PLACEHOLDER", "node-fetch": "3.3.2", - "tslib": "2.6.3" + "tslib": "2.7.0" } } \ No newline at end of file diff --git a/packages/queryable/package.json b/packages/queryable/package.json index 20ff88c69..265e75a35 100644 --- a/packages/queryable/package.json +++ b/packages/queryable/package.json @@ -5,7 +5,7 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "tslib": "2.6.3", + "tslib": "2.7.0", "@pnp/core": "0.0.0-PLACEHOLDER" } } \ No newline at end of file diff --git a/packages/sp-admin/package.json b/packages/sp-admin/package.json index feb07ed12..6595a0169 100644 --- a/packages/sp-admin/package.json +++ b/packages/sp-admin/package.json @@ -5,7 +5,7 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "tslib": "2.6.3", + "tslib": "2.7.0", "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER", "@pnp/sp": "0.0.0-PLACEHOLDER" diff --git a/packages/sp/package.json b/packages/sp/package.json index c4b0bcdf1..c1e37ac7c 100644 --- a/packages/sp/package.json +++ b/packages/sp/package.json @@ -5,7 +5,7 @@ "main": "./index.js", "typings": "./index", "dependencies": { - "tslib": "2.6.3", + "tslib": "2.7.0", "@pnp/core": "0.0.0-PLACEHOLDER", "@pnp/queryable": "0.0.0-PLACEHOLDER" }