Skip to content

Commit c633d51

Browse files
authored
Merge pull request #1142 from microsoftgraph/release/3.0.5
Release/3.0.5
2 parents 916a945 + e121c60 commit c633d51

23 files changed

+4095
-3688
lines changed

.github/workflows/ci_validation.yml

+20-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ jobs:
1919
uses: actions/setup-node@v3
2020
with:
2121
node-version: ${{ matrix.node-version }}
22-
- run: npm ci
23-
- run: npm run build --if-present
24-
- run: npm test
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build for node 14 and 16
26+
if: matrix.node-version != '12.x'
27+
run: npm run build --if-present
28+
29+
- name: Build for node 12
30+
if: matrix.node-version == '12.x'
31+
run: npm run build:cjs && npm run build:es
32+
33+
- name: Run unit tests
34+
run: npm test
35+
36+
- name: Verify ESM compatibility
37+
if: matrix.node-version == '16.x'
38+
working-directory: './test-esm'
39+
run: |
40+
npm ci
41+
npm test

.github/workflows/projectbot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- name: Generate token
1313
id: generate_token
14-
uses: tibdex/github-app-token@f717b5ecd4534d3c4df4ce9b5c1c2214f0f7cd06
14+
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
1515
with:
1616
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
1717
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ test/development/secrets.ts
3131
.idea/*
3232

3333
testResult.xml
34+
35+
test-esm/lib/*

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ src/
22
scripts/
33
design/
44
changelogs/
5-
testResult.xml
5+
testResult.xml
6+
test-esm/

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ Please see the [contributing guidelines](CONTRIBUTING.md).
205205
- [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/graph/toolkit/overview)
206206
- [Office Dev Center](http://dev.office.com/)
207207

208+
## Tips and Tricks
209+
210+
- [Microsoft Graph SDK `n.call is not a function` by Lee Ford](https://www.lee-ford.co.uk/posts/graph-sdk-is-not-a-function/)
211+
- [Example of using the Graph JS library with ESM and `importmaps` ](https://github.com/waldekmastykarz/js-graph-101/blob/main/index_esm.html)
212+
208213
## Third Party Notices
209214

210215
See [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)

docs/AuthCodeMSALBrowserAuthenticationProvider.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ Using npm:
3434
import { AuthCodeMSALBrowserAuthenticationProvider, AuthCodeMSALBrowserAuthenticationProviderOptions } from "@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser";
3535
import { Client } from "@microsoft/microsoft-graph-client";
3636

37-
const options:AuthCodeMSALBrowserAuthenticationProviderOptions: {
37+
const options: AuthCodeMSALBrowserAuthenticationProviderOptions = {
3838
account: account, // the AccountInfo instance to acquire the token for.
39-
interactionType: InteractionType.PopUp , // msal-browser InteractionType
39+
interactionType: InteractionType.Popup, // msal-browser InteractionType
4040
scopes: ["user.read", "mail.send"] // example of the scopes to be passed
41-
}
41+
};
4242

4343
// Pass the PublicClientApplication instance from step 2 to create AuthCodeMSALBrowserAuthenticationProvider instance
44-
const authProvider: new AuthCodeMSALBrowserAuthenticationProvider(publicClientApplication, options),
44+
const authProvider = new AuthCodeMSALBrowserAuthenticationProvider(publicClientApplication, options);
4545

4646

4747
// Initialize the Graph client
4848
const graphClient = Client.initWithMiddleware({
49-
authprovider
49+
authProvider
5050
});
5151

5252
```

0 commit comments

Comments
 (0)