diff --git a/lib/index.ts b/lib/index.ts index b91c88a9..8f5e0d1c 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -49,9 +49,9 @@ function buildDepTreeFromFiles( const manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8'); - if (manifestFilePath.endsWith('.csproj')) { + if (_.endsWith(manifestFilePath, '.csproj')) { return buildDepTreeFromCsproj(manifestFileContents, includeDev); - } else if (manifestFilePath.endsWith('packages.config')) { + } else if (_.endsWith(manifestFilePath, 'packages.config')) { return buildDepTreeFromPackagesConfig(manifestFileContents, includeDev); } else { throw new Error(`Unsupported file ${manifestFilePath}, diff --git a/package.json b/package.json index 60b6b6fc..fa6afd4f 100644 --- a/package.json +++ b/package.json @@ -29,11 +29,12 @@ "@types/xml2js": "0.4.3", "lodash": "4.17.10", "source-map-support": "^0.5.7", + "tslib": "^1.9.3", "xml2js": "0.4.19" }, "devDependencies": { "@types/lodash": "^4.14.116", - "@types/node": "10.5.5", + "@types/node": "^4.0.47", "tap": "github:snyk/node-tap#alternative-runtimes", "ts-node": "7.0.0", "tslint": "5.11.0", diff --git a/tsconfig.json b/tsconfig.json index 81f943b0..c9141d4f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,16 +3,15 @@ "outDir": "./dist", "pretty": true, "target": "es5", - "lib": [ - "es2017" - ], + "lib": ["es5", "es2015.promise"], "module": "commonjs", "sourceMap": true, "declaration": true, + "importHelpers": true, "strict": true, "noImplicitAny": false // Needed to compile tap }, "include": [ - "./lib/**/*", + "./lib/**/*" ] }