Skip to content

Commit 5cf1dec

Browse files
authored
Merge pull request #532 from microsoftgraph/release/version-3.0.1
Release 3.0.1
2 parents a3ee95d + 9a8444c commit 5cf1dec

34 files changed

+1332
-1270
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ src/**/*.js.map
2121
src/**/*.d.ts
2222

2323
samples/**/secrets.ts
24-
samples/**/secrets.js
2524
samples/node_modules/**
2625
samples/lib/
2726

design/publishing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
##### Current set up -
2222

23-
1. TypeScript Source Code
23+
1. TypeScript Source Code
2424
/ \
2525
Transpiles into JavaScript
2626
'lib' folder
@@ -40,7 +40,7 @@
4040
1. `src/browser/index.js` does not export `RedirectHandler` and `RedirectHandlerOptions`. Redirection is handled by the browser.
4141
2. `src/browser/index.js` exports `src/browser/ImplicitMsalProvider`.
4242
3. `src/browser/ImplicitMsalProvider` does not import or require 'msal' dependency. While, `src/ImplicitMsalProvider` imports or requires 'msal' in the implementation.
43-
4. My assumtion is that `src/browser/ImplicitMsalProvider` is implemented specifically for the rollup process and to skip the rollup external dependency while using `graph-js-sdk.js` in the browser.
43+
4. My assumption is that `src/browser/ImplicitMsalProvider` is implemented specifically for the rollup process and to skip the rollup external dependency while using `graph-js-sdk.js` in the browser.
4444

4545
Note - Browser applications using the ES modules from the npm package of the JS SDK refer to the `module` entry point - `lib/es/src/index.js`(not the browser entry point). Example - Graph Explorer.
4646

docs/ChaosHandlerSamples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
**A request Passes through to the Graph, if there is no entry for the request**
1313

14-
**Note - Always add ChaosHandler before HttpMessageHandler in the midllewareChain**
14+
**Note - Always add ChaosHandler before HttpMessageHandler in the middlewareChain**
1515

1616
### Samples
1717

docs/CustomMiddlewareChain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class MyHttpMessageHandler implements Middleware {
6464

6565
### Create Middleware Chain
6666

67-
Can use own middlewares and the ones shipped with the library [[Here](../src/middleware) are the set of Middlwares shipped with the library] to create the middleware chain. Create a chain out of these one has to link them in sequentially manner in own preferred order using `.setNext()` method.
67+
Can use own middlewares and the ones shipped with the library [[Here](../src/middleware) are the set of Middlewares shipped with the library] to create the middleware chain. Create a chain out of these one has to link them in sequentially manner in own preferred order using `.setNext()` method.
6868

6969
Using AuthenticationHandler [one shipped with the library] and MyLoggingHandler, and MyHttpMessageHandler [custom ones] to create a middleware chain here.
7070

docs/tasks/LargeFileUploadTask.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export interface FileObject<T> {
6161
}
6262
```
6363

64-
The Microsoft Graph JavaScript Client SDK provides two implementions -
64+
The Microsoft Graph JavaScript Client SDK provides two implementations -
6565

6666
1. StreamUpload - Supports Node.js stream upload
6767

@@ -87,8 +87,8 @@ import * as fs from "fs";
8787
const fileName = "<FILE_NAME>";
8888
const stats = fs.statSync(`./test/sample_files/${fileName}`);
8989
const totalsize = stats.size;
90-
const readStream = fs.readFileSync(`./test/sample_files/${fileName}`);
91-
const fileObject = new FileUpload(readStream, fileName, totalsize);
90+
const fileContent = fs.readFileSync(`./test/sample_files/${fileName}`);
91+
const fileObject = new FileUpload(fileContent, fileName, totalsize);
9292
```
9393

9494
**_Note_** - You can also have a customized `FileObject` implementation which contains the `sliceFile(range: Range)` function which implements the logic to split the file into ranges.
@@ -114,7 +114,7 @@ const options: LargeFileUploadTaskOptions = {
114114
**Create a LargefileUploadTask object**
115115

116116
```typescript
117-
const uploadTask = new LargeFileUploadTask(client, fileObj, uploadSession, optionsWithProgress);
117+
const uploadTask = new LargeFileUploadTask(client, fileObject, uploadSession, optionsWithProgress);
118118
const uploadResult: UploadResult = await uploadTask.upload();
119119
```
120120

@@ -141,8 +141,8 @@ const options: OneDriveLargeFileUploadOptions = {
141141
const readStream = fs.createReadStream(`./fileName`);
142142
const fileObject = new StreamUpload(readStream, fileName, totalsize);
143143
or
144-
const readFile = fs.readFileSync(`./fileName`);
145-
const fileObject = new FileUpload(readStream, fileName, totalsize);
144+
const uploadContent = fs.readFileSync(`./fileName`);
145+
const fileObject = new FileUpload(uploadContent, fileName, totalsize);
146146

147147
const uploadTask = await OneDriveLargeFileUploadTask.createTaskWithFileObject(client, fileObject, options);
148148
const uploadResult:UploadResult = await uploadTask.upload();

docs/tasks/PageIterator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function callingPattern() {
1717
// Creating a new page iterator instance with client a graph client instance, page collection response from request and callback
1818
let pageIterator = new PageIterator(client, response, callback);
1919
// This iterates the collection until the nextLink is drained out.
20-
pageIterator.iterate();
20+
await pageIterator.iterate();
2121
} catch (e) {
2222
throw e;
2323
}
@@ -44,12 +44,12 @@ async function customSize() {
4444
};
4545
let pageIterator = new PageIterator(client, response, callback);
4646
// This stops iterating over for 1000 entities.
47-
pageIterator.iterate();
47+
await pageIterator.iterate();
4848

4949
// Resuming will do start from where it left off and iterate for next 1000 entities.
5050
// Check and resume is likely to be called in any user interaction requiring to load more data.
5151
if (!pageIterator.isComplete()) {
52-
pageIterator.resume();
52+
await pageIterator.resume();
5353
}
5454
} catch (e) {
5555
throw e;

package-lock.json

Lines changed: 16 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/microsoft-graph-client",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Microsoft Graph Client Library",
55
"keywords": [
66
"Microsoft",

samples/javascript/clientInitialization/tokenCredentialAuthenticationProvider/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
4. Navigate to the samples folder [./samples]and run `npm install`
2020

21-
5. Navigate to tokenCredentialAuthenticationProvider[./samples/javascript/clientInitialization/tokenCredentialAuthenticationProvider] in the samples directory.
21+
5. Navigate to secrets.js[./secrets] and populate all the values (tenantId, clientId, clientSecret, scopes)
2222

23-
6. For running this javascript sample, run `node index.js`
23+
6. Navigate to tokenCredentialAuthenticationProvider[./samples/javascript/clientInitialization/tokenCredentialAuthenticationProvider] in the samples directory.
24+
25+
7. For running this javascript sample, run `node index.js`

samples/javascript/clientInitialization/tokenCredentialAuthenticationProvider/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ const { clientId, clientSecret, scopes, tenantId } = require("./secrets");
1313
require("isomorphic-fetch");
1414

1515
const port = "<PORT_NUMBER>";
16-
const tenantId = "<TENANT_ID>";
17-
const clientId = "<CLIENT_ID>";
18-
const clientSecret = "<CLIENT_SECRET>";
19-
const scopes = "<SCOPE>";
2016
const redirectUri = `http://localhost:${port}/authresponse`;
2117
const authorityHost = "https://login.microsoftonline.com";
2218

0 commit comments

Comments
 (0)