Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@definitelytyped/dts-critic

Package Overview
Dependencies
Maintainers
7
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@definitelytyped/dts-critic - npm Package Compare versions

Comparing version 0.0.171 to 0.0.172-next.0

5

develop.ts

@@ -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) {

6

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc