New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dts-critic

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dts-critic - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

dt-chunk.json

1

index.js

@@ -190,2 +190,3 @@ const yargs = require("yargs");

if (dts.indexOf("export default") > -1 && !/declare module ['"]/.test(dts) &&
src.indexOf("524: A timeout occurred") === -1 && src.indexOf("500 Server Error") === -1 &&
!isRealExportDefault(name) && src.indexOf("default") === -1 && src.indexOf("__esModule") === -1 && src.indexOf("react-side-effect") === -1 && src.indexOf("@flow") === -1 && src.indexOf("module.exports = require") === -1) {

@@ -192,0 +193,0 @@ throw new Error(`The types for ${name} specify 'export default' but the source does not mention 'default' anywhere.

@@ -178,2 +178,14 @@ const { findDtsName, findNames, retrieveNpmHomepageOrFail, checkNames, checkSource } = require("./index");

},
serverError500() {
expect(checkSource(
"foo",
`function f() {}; export default f;`,
`<title>500 Server Error</title>`)).toBeUndefined();
},
serverError524() {
expect(checkSource(
"foo",
`function f() {}; export default f;`,
`<title>unpkg.com | 524: A timeout occurred</title>`)).toBeUndefined();
},
});

4

package.json
{
"name": "dts-critic",
"version": "1.0.5",
"version": "1.0.6",
"author": "Nathan Shively-Sanders",

@@ -38,5 +38,5 @@ "description": "Checks a new .d.ts against the Javascript source and tells you what problems it has",

"@types/yargs": "^12.0.8",
"jest": "^24.1.0",
"jest": "^24.7.1",
"strip-json-comments": "^2.0.1"
}
}
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