Skip to content

Commit 9bda63d

Browse files
authored
Merge pull request #434 from microsoftgraph/3.0.0
Merge 3.0.0 with dev
2 parents c239b7c + 3639c75 commit 9bda63d

File tree

157 files changed

+32183
-4976
lines changed

Some content is hidden

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

157 files changed

+32183
-4976
lines changed

.eslintignore

Lines changed: 7 additions & 0 deletions
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

Lines changed: 190 additions & 0 deletions
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/workflows/ci_validation.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [8.x, 10.x, 12.x, 14.x, 15.x]
16-
# Adding version 8.x considering SharePoint Framework depends on JS Graph library
17-
# https://docs.microsoft.com/en-us/sharepoint/dev/spfx/compatibility
18-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19-
15+
node-version: [10.x, 12.x, 14.x, 15.x]
2016
steps:
2117
- uses: actions/checkout@v2
2218
- name: Use Node.js ${{ matrix.node-version }}

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@ npm-debug.log
1414
/lib/*
1515
!/lib/.npmignore
1616

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

23+
samples/**/secrets.ts
24+
samples/**/secrets.js
2125
samples/node/secrets.json
2226
samples/browser/src/secrets.js
2327
samples/browser/src/graph-js-sdk.js
2428
samples/browser/src/graph-es-sdk.js
2529

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

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
src/
2-
scripts/
2+
scripts/
3+
design/
4+
changelogs/

.prettierignore

Lines changed: 3 additions & 3 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 2 additions & 3 deletions
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)