diff --git a/notNeededPackages.json b/notNeededPackages.json index dab1b669ad..9725414e8a 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -5604,6 +5604,12 @@ "sourceRepoURL": "https://github.com/donavon/use-dark-mode#readme", "asOfVersion": "2.3.1" }, + { + "libraryName": "username", + "typingsPackageName": "username", + "sourceRepoURL": "https://github.com/sindresorhus/username", + "asOfVersion": "5.0.0" + }, { "libraryName": "UUID.js", "typingsPackageName": "uuidjs", diff --git a/types/username/index.d.ts b/types/username/index.d.ts deleted file mode 100644 index 4d8c34ee10..0000000000 --- a/types/username/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Type definitions for username v3.0.0 -// Project: https://www.npmjs.com/package/username -// Definitions by: Klaus Reimer -// Akos Krivachy -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -/** - * Tries to get the username from the LOGNAME, USER, LNAME or USERNAME environment variables. - * Falls back to `id -un` on OS X / Linux and `whoami` on Windows in the rare case none of the environment - * variables are set. The result is cached. - * - * @return Promise A promise containing the username or empty string if not found. - */ -declare function username(): Promise; - -declare namespace username { - /** - * Tries to get the username from the LOGNAME, USER, LNAME or USERNAME environment variables. Falls back - * to returning an empty string in the reare case none of the environment variables are set. - * - * @return The username or empty string if not found. - */ - function sync(): string; -} - -export = username; diff --git a/types/username/tsconfig.json b/types/username/tsconfig.json deleted file mode 100644 index a67f3c05b6..0000000000 --- a/types/username/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", - "username-tests.ts" - ] -} diff --git a/types/username/tslint.json b/types/username/tslint.json deleted file mode 100644 index 71c6c663ac..0000000000 --- a/types/username/tslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "callable-types": false, - "dt-header": false, - "no-consecutive-blank-lines": false, - "no-redundant-jsdoc": false, - "prefer-method-signature": false, - "trim-file": false - } -} diff --git a/types/username/username-tests.ts b/types/username/username-tests.ts deleted file mode 100644 index a5bbe51aca..0000000000 --- a/types/username/username-tests.ts +++ /dev/null @@ -1,12 +0,0 @@ - -import username = require("username"); - -username() - .then((username) => { - username === "string"; - }) - .catch((err) => { - err === new Error(); - }); - -username.sync() === "string";