Skip to content

Commit 3f9412d

Browse files
committed
Uninstalling formdata, restoring the tsconfigs and removing the condition to check if form-data is undefined in GraphRequest.ts
1 parent 45727eb commit 3f9412d

File tree

6 files changed

+4
-59
lines changed

6 files changed

+4
-59
lines changed

package-lock.json

Lines changed: 0 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"@types/mocha": "^5.2.6",
2323
"@types/node": "^12.12.53",
2424
"chai": "^4.2.0",
25-
"form-data": "^3.0.0",
2625
"gulp": "^4.0.2",
2726
"husky": "^2.2.0",
2827
"isomorphic-fetch": "^2.2.1",

samples/browser/src/secrets.sample.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/GraphRequest.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
* @module GraphRequest
1010
*/
1111

12-
import FormData from "form-data";
13-
1412
import { GraphError } from "./GraphError";
1513
import { GraphErrorHandler } from "./GraphErrorHandler";
1614
import { oDataQueryNames, serializeContent, urlJoin } from "./GraphRequestUtil";
@@ -574,7 +572,7 @@ export class GraphRequest {
574572
body: serializeContent(content),
575573
};
576574
const className: string = content === undefined || content === null ? undefined : content.constructor.name;
577-
if (typeof FormData !== "undefined" && className === "FormData") {
575+
if (className === "FormData") {
578576
// Content-Type headers should not be specified in case the of FormData type content
579577
options.headers = {};
580578
} else {

tsconfig-cjs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"module": "commonjs",
55
"target": "es5",
66
"lib": ["dom", "esnext"],
7-
"outDir": "lib",
8-
"esModuleInterop": true
7+
"outDir": "lib"
98
},
109
"exclude": ["node_modules", "lib", "samples", "spec/development"],
1110
"include": ["./src/**/*.ts", "./spec/**/*.ts"]

tsconfig-es.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"extends": "./tsconfig-base.json",
33
"compilerOptions": {
4-
"module": "CommonJS",
4+
"module": "es6",
55
"target": "es6",
66
"lib": ["dom", "esnext"],
7-
"outDir": "lib/es",
8-
"esModuleInterop": true
7+
"outDir": "lib/es"
98
},
109
"exclude": ["node_modules", "lib", "samples", "spec/**"],
1110
"include": ["./src/**/*.ts"]

0 commit comments

Comments
 (0)