Socket
Socket
Sign inDemoInstall

got-ssrf

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

got-ssrf - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

2

index.js

@@ -1,2 +0,2 @@

import { lookup as nativeCallbackLookup } from './dns.js' // HACK WARNING
import { lookup as nativeCallbackLookup } from 'dns'
import { promisify } from 'util'

@@ -3,0 +3,0 @@ import got from 'got'

@@ -1,5 +0,12 @@

import { expect, describe, it } from '@jest/globals'
import { expect, describe, it, jest } from '@jest/globals'
import nock from 'nock'
import { gotSsrf } from './index.js'
// We can directly mock the "import { lookup } from 'dns'" call in index.js with jest.
const mockDnsModule = await import('./__mocks__/dns.js')
jest.unstable_mockModule('dns', () => mockDnsModule)
// However, it does mean that we need to do a dynamic import to make sure we load the mocked import.
// See: https://jestjs.io/docs/ecmascript-modules#module-mocking-in-esm
const { gotSsrf } = await import('./index.js')
nock.disableNetConnect()

@@ -6,0 +13,0 @@

{
"name": "got-ssrf",
"version": "1.3.1",
"version": "1.3.2",
"description": "Protect Got requests from SSRF",

@@ -26,8 +26,7 @@ "type": "module",

"devDependencies": {
"@janejeon/eslint-config": "^2.2.0",
"@janejeon/eslint-config": "3.0.0-3",
"@janejeon/prettier-config": "^1.1.0",
"enhanced-resolve": "^5.8.3",
"husky": "^8.0.1",
"jest": "^27.2.1",
"jest-junit": "^14.0.0",
"jest": "^29.5.0",
"jest-junit": "^16.0.0",
"lint-staged": "13.0.3",

@@ -34,0 +33,0 @@ "nock": "^13.1.3",

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