Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
eb7804f
build(deps): bump @babel/runtime from 7.20.0 to 7.20.1 (#1043)
dependabot[bot] Nov 7, 2022
3446957
build(deps-dev): bump @babel/core from 7.19.6 to 7.20.2 (#1039)
dependabot[bot] Nov 7, 2022
137d85c
build(deps-dev): bump @types/node from 18.11.8 to 18.11.9 (#1042)
dependabot[bot] Nov 8, 2022
8a46b00
build(deps): bump tslib from 2.4.0 to 2.4.1 (#1041)
dependabot[bot] Nov 8, 2022
0a44e58
build(deps-dev): bump eslint from 8.26.0 to 8.27.0 (#1040)
dependabot[bot] Nov 8, 2022
73835a8
build(deps-dev): bump @babel/preset-env from 7.19.4 to 7.20.2 (#1037)
dependabot[bot] Nov 8, 2022
91eb11f
build(deps): bump socket.io-parser from 4.0.4 to 4.0.5 (#1045)
dependabot[bot] Nov 10, 2022
3a9cd97
build(deps-dev): bump @typescript-eslint/parser from 5.42.0 to 5.42.1…
dependabot[bot] Nov 14, 2022
20c6d2c
build(deps-dev): bump @azure/identity from 3.0.0 to 3.1.0 (#1055)
dependabot[bot] Nov 14, 2022
f921c95
build(deps-dev): bump sinon from 14.0.1 to 14.0.2 (#1054)
dependabot[bot] Nov 14, 2022
8bc0da3
build(deps-dev): bump chai from 4.3.6 to 4.3.7 (#1053)
dependabot[bot] Nov 14, 2022
e3d88b8
build(deps-dev): bump @azure/msal-browser from 2.30.0 to 2.31.0 (#1052)
dependabot[bot] Nov 14, 2022
7b0891f
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1051)
dependabot[bot] Nov 14, 2022
14ede4c
build(deps-dev): bump husky from 8.0.1 to 8.0.2 (#1050)
dependabot[bot] Nov 14, 2022
b538851
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1061)
dependabot[bot] Nov 21, 2022
21a319c
build(deps-dev): bump typescript from 4.8.4 to 4.9.3 (#1058)
dependabot[bot] Nov 21, 2022
2e3ceb8
build(deps-dev): bump @azure/identity from 3.1.0 to 3.1.1 (#1063)
dependabot[bot] Nov 21, 2022
19c88a2
build(deps-dev): bump mocha-junit-reporter from 2.1.1 to 2.2.0 (#1062)
dependabot[bot] Nov 21, 2022
2ec9773
build(deps-dev): bump @typescript-eslint/parser from 5.42.1 to 5.43.0…
dependabot[bot] Nov 21, 2022
662a018
build(deps-dev): bump eslint from 8.27.0 to 8.28.0 (#1059)
dependabot[bot] Nov 21, 2022
d855b7c
build(deps-dev): bump @azure/msal-browser from 2.31.0 to 2.32.0 (#1071)
dependabot[bot] Nov 28, 2022
c109829
build(deps-dev): bump lint-staged from 13.0.3 to 13.0.4 (#1074)
dependabot[bot] Nov 28, 2022
922a7f0
build(deps): bump minimatch from 3.0.4 to 3.1.2 in /scripts (#1075)
dependabot[bot] Nov 28, 2022
8fcd985
build(deps-dev): bump @rollup/plugin-babel from 6.0.2 to 6.0.3 (#1073)
dependabot[bot] Nov 28, 2022
6d55812
build(deps-dev): bump @typescript-eslint/parser from 5.43.0 to 5.44.0…
dependabot[bot] Nov 28, 2022
832ac9d
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1069)
dependabot[bot] Nov 28, 2022
0266881
build(deps-dev): bump @rollup/plugin-commonjs from 23.0.2 to 23.0.3 (…
dependabot[bot] Nov 28, 2022
ef5d861
build(deps-dev): bump prettier from 2.7.1 to 2.8.0 (#1068)
dependabot[bot] Nov 28, 2022
62cf095
build(deps): bump engine.io and socket.io (#1064)
dependabot[bot] Nov 28, 2022
4d0dec7
build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#1079)
dependabot[bot] Dec 2, 2022
8a16cd1
build(deps-dev): bump eslint from 8.28.0 to 8.29.0 (#1087)
dependabot[bot] Dec 5, 2022
cd163a5
build(deps): bump tibdex/github-app-token from 1.6.0 to 1.7.0 (#1090)
dependabot[bot] Dec 5, 2022
cb8bf37
build(deps-dev): bump @typescript-eslint/parser from 5.44.0 to 5.45.0…
dependabot[bot] Dec 5, 2022
d8f4f66
build(deps-dev): bump @babel/core from 7.20.2 to 7.20.5 (#1089)
dependabot[bot] Dec 5, 2022
ad1a65e
build(deps): bump @babel/runtime from 7.20.1 to 7.20.6 (#1086)
dependabot[bot] Dec 5, 2022
10752d8
build(deps-dev): bump @types/node from 18.11.9 to 18.11.10 (#1084)
dependabot[bot] Dec 5, 2022
02cbf26
build(deps-dev): bump lint-staged from 13.0.4 to 13.1.0 (#1082)
dependabot[bot] Dec 5, 2022
344b211
build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /script…
dependabot[bot] Dec 5, 2022
bdfd657
build(deps): bump qs from 6.10.1 to 6.11.0 in /samples (#1091)
dependabot[bot] Dec 6, 2022
e30e92d
build(deps-dev): bump sinon from 14.0.2 to 15.0.0 (#1085)
dependabot[bot] Dec 6, 2022
68de3ef
build(deps): bump qs and body-parser (#1092)
dependabot[bot] Dec 7, 2022
0d00a61
build(deps-dev): bump prettier from 2.8.0 to 2.8.1 (#1101)
dependabot[bot] Dec 12, 2022
4c5d203
build(deps-dev): bump typescript from 4.9.3 to 4.9.4 (#1100)
dependabot[bot] Dec 12, 2022
b4ae41a
build(deps-dev): bump @azure/identity from 3.1.1 to 3.1.2 (#1098)
dependabot[bot] Dec 12, 2022
5ec04fe
build(deps-dev): bump @azure/msal-browser from 2.32.0 to 2.32.1 (#1099)
dependabot[bot] Dec 12, 2022
ec1a226
build(deps-dev): bump @types/node from 18.11.10 to 18.11.13 (#1096)
dependabot[bot] Dec 12, 2022
8b8e756
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1094)
dependabot[bot] Dec 12, 2022
d365ab1
build(deps-dev): bump @rollup/plugin-commonjs from 23.0.3 to 23.0.4 (…
dependabot[bot] Dec 12, 2022
785fc2d
build(deps-dev): bump @typescript-eslint/parser from 5.45.0 to 5.46.1…
dependabot[bot] Dec 19, 2022
07528aa
build(deps-dev): bump @types/node from 18.11.13 to 18.11.17 (#1109)
dependabot[bot] Dec 19, 2022
160c45f
build(deps-dev): bump eslint from 8.29.0 to 8.30.0 (#1107)
dependabot[bot] Dec 19, 2022
d211aa4
build(deps-dev): bump @rollup/plugin-commonjs from 23.0.4 to 24.0.0 (…
dependabot[bot] Dec 19, 2022
9b57faa
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1112)
dependabot[bot] Dec 19, 2022
d9d72b7
build(deps-dev): bump sinon from 15.0.0 to 15.0.1 (#1110)
dependabot[bot] Dec 20, 2022
2db7087
build(deps-dev): bump @typescript-eslint/parser from 5.46.1 to 5.47.0…
dependabot[bot] Dec 28, 2022
36a2639
build(deps): bump @babel/runtime from 7.20.6 to 7.20.7 (#1115)
dependabot[bot] Dec 28, 2022
c9c41a8
build(deps-dev): bump @babel/core from 7.20.5 to 7.20.7 (#1114)
dependabot[bot] Dec 28, 2022
62170ae
build(deps-dev): bump @types/node from 18.11.17 to 18.11.18 (#1123)
dependabot[bot] Jan 3, 2023
f090f34
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1127)
dependabot[bot] Jan 3, 2023
01575ad
build(deps-dev): bump @typescript-eslint/parser from 5.47.0 to 5.48.0…
dependabot[bot] Jan 4, 2023
bf14e78
build(deps): bump json5 from 2.2.1 to 2.2.3 (#1124)
dependabot[bot] Jan 4, 2023
c935d0a
build(deps-dev): bump eslint from 8.30.0 to 8.31.0 (#1122)
dependabot[bot] Jan 5, 2023
d2c7927
Rollup and rollup-terser bump dependency version (#1129)
nikithauc Jan 6, 2023
0379c8a
build(deps-dev): bump prettier from 2.8.1 to 2.8.2
dependabot[bot] Jan 9, 2023
420a446
Merge pull request #1130 from microsoftgraph/dependabot/npm_and_yarn/…
zengin Jan 9, 2023
cd0ad63
Mocha version update (#1131)
nikithauc Jan 11, 2023
11a7376
build(deps): bump jsonwebtoken and @azure/identity in /samples (#1132)
dependabot[bot] Jan 11, 2023
d203e70
Update README.md (#1134)
nikithauc Jan 13, 2023
5161d2b
build(deps-dev): bump @azure/identity from 3.1.2 to 3.1.3 (#1137)
dependabot[bot] Jan 16, 2023
abb75a2
build(deps-dev): bump prettier from 2.8.2 to 2.8.3 (#1138)
dependabot[bot] Jan 16, 2023
2b40d09
build(deps-dev): bump rollup from 3.9.1 to 3.10.0 (#1136)
dependabot[bot] Jan 16, 2023
4631c7c
build(deps-dev): bump eslint from 8.31.0 to 8.32.0 (#1135)
dependabot[bot] Jan 16, 2023
4519f25
Add header property to Graph error object (#1133)
nikithauc Jan 17, 2023
0247630
Update AuthCodeMSALBrowserAuthenticationProvider.md
khill-fbmc Jan 17, 2023
f3e9ff3
Merge pull request #1140 from khill-fbmc/patch-1
baywet Jan 17, 2023
9fbe8a7
Update AuthCodeMSALBrowserAuthenticationProvider.md
khill-fbmc Jan 17, 2023
af12a6c
Update AuthCodeMSALBrowserAuthenticationProvider.md
khill-fbmc Jan 17, 2023
597acce
Merge pull request #1141 from khill-fbmc/patch-2
baywet Jan 17, 2023
c67eff0
Merge branch 'main' into release/3.0.5
nikithauc Jan 18, 2023
6a4fbbb
update version
nikithauc Jan 18, 2023
e121c60
Merge branch 'dev' into release/3.0.5
nikithauc Jan 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/ci_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Install dependencies
run: npm ci

- name: Build for node 14 and 16
if: matrix.node-version != '12.x'
run: npm run build --if-present

- name: Build for node 12
if: matrix.node-version == '12.x'
run: npm run build:cjs && npm run build:es

- name: Run unit tests
run: npm test

- name: Verify ESM compatibility
if: matrix.node-version == '16.x'
working-directory: './test-esm'
run: |
npm ci
npm test
2 changes: 1 addition & 1 deletion .github/workflows/projectbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@f717b5ecd4534d3c4df4ce9b5c1c2214f0f7cd06
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
with:
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ test/development/secrets.ts
.idea/*

testResult.xml

test-esm/lib/*
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ src/
scripts/
design/
changelogs/
testResult.xml
testResult.xml
test-esm/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ Please see the [contributing guidelines](CONTRIBUTING.md).
- [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/graph/toolkit/overview)
- [Office Dev Center](http://dev.office.com/)

## Tips and Tricks

- [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/)
- [Example of using the Graph JS library with ESM and `importmaps` ](https://github.com/waldekmastykarz/js-graph-101/blob/main/index_esm.html)

## Third Party Notices

See [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)
Expand Down
10 changes: 5 additions & 5 deletions docs/AuthCodeMSALBrowserAuthenticationProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ Using npm:
import { AuthCodeMSALBrowserAuthenticationProvider, AuthCodeMSALBrowserAuthenticationProviderOptions } from "@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser";
import { Client } from "@microsoft/microsoft-graph-client";

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

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


// Initialize the Graph client
const graphClient = Client.initWithMiddleware({
authprovider
authProvider
});

```
Expand Down
Loading