From acda7e1cdbc4d1f7d3a3e24042b45a5810089127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Veyret?= Date: Tue, 12 Nov 2019 20:33:53 +0100 Subject: [PATCH] depcheck: Removing (#40269) Types are now directly maintained by upstream project. --- notNeededPackages.json | 6 +++ types/depcheck/depcheck-tests.ts | 43 --------------- types/depcheck/index.d.ts | 92 -------------------------------- types/depcheck/tsconfig.json | 23 -------- types/depcheck/tslint.json | 1 - 5 files changed, 6 insertions(+), 159 deletions(-) delete mode 100644 types/depcheck/depcheck-tests.ts delete mode 100644 types/depcheck/index.d.ts delete mode 100644 types/depcheck/tsconfig.json delete mode 100644 types/depcheck/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index cb2dcda3e4..42f5ab6f4e 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -882,6 +882,12 @@ "sourceRepoURL": "https://github.com/dgraham/delegated-events#readme", "asOfVersion": "1.1.0" }, + { + "libraryName": "depcheck", + "typingsPackageName": "depcheck", + "sourceRepoURL": "https://github.com/depcheck/depcheck", + "asOfVersion": "0.9.1" + }, { "libraryName": "detect-browser", "typingsPackageName": "detect-browser", diff --git a/types/depcheck/depcheck-tests.ts b/types/depcheck/depcheck-tests.ts deleted file mode 100644 index e581614584..0000000000 --- a/types/depcheck/depcheck-tests.ts +++ /dev/null @@ -1,43 +0,0 @@ -import depcheck = require('depcheck'); - -const options: depcheck.Options = { - ignoreBinPackage: false, - ignoreDirs: ['sandbox', 'dist', 'bower_components'], - ignoreMatches: ['grunt-*'], - parsers: { - '*.js': depcheck.parser.es6, - '*.jsx': depcheck.parser.jsx, - }, - detectors: [depcheck.detector.requireCallExpression, depcheck.detector.importDeclaration], - specials: [depcheck.special.eslint, depcheck.special.webpack], -}; - -// $ExpectType Promise -depcheck('/', options); - -depcheck('/', options, unused => { - const dependencies: string[] = unused.dependencies; - const devDependencies: string[] = unused.devDependencies; - const missing: { [dependencyName: string]: string[] } = unused.missing; - const using: { [dependencyName: string]: string[] } = unused.using; - const invalidFiles: { [filePath: string]: any } = unused.invalidFiles; - const invalidDirs: { [filePath: string]: any } = unused.invalidDirs; -}); - -const exampleResult: depcheck.Results = { - dependencies: ['underscore'], - devDependencies: ['jasmine'], - missing: { - lodash: ['/path/to/my/project/file.using.lodash.js'], - }, - using: { - react: ['/path/to/my/project/file.using.react.jsx', '/path/to/my/project/another.file.using.react.jsx'], - lodash: ['/path/to/my/project/file.using.lodash.js'], - }, - invalidFiles: { - '/path/to/my/project/file.having.syntax.error.js': 'SyntaxError: ', - }, - invalidDirs: { - '/path/to/my/project/folder/without/permission': 'Error: EACCES, ', - }, -}; diff --git a/types/depcheck/index.d.ts b/types/depcheck/index.d.ts deleted file mode 100644 index dd810963b8..0000000000 --- a/types/depcheck/index.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -// Type definitions for depcheck 0.9 -// Project: https://github.com/depcheck/depcheck -// Definitions by: ark120202 -// jrnail23 -// rumpl -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare function depcheck(rootDir: string, options: depcheck.Options): Promise; - -declare function depcheck( - rootDir: string, - options: depcheck.Options, - callback: (results: depcheck.Results) => T -): Promise; - -declare namespace depcheck { - interface Node { - [key: string]: any; - } - - type Parser = (content: string, filePath: string, deps: ReadonlyArray, rootDir: string) => Node; - - type Detector = (node: Node) => ReadonlyArray | string; - - interface Options { - ignoreBinPackage?: boolean; - skipMissing?: boolean; - ignoreDirs?: ReadonlyArray; - ignoreMatches?: ReadonlyArray; - parsers?: { - [match: string]: Parser; - }; - detectors?: ReadonlyArray; - specials?: ReadonlyArray; - } - - interface Results { - dependencies: string[]; - devDependencies: string[]; - using: { - [dependencyName: string]: string[]; - }; - missing: { - [dependencyName: string]: string[]; - }; - invalidFiles: { - [filePath: string]: any; - }; - invalidDirs: { - [filePath: string]: any; - }; - } - - const parser: { - coffee: Parser; - es6: Parser; - es7: Parser; - jsx: Parser; - sass: Parser; - typescript: Parser; - vue: Parser; - }; - - const detector: { - exportDeclaration: Detector; - expressViewEngine: Detector; - gruntLoadTaskCallExpression: Detector; - importCallExpression: Detector; - importDeclaration: Detector; - requireCallExpression: Detector; - requireResolveCallExpression: Detector; - typescriptImportEqualsDeclaration: Detector; - detectTypescriptImportType: Detector; - }; - - const special: { - babel: Parser; - bin: Parser; - commitizen: Parser; - eslint: Parser; - 'feross-standard': Parser; - gatsby: Parser; - 'gulp-load-plugins': Parser; - jest: Parser; - karma: Parser; - mocha: Parser; - tslint: Parser; - webpack: Parser; - }; -} - -export = depcheck; diff --git a/types/depcheck/tsconfig.json b/types/depcheck/tsconfig.json deleted file mode 100644 index 490d7cc2bb..0000000000 --- a/types/depcheck/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "depcheck-tests.ts" - ] -} \ No newline at end of file diff --git a/types/depcheck/tslint.json b/types/depcheck/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/depcheck/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }