Skip to content

Commit

Permalink
Merge pull request #492 from microsoftgraph/release/3.0.0
Browse files Browse the repository at this point in the history
Release/3.0.0
  • Loading branch information
nikithauc authored Aug 9, 2021
2 parents 9ab641d + 9114591 commit a3ee95d
Show file tree
Hide file tree
Showing 183 changed files with 12,763 additions and 6,886 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.js
*.js.map
*.d.ts

node_modules
lib
spec/development
190 changes: 190 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "simple-import-sort"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"rules": {
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"prettier/prettier": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "typeLike",
"format": ["PascalCase"],
"filter": {
"regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$",
"match": false
}
},
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": false
},
"filter": {
"regex": "^I(Arguments|TextWriter|O([A-Z][a-z]+[A-Za-z]*)?)$",
"match": false
}
},
{
"selector": "variable",
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"filter": {
"regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$",
"match": false
}
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow",
"filter": {
"regex": "^[A-Za-z]+_[A-Za-z]+$",
"match": false
}
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"filter": {
"regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$",
"match": false
}
},
{
"selector": "method",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow",
"filter": {
"regex": "^[A-Za-z]+_[A-Za-z]+$",
"match": false
}
},
{
"selector": "memberLike",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"filter": {
"regex": "^[A-Za-z]+_[A-Za-z]+$",
"match": false
}
},
{
"selector": "enumMember",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow",
"filter": {
"regex": "^[A-Za-z]+_[A-Za-z]+$",
"match": false
}
},
{
"selector": "property",
"format": null
}
],
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/space-within-parens": ["off", "never"],
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-this-alias": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowTernary": true
}
],
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/indent": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-delimiter-style": [
"off",
{
"multiline": {
"delimiter": "none",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-array-constructor": "error",
"no-useless-catch": "error",
"prefer-rest-params": "off",
"no-constant-condition": "error",
"simple-import-sort/imports": "error",
"brace-style": "error",
"constructor-super": "error",
"curly": ["error", "multi-line"],
"dot-notation": "off",
"eqeqeq": "error",
"new-parens": "error",
"no-caller": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-fallthrough": "error",
"no-new-func": "off",
"no-new-wrappers": "error",
"no-return-await": "off",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-const": "error",
"prefer-object-spread": "error",
"quote-props": "off",
"space-in-parens": "error",
"unicode-bom": ["error", "never"],
"use-isnan": "error"
}
}
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
title: ''
labels: ''
assignees: ''

---

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

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

SDK Version - [SDK version you are using]

Expand Down
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
title: ''
labels: ''
assignees: ''

---

# Feature Request
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Graph JS SDK CI

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
17 changes: 9 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ npm-debug.log
/lib/*
!/lib/.npmignore

/authProviders/*

src/**/*.js
src/**/*.js.map
src/**/*.d.ts

samples/node/secrets.json
samples/browser/src/secrets.js
samples/browser/src/graph-js-sdk.js
samples/browser/src/graph-es-sdk.js
samples/**/secrets.ts
samples/**/secrets.js
samples/node_modules/**
samples/lib/

test/development/secrets.ts

spec/**/*.js
spec/**/*.d.ts
spec/**/*.js.map
spec/**/secrets.ts
.nyc_output/*
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
src/
scripts/
scripts/
design/
changelogs/
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ src/**/*.js
src/**/*.js.map
src/**/*.d.ts

spec/**/*.js
spec/**/*.js.map
spec/**/*.d.ts
test/**/*.js
test/**/*.js.map
test/**/*.d.ts
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"request": "launch",
"name": "Run Content tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/content/*.js"],
"args": ["${workspaceRoot}/lib/test/common/**/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Compile",
"outFiles": [],
Expand All @@ -29,7 +29,7 @@
"request": "launch",
"name": "Run Core tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/core/*.js"],
"args": ["${workspaceRoot}/lib/test/common/core/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Compile",
"outFiles": [],
Expand All @@ -40,7 +40,7 @@
"request": "launch",
"name": "Run Middleware tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/middleware/*.js"],
"args": ["${workspaceRoot}/lib/test/common/middleware/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Compile",
"outFiles": [],
Expand All @@ -51,7 +51,7 @@
"request": "launch",
"name": "Run Tasks tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/tasks/*.js"],
"args": ["${workspaceRoot}/lib/test/common/tasks/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Compile",
"outFiles": [],
Expand All @@ -62,7 +62,7 @@
"request": "launch",
"name": "Run Workload tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/spec/development/workload/*.js"],
"args": ["${workspaceRoot}/test/common/development/workload/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Compile",
"outFiles": [],
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,9 @@ npm install

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.

*Note: Make sure to add unit tests to validate you changes.*
_Note: Make sure to add unit tests to validate you changes._

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

```cmd
npm run build
Expand Down
Loading

0 comments on commit a3ee95d

Please sign in to comment.