@definitelytyped/dts-critic
Advanced tools
Comparing version 0.0.188 to 0.0.189
# @definitelytyped/dts-critic | ||
## 0.0.189 | ||
### Patch Changes | ||
- 5b0559f6: Update and clean up dependencies | ||
- Updated dependencies [5b0559f6] | ||
- @definitelytyped/header-parser@0.0.188 | ||
## 0.0.188 | ||
@@ -4,0 +12,0 @@ |
@@ -118,3 +118,3 @@ import fs = require("fs"); | ||
packageJson, | ||
headerParser.getTypesVersions(path.join(dtTypesPath, item)) | ||
headerParser.getTypesVersions(path.join(dtTypesPath, item)), | ||
); | ||
@@ -254,3 +254,2 @@ if (!isNpmPackage(item, Array.isArray(header) ? undefined : header, isNpmJson)) { | ||
function main() { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
yargs | ||
@@ -289,3 +288,3 @@ .usage("$0 <command>") | ||
}, | ||
checkAll | ||
checkAll, | ||
) | ||
@@ -329,3 +328,3 @@ .command( | ||
}, | ||
checkPopular | ||
checkPopular, | ||
) | ||
@@ -369,3 +368,3 @@ .command( | ||
}, | ||
checkUnpopular | ||
checkUnpopular, | ||
) | ||
@@ -409,3 +408,3 @@ .command( | ||
}, | ||
checkPackage | ||
checkPackage, | ||
) | ||
@@ -434,3 +433,3 @@ .command( | ||
}, | ||
checkFile | ||
checkFile, | ||
) | ||
@@ -447,7 +446,8 @@ .command( | ||
}, | ||
getNonNpm | ||
getNonNpm, | ||
) | ||
.demandCommand(1) | ||
.help().argv; | ||
.help() | ||
.parseSync(); | ||
} | ||
main(); |
@@ -187,3 +187,2 @@ "use strict"; | ||
function main() { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
yargs | ||
@@ -348,5 +347,6 @@ .usage("$0 <command>") | ||
.demandCommand(1) | ||
.help().argv; | ||
.help() | ||
.parseSync(); | ||
} | ||
main(); | ||
//# sourceMappingURL=develop.js.map |
@@ -36,3 +36,2 @@ "use strict"; | ||
const semver = require("semver"); | ||
const rimraf = require("rimraf"); | ||
const command_exists_1 = require("command-exists"); | ||
@@ -130,3 +129,3 @@ const typescript_1 = __importDefault(require("typescript")); | ||
// Delete the source afterward to avoid running out of space | ||
rimraf.sync(packagePath); | ||
fs.rmSync(packagePath, { recursive: true, force: true }); | ||
} | ||
@@ -169,3 +168,4 @@ return errors; | ||
}) | ||
.help().argv; | ||
.help() | ||
.parseSync(); | ||
let opts; | ||
@@ -172,0 +172,0 @@ switch (argv.mode) { |
@@ -86,3 +86,3 @@ /// <reference types="jest" /> | ||
expect(checkSource("noErrors", testsource("noErrors.d.ts"), testsource("noErrors.js"), allErrors, false)).toEqual( | ||
[] | ||
[], | ||
); | ||
@@ -97,4 +97,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -107,3 +107,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -118,4 +118,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toHaveLength(0); | ||
@@ -130,4 +130,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -144,3 +144,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -155,4 +155,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -172,3 +172,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -183,4 +183,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -193,3 +193,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -204,4 +204,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -217,3 +217,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -228,4 +228,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -238,3 +238,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -249,4 +249,4 @@ }, | ||
allErrors, | ||
false | ||
) | ||
false, | ||
), | ||
).toEqual( | ||
@@ -261,3 +261,3 @@ expect.arrayContaining([ | ||
}, | ||
]) | ||
]), | ||
); | ||
@@ -264,0 +264,0 @@ }, |
28
index.ts
@@ -7,3 +7,2 @@ import yargs = require("yargs"); | ||
import semver = require("semver"); | ||
import rimraf = require("rimraf"); | ||
import { sync as commandExistsSync } from "command-exists"; | ||
@@ -68,7 +67,7 @@ import ts from "typescript"; | ||
options: CheckOptions = defaultOpts, | ||
debug = false | ||
debug = false, | ||
): CriticError[] { | ||
if (!commandExistsSync("tar")) { | ||
throw new Error( | ||
"You need to have tar installed to run dts-critic, you can get it from https://www.gnu.org/software/tar" | ||
"You need to have tar installed to run dts-critic, you can get it from https://www.gnu.org/software/tar", | ||
); | ||
@@ -78,3 +77,3 @@ } | ||
throw new Error( | ||
"You need to have npm installed to run dts-critic, you can get it from https://www.npmjs.com/get-npm" | ||
"You need to have npm installed to run dts-critic, you can get it from https://www.npmjs.com/get-npm", | ||
); | ||
@@ -125,3 +124,3 @@ } | ||
// Delete the source afterward to avoid running out of space | ||
rimraf.sync(packagePath); | ||
fs.rmSync(packagePath, { recursive: true, force: true }); | ||
} | ||
@@ -138,3 +137,3 @@ return errors; | ||
packageJson: Record<string, unknown>, | ||
dirPath: string | ||
dirPath: string, | ||
): headerParser.Header | undefined { | ||
@@ -151,3 +150,3 @@ const result = headerParser.validatePackageJson(packageName, packageJson, headerParser.getTypesVersions(dirPath)); | ||
.usage( | ||
"$0 --dts path-to-d.ts [--js path-to-source] [--mode mode] [--debug]\n\nIf source-folder is not provided, I will look for a matching package on npm." | ||
"$0 --dts path-to-d.ts [--js path-to-source] [--mode mode] [--debug]\n\nIf source-folder is not provided, I will look for a matching package on npm.", | ||
) | ||
@@ -174,3 +173,4 @@ .option("dts", { | ||
}) | ||
.help().argv; | ||
.help() | ||
.parseSync(); | ||
@@ -351,3 +351,3 @@ let opts; | ||
enabledErrors: Map<ExportErrorKind, boolean>, | ||
debug: boolean | ||
debug: boolean, | ||
): ExportError[] { | ||
@@ -458,3 +458,3 @@ const diagnostics = checkExports(name, dtsPath, srcPath); | ||
dtsDiagnostics.exportType, | ||
dtsDiagnostics.exportKind | ||
dtsDiagnostics.exportKind, | ||
); | ||
@@ -517,3 +517,3 @@ | ||
checker: ts.TypeChecker, | ||
exportKind: InferenceResult<JsExportKind> | ||
exportKind: InferenceResult<JsExportKind>, | ||
): InferenceResult<ts.Type> { | ||
@@ -634,3 +634,3 @@ if (isSuccess(exportKind)) { | ||
checker: ts.TypeChecker, | ||
name: string | ||
name: string, | ||
): InferenceResult<ts.Symbol> { | ||
@@ -669,3 +669,3 @@ if (matches(sourceFile, (node) => ts.isModuleDeclaration(node))) { | ||
symbolResult: InferenceResult<ts.Symbol>, | ||
exportKindResult: InferenceResult<DtsExportKind> | ||
exportKindResult: InferenceResult<DtsExportKind>, | ||
): InferenceResult<ts.Type> { | ||
@@ -741,3 +741,3 @@ if (isSuccess(symbolResult) && isSuccess(exportKindResult)) { | ||
dtsType: InferenceResult<ts.Type>, | ||
dtsExportKind: InferenceResult<DtsExportKind> | ||
dtsExportKind: InferenceResult<DtsExportKind>, | ||
): InferenceResult<MissingExport[]> { | ||
@@ -744,0 +744,0 @@ if (isError(sourceType)) { |
{ | ||
"name": "@definitelytyped/dts-critic", | ||
"version": "0.0.188", | ||
"version": "0.0.189", | ||
"author": "Nathan Shively-Sanders", | ||
@@ -10,8 +10,8 @@ "description": "Checks a new .d.ts against the Javascript source and tells you what problems it has", | ||
"dependencies": { | ||
"command-exists": "^1.2.8", | ||
"rimraf": "^3.0.2", | ||
"semver": "^7.5.2", | ||
"command-exists": "^1.2.9", | ||
"semver": "^7.5.4", | ||
"tmp": "^0.2.1", | ||
"yargs": "^15.3.1", | ||
"@definitelytyped/header-parser": "0.0.187" | ||
"typescript": "^5.2.2", | ||
"yargs": "^17.7.2", | ||
"@definitelytyped/header-parser": "0.0.188" | ||
}, | ||
@@ -22,8 +22,7 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@types/command-exists": "^1.2.0", | ||
"@types/rimraf": "^3.0.0", | ||
"@types/semver": "^6.0.1", | ||
"@types/strip-json-comments": "0.0.30", | ||
"@types/tmp": "^0.2.0", | ||
"strip-json-comments": "^2.0.1" | ||
"@types/command-exists": "^1.2.3", | ||
"@types/semver": "^7.5.5", | ||
"@types/strip-json-comments": "^3.0.0", | ||
"@types/tmp": "^0.2.6", | ||
"strip-json-comments": "^3.1.1" | ||
}, | ||
@@ -50,3 +49,3 @@ "main": "dist/index.js", | ||
"engines": { | ||
"node": ">=10.17.0" | ||
"node": ">=16.17.0" | ||
}, | ||
@@ -53,0 +52,0 @@ "scripts": { |
@@ -9,3 +9,3 @@ { | ||
"declaration": true, | ||
"types": ["jest"] | ||
"types": ["jest", "node"] | ||
}, | ||
@@ -12,0 +12,0 @@ "exclude": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
220787
5
+ Addedtypescript@^5.2.2
+ Added@definitelytyped/header-parser@0.0.188(transitive)
+ Added@definitelytyped/typescript-versions@0.0.181(transitive)
+ Added@definitelytyped/utils@0.0.186(transitive)
+ Added@types/node@16.18.119(transitive)
+ Addedb4a@1.6.7(transitive)
+ Addedbare-events@2.5.0(transitive)
+ Addedcliui@8.0.1(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedfast-fifo@1.3.2(transitive)
+ Addedqueue-tick@1.0.1(transitive)
+ Addedstreamx@2.20.2(transitive)
+ Addedtar-stream@3.1.7(transitive)
+ Addedtext-decoder@1.2.1(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@17.7.2(transitive)
+ Addedyargs-parser@21.1.1(transitive)
- Removedrimraf@^3.0.2
- Removed@definitelytyped/header-parser@0.0.187(transitive)
- Removed@definitelytyped/typescript-versions@0.0.180(transitive)
- Removed@definitelytyped/utils@0.0.185(transitive)
- Removed@types/node@14.18.63(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbl@4.1.0(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcliui@6.0.0(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedfs-constants@1.0.0(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedieee754@1.2.1(transitive)
- Removedinflight@1.0.6(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedtar-stream@2.2.0(transitive)
- Removeduniversalify@0.1.2(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@6.2.0(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@15.4.1(transitive)
- Removedyargs-parser@18.1.3(transitive)
Updatedcommand-exists@^1.2.9
Updatedsemver@^7.5.4
Updatedyargs@^17.7.2