Skip to content

Commit a3ee95d

Browse files
authored
Merge pull request #492 from microsoftgraph/release/3.0.0
Release/3.0.0
2 parents 9ab641d + 9114591 commit a3ee95d

File tree

183 files changed

+12763
-6886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+12763
-6886
lines changed

.eslintignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.js
2+
*.js.map
3+
*.d.ts
4+
5+
node_modules
6+
lib
7+
spec/development

.eslintrc.json

+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint", "prettier", "simple-import-sort"],
5+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier"],
6+
"rules": {
7+
"@typescript-eslint/no-empty-interface": "warn",
8+
"@typescript-eslint/ban-types": "off",
9+
"@typescript-eslint/no-unused-vars": "error",
10+
"@typescript-eslint/no-explicit-any": "off",
11+
"@typescript-eslint/explicit-module-boundary-types": "off",
12+
"prettier/prettier": "error",
13+
"@typescript-eslint/no-var-requires": "error",
14+
"@typescript-eslint/no-non-null-assertion": "error",
15+
"@typescript-eslint/naming-convention": [
16+
"error",
17+
{
18+
"selector": "typeLike",
19+
"format": ["PascalCase"],
20+
"filter": {
21+
"regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$",
22+
"match": false
23+
}
24+
},
25+
{
26+
"selector": "interface",
27+
"format": ["PascalCase"],
28+
"custom": {
29+
"regex": "^I[A-Z]",
30+
"match": false
31+
},
32+
"filter": {
33+
"regex": "^I(Arguments|TextWriter|O([A-Z][a-z]+[A-Za-z]*)?)$",
34+
"match": false
35+
}
36+
},
37+
{
38+
"selector": "variable",
39+
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
40+
"leadingUnderscore": "allow",
41+
"filter": {
42+
"regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$",
43+
"match": false
44+
}
45+
},
46+
{
47+
"selector": "function",
48+
"format": ["camelCase", "PascalCase"],
49+
"leadingUnderscore": "allow",
50+
"filter": {
51+
"regex": "^[A-Za-z]+_[A-Za-z]+$",
52+
"match": false
53+
}
54+
},
55+
{
56+
"selector": "parameter",
57+
"format": ["camelCase"],
58+
"leadingUnderscore": "allow",
59+
"filter": {
60+
"regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$",
61+
"match": false
62+
}
63+
},
64+
{
65+
"selector": "method",
66+
"format": ["camelCase", "PascalCase"],
67+
"leadingUnderscore": "allow",
68+
"filter": {
69+
"regex": "^[A-Za-z]+_[A-Za-z]+$",
70+
"match": false
71+
}
72+
},
73+
{
74+
"selector": "memberLike",
75+
"format": ["camelCase"],
76+
"leadingUnderscore": "allow",
77+
"filter": {
78+
"regex": "^[A-Za-z]+_[A-Za-z]+$",
79+
"match": false
80+
}
81+
},
82+
{
83+
"selector": "enumMember",
84+
"format": ["camelCase", "PascalCase"],
85+
"leadingUnderscore": "allow",
86+
"filter": {
87+
"regex": "^[A-Za-z]+_[A-Za-z]+$",
88+
"match": false
89+
}
90+
},
91+
{
92+
"selector": "property",
93+
"format": null
94+
}
95+
],
96+
"@typescript-eslint/semi": "error",
97+
"@typescript-eslint/no-use-before-define": "off",
98+
"@typescript-eslint/prefer-for-of": "error",
99+
"@typescript-eslint/prefer-function-type": "error",
100+
"@typescript-eslint/prefer-namespace-keyword": "error",
101+
"@typescript-eslint/quotes": [
102+
"error",
103+
"double",
104+
{
105+
"avoidEscape": true,
106+
"allowTemplateLiterals": true
107+
}
108+
],
109+
"@typescript-eslint/space-within-parens": ["off", "never"],
110+
"@typescript-eslint/triple-slash-reference": "error",
111+
"@typescript-eslint/type-annotation-spacing": "error",
112+
"@typescript-eslint/unified-signatures": "error",
113+
"@typescript-eslint/adjacent-overload-signatures": "error",
114+
"@typescript-eslint/array-type": "error",
115+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
116+
"@typescript-eslint/no-inferrable-types": "error",
117+
"@typescript-eslint/no-misused-new": "error",
118+
"@typescript-eslint/no-this-alias": "error",
119+
"no-unused-expressions": "off",
120+
"@typescript-eslint/no-unused-expressions": [
121+
"error",
122+
{
123+
"allowTernary": true
124+
}
125+
],
126+
"@typescript-eslint/space-before-function-paren": "off",
127+
"@typescript-eslint/consistent-type-assertions": "error",
128+
"@typescript-eslint/explicit-member-accessibility": [
129+
"off",
130+
{
131+
"accessibility": "explicit"
132+
}
133+
],
134+
"@typescript-eslint/indent": "off",
135+
"@typescript-eslint/interface-name-prefix": "off",
136+
"@typescript-eslint/member-delimiter-style": [
137+
"off",
138+
{
139+
"multiline": {
140+
"delimiter": "none",
141+
"requireLast": true
142+
},
143+
"singleline": {
144+
"delimiter": "semi",
145+
"requireLast": false
146+
}
147+
}
148+
],
149+
"@typescript-eslint/member-ordering": "off",
150+
"@typescript-eslint/no-empty-function": "error",
151+
"@typescript-eslint/no-namespace": "off",
152+
"@typescript-eslint/no-parameter-properties": "off",
153+
"@typescript-eslint/no-array-constructor": "error",
154+
"no-useless-catch": "error",
155+
"prefer-rest-params": "off",
156+
"no-constant-condition": "error",
157+
"simple-import-sort/imports": "error",
158+
"brace-style": "error",
159+
"constructor-super": "error",
160+
"curly": ["error", "multi-line"],
161+
"dot-notation": "off",
162+
"eqeqeq": "error",
163+
"new-parens": "error",
164+
"no-caller": "error",
165+
"no-duplicate-case": "error",
166+
"no-duplicate-imports": "error",
167+
"no-empty": "error",
168+
"no-eval": "error",
169+
"no-extra-bind": "error",
170+
"no-fallthrough": "error",
171+
"no-new-func": "off",
172+
"no-new-wrappers": "error",
173+
"no-return-await": "off",
174+
"no-sparse-arrays": "error",
175+
"no-template-curly-in-string": "error",
176+
"no-throw-literal": "error",
177+
"no-trailing-spaces": "error",
178+
"no-undef-init": "error",
179+
"no-unsafe-finally": "error",
180+
"no-unused-labels": "error",
181+
"no-var": "error",
182+
"object-shorthand": "error",
183+
"prefer-const": "error",
184+
"prefer-object-spread": "error",
185+
"quote-props": "off",
186+
"space-in-parens": "error",
187+
"unicode-bom": ["error", "never"],
188+
"use-isnan": "error"
189+
}
190+
}

.github/ISSUE_TEMPLATE/bug_report.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ""
5-
labels: ""
6-
assignees: ""
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
78
---
89

910
# Bug Report
@@ -40,6 +41,7 @@ For more information, see the `CONTRIBUTING` guide.
4041
Add any other context about the problem here..
4142

4243
## Usage Information
44+
Request ID - Value of the `requestId` field if you are receiving a Graph API error response
4345

4446
SDK Version - [SDK version you are using]
4547

.github/ISSUE_TEMPLATE/feature_request.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ""
5-
labels: ""
6-
assignees: ""
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
78
---
89

910
# Feature Request

.github/workflows/ci_validation.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Graph JS SDK CI
5+
6+
on: [pull_request]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [12.x, 14.x, 16.x]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- run: npm ci
23+
- run: npm run build --if-present
24+
- run: npm test

.gitignore

+9-8
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ npm-debug.log
1414
/lib/*
1515
!/lib/.npmignore
1616

17+
/authProviders/*
18+
1719
src/**/*.js
1820
src/**/*.js.map
1921
src/**/*.d.ts
2022

21-
samples/node/secrets.json
22-
samples/browser/src/secrets.js
23-
samples/browser/src/graph-js-sdk.js
24-
samples/browser/src/graph-es-sdk.js
23+
samples/**/secrets.ts
24+
samples/**/secrets.js
25+
samples/node_modules/**
26+
samples/lib/
27+
28+
test/development/secrets.ts
2529

26-
spec/**/*.js
27-
spec/**/*.d.ts
28-
spec/**/*.js.map
29-
spec/**/secrets.ts
30+
.nyc_output/*

.npmignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
src/
2-
scripts/
2+
scripts/
3+
design/
4+
changelogs/

.prettierignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ src/**/*.js
66
src/**/*.js.map
77
src/**/*.d.ts
88

9-
spec/**/*.js
10-
spec/**/*.js.map
11-
spec/**/*.d.ts
9+
test/**/*.js
10+
test/**/*.js.map
11+
test/**/*.d.ts

.vscode/launch.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"request": "launch",
1919
"name": "Run Content tests",
2020
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
21-
"args": ["${workspaceRoot}/lib/spec/content/*.js"],
21+
"args": ["${workspaceRoot}/lib/test/common/**/*.js"],
2222
"cwd": "${workspaceRoot}",
2323
"preLaunchTask": "Run Compile",
2424
"outFiles": [],
@@ -29,7 +29,7 @@
2929
"request": "launch",
3030
"name": "Run Core tests",
3131
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
32-
"args": ["${workspaceRoot}/lib/spec/core/*.js"],
32+
"args": ["${workspaceRoot}/lib/test/common/core/*.js"],
3333
"cwd": "${workspaceRoot}",
3434
"preLaunchTask": "Run Compile",
3535
"outFiles": [],
@@ -40,7 +40,7 @@
4040
"request": "launch",
4141
"name": "Run Middleware tests",
4242
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
43-
"args": ["${workspaceRoot}/lib/spec/middleware/*.js"],
43+
"args": ["${workspaceRoot}/lib/test/common/middleware/*.js"],
4444
"cwd": "${workspaceRoot}",
4545
"preLaunchTask": "Run Compile",
4646
"outFiles": [],
@@ -51,7 +51,7 @@
5151
"request": "launch",
5252
"name": "Run Tasks tests",
5353
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
54-
"args": ["${workspaceRoot}/lib/spec/tasks/*.js"],
54+
"args": ["${workspaceRoot}/lib/test/common/tasks/*.js"],
5555
"cwd": "${workspaceRoot}",
5656
"preLaunchTask": "Run Compile",
5757
"outFiles": [],
@@ -62,7 +62,7 @@
6262
"request": "launch",
6363
"name": "Run Workload tests",
6464
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
65-
"args": ["${workspaceRoot}/spec/development/workload/*.js"],
65+
"args": ["${workspaceRoot}/test/common/development/workload/*.js"],
6666
"cwd": "${workspaceRoot}",
6767
"preLaunchTask": "Run Compile",
6868
"outFiles": [],

CONTRIBUTING.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,9 @@ npm install
114114

115115
To edit files, open them in an editor of your choice and modify them. To create a new file, use the editor of your choice and save the new file in the appropriate location in your local copy of the repository. While working, save your work frequently.
116116

117-
*Note: Make sure to add unit tests to validate you changes.*
117+
_Note: Make sure to add unit tests to validate you changes._
118118

119-
Once you have done with your changes, You have to build and test your changes
120-
To build the library run,
119+
Build and test your changes with the following commands after you have completed your work:
121120

122121
```cmd
123122
npm run build

0 commit comments

Comments
 (0)