Skip to content

Commit

Permalink
Merge pull request #1871 from snyk/chore/remove-lodash-endswith-lib
Browse files Browse the repository at this point in the history
chore: remove redundant lodash.endswith package
  • Loading branch information
jan-stehlik committed May 5, 2021
2 parents 8e4862d + 0c3ae68 commit e78a3bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -92,7 +92,6 @@
"lodash.assign": "^4.2.0",
"lodash.camelcase": "^4.3.0",
"lodash.clonedeep": "^4.5.0",
"lodash.endswith": "^4.2.1",
"lodash.flatten": "^4.4.0",
"lodash.flattendeep": "^4.4.0",
"lodash.get": "^4.4.2",
Expand Down
5 changes: 2 additions & 3 deletions src/lib/detect.ts
@@ -1,7 +1,6 @@
import * as fs from 'fs';
import * as pathLib from 'path';
import * as debugLib from 'debug';
const endsWith = require('lodash.endswith');
import { NoSupportedManifestsFoundError } from './errors';
import { SupportedPackageManagers } from './package-managers';

Expand Down Expand Up @@ -99,9 +98,9 @@ const DETECTABLE_PACKAGE_MANAGERS: {
'mix.exs': 'hex',
};

export function isPathToPackageFile(path) {
export function isPathToPackageFile(path: string) {
for (const fileName of DETECTABLE_FILES) {
if (endsWith(path, fileName)) {
if (path.endsWith(fileName)) {
return true;
}
}
Expand Down

0 comments on commit e78a3bc

Please sign in to comment.