diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..68f73ed --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.editorconfig +.travis.yml +/test/ +/typedoc/ +tslint.json +build diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 0000000..bab0a5b --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./index.d.ts", + "docModel": { + "enabled": false + }, + "apiReport": { + "enabled": false + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "./build/index.d.ts" + }, + "messages": { + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-forgotten-export": { + "logLevel": "none" + } + } + } +} diff --git a/lib/Pool.d.ts b/lib/Pool.d.ts index bb0029a..ebfb7a5 100644 --- a/lib/Pool.d.ts +++ b/lib/Pool.d.ts @@ -31,7 +31,7 @@ declare namespace Pool { * is no limit to the number of queued connection requests. (Default: 0) */ queueLimit?: number; - + /** * Enable keep-alive on the socket. It's disabled by default, but the * user can enable it and supply an initial delay. diff --git a/package.json b/package.json index 3936709..1484e5f 100644 --- a/package.json +++ b/package.json @@ -2,19 +2,22 @@ "name": "@types/mysql", "version": "2.0.0", "description": "Typings for mysql", + "typings": "index.d.ts", "scripts": { - "build": "typings bundle -o test/bundle.d.ts", "test": "tsc -p test", + "bundle": "api-extractor --debug run", "lint": "tslint -c tslint.json \"lib/**/*.d.ts\" index.d.ts", - "typedoc": "typedoc --includeDeclarations --excludeExternals --name mysql --mode file --readme none --out typedoc lib index.d.ts typings/index.d.ts" + "typedoc": "typedoc --includeDeclarations --excludeExternals --name mysql --mode file --readme none --out typedoc lib index.d.ts typings/index.d.ts", + "prepublishOnly": "npm run test && npm run lint" }, "author": "Felix Becker ", "license": "ISC", "devDependencies": { - "mysql": "~2.17.1", - "tslint": "^5.2.0", - "typedoc": "^0.7.0", - "typescript": "^2.0.3", - "typings": "^2.1.1" + "@microsoft/api-extractor": "^7.9.19", + "@types/node": "^14.11.1", + "mysql": "~2.18.1", + "tslint": "^6.1.3", + "typedoc": "^0.19.2", + "typescript": "^4.0.3" } } diff --git a/test/test.ts b/test/test.ts index 10faf52..7c94899 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; -import * as mysql from 'mysql'; +import * as mysql from '../index'; import * as stream from 'stream'; // Connections diff --git a/test/tsconfig.json b/test/tsconfig.json index eb2723f..14c0720 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,17 +1,11 @@ { "compilerOptions": { "target": "es2015", - "noImplicitAny": true, + "noImplicitAny": false, "strictNullChecks": true, "module": "commonjs", - "typeRoots": [ - "../typings/globals", - "../typings/modules" - ] }, "files": [ - "test.ts", - "bundle.d.ts", - "../typings/index.d.ts" + "test.ts" ] } diff --git a/tsconfig.json b/tsconfig.json index 21d9ca5..5fc9dbc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,10 +3,6 @@ "noImplicitAny": true, "strictNullChecks": true, "target": "es2015", - "module": "commonjs", - "typeRoots": [ - "typings/globals", - "typings/modules" - ] + "module": "commonjs" } } diff --git a/tslint.json b/tslint.json index f5f9a35..e4a1dcb 100644 --- a/tslint.json +++ b/tslint.json @@ -36,8 +36,6 @@ "one-variable-per-declaration": [true, "ignore-for-loop"], "curly": true, "no-empty": false, - "no-duplicate-key": true, - "no-unreachable": true, "no-unused-expression": true, "no-unused-variable": [false], "eofline": true, diff --git a/typings.json b/typings.json deleted file mode 100644 index 2f92dfe..0000000 --- a/typings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "mysql", - "version": "2.11.1", - "homepage": "https://github.com/types/mysql", - "main": "index.d.ts", - "globalDependencies": { - "node": "registry:env/node#6.0.0+20170213133316" - } -}