Skip to content

Commit

Permalink
Merge pull request #3128 from juliemturner/version-4
Browse files Browse the repository at this point in the history
Release 4.5.0 Updates
  • Loading branch information
patrick-rodgers authored Sep 16, 2024
2 parents d016c09 + da042dc commit ba7907a
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 30 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion debug/spfx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 8 additions & 7 deletions docs/graph/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -317,7 +316,7 @@ const fileUploadOptions: IResumableUploadOptions<DriveItemUploadableProperties>
},
};

// 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();
Expand All @@ -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;
}
```
Expand Down
7 changes: 6 additions & 1 deletion docs/graph/sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/azidjsclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"main": "./index.js",
"typings": "./index",
"dependencies": {
"tslib": "2.6.3"
"tslib": "2.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"main": "./index.js",
"typings": "./index",
"dependencies": {
"tslib": "2.6.3"
"tslib": "2.7.0"
}
}
4 changes: 2 additions & 2 deletions packages/msaljsclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/queryable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./index.js",
"typings": "./index",
"dependencies": {
"tslib": "2.6.3",
"tslib": "2.7.0",
"@pnp/core": "0.0.0-PLACEHOLDER"
}
}
2 changes: 1 addition & 1 deletion packages/sp-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/sp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit ba7907a

Please sign in to comment.