@definitelytyped/dts-critic
Advanced tools
Comparing version 0.0.171 to 0.0.172-next.0
@@ -114,6 +114,7 @@ import fs = require("fs"); | ||
const entry = path.join(dtTypesPath, item); | ||
const dts = fs.readFileSync(entry + "/index.d.ts", "utf8"); | ||
const filePath = entry + "/index.d.ts"; | ||
const dts = fs.readFileSync(filePath, "utf8"); | ||
let header; | ||
try { | ||
header = headerParser.parseHeaderOrFail(dts); | ||
header = headerParser.parseHeaderOrFail(filePath, dts); | ||
} catch (e) { | ||
@@ -120,0 +121,0 @@ header = undefined; |
@@ -81,6 +81,7 @@ "use strict"; | ||
const entry = path.join(dtTypesPath, item); | ||
const dts = fs.readFileSync(entry + "/index.d.ts", "utf8"); | ||
const filePath = entry + "/index.d.ts"; | ||
const dts = fs.readFileSync(filePath, "utf8"); | ||
let header; | ||
try { | ||
header = headerParser.parseHeaderOrFail(dts); | ||
header = headerParser.parseHeaderOrFail(filePath, dts); | ||
} | ||
@@ -87,0 +88,0 @@ catch (e) { |
@@ -87,3 +87,3 @@ "use strict"; | ||
const dts = fs.readFileSync(dtsPath, "utf-8"); | ||
const header = parseDtHeader(dts); | ||
const header = parseDtHeader(dtsPath, dts); | ||
const name = findDtsName(dtsPath); | ||
@@ -135,5 +135,5 @@ const npmInfo = getNpmInfo(name); | ||
exports.dtsCritic = dtsCritic; | ||
function parseDtHeader(dts) { | ||
function parseDtHeader(filePath, dts) { | ||
try { | ||
return headerParser.parseHeaderOrFail(dts); | ||
return headerParser.parseHeaderOrFail(filePath, dts); | ||
} | ||
@@ -140,0 +140,0 @@ catch (e) { |
@@ -81,3 +81,3 @@ import yargs = require("yargs"); | ||
const dts = fs.readFileSync(dtsPath, "utf-8"); | ||
const header = parseDtHeader(dts); | ||
const header = parseDtHeader(dtsPath, dts); | ||
@@ -132,5 +132,5 @@ const name = findDtsName(dtsPath); | ||
function parseDtHeader(dts: string): headerParser.Header | undefined { | ||
function parseDtHeader(filePath: string, dts: string): headerParser.Header | undefined { | ||
try { | ||
return headerParser.parseHeaderOrFail(dts); | ||
return headerParser.parseHeaderOrFail(filePath, dts); | ||
} catch (e) { | ||
@@ -137,0 +137,0 @@ return undefined; |
{ | ||
"name": "@definitelytyped/dts-critic", | ||
"version": "0.0.171", | ||
"version": "0.0.172-next.0", | ||
"author": "Nathan Shively-Sanders", | ||
@@ -10,3 +10,3 @@ "description": "Checks a new .d.ts against the Javascript source and tells you what problems it has", | ||
"dependencies": { | ||
"@definitelytyped/header-parser": "^0.0.171", | ||
"@definitelytyped/header-parser": "^0.0.172-next.0", | ||
"command-exists": "^1.2.8", | ||
@@ -56,3 +56,3 @@ "rimraf": "^3.0.2", | ||
}, | ||
"gitHead": "53cbc0f4d1cd082f45ac57a9a07e5e6b35098d39" | ||
"gitHead": "94c1e3236776de26f4c5401e77d0fb253320e83b" | ||
} |
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
199021
3325
+ Added@definitelytyped/header-parser@0.0.172(transitive)
+ Added@definitelytyped/typescript-versions@0.0.172(transitive)
- Removed@definitelytyped/header-parser@0.0.171(transitive)
- Removed@definitelytyped/typescript-versions@0.0.171(transitive)