🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

wikibase-edit

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikibase-edit - npm Package Compare versions

Comparing version

to
7.2.4

2

assets/metadata.js
// Generated by scripts/postversion
export const name = "wikibase-edit"
export const version = "7.2.3"
export const version = "7.2.4"
export const homepage = "https://github.com/maxlath/wikibase-edit"
export const issues = "https://github.com/maxlath/wikibase-edit/issues"

@@ -0,4 +1,26 @@

import fetch from 'cross-fetch'
import { debug, debugMode } from '../debug.js'
let isNode
try {
isNode = process.versions.node != null
} catch (err) {
isNode = false
}
let agent
if (isNode) {
// Using a custom agent to set keepAlive=true
// https://nodejs.org/api/http.html#http_class_http_agent
// https://github.com/bitinn/node-fetch#custom-agent
const http = await import('node:http')
const https = await import('node:https')
const httpAgent = new http.Agent({ keepAlive: true })
const httpsAgent = new https.Agent({ keepAlive: true })
agent = ({ protocol }) => protocol === 'http:' ? httpAgent : httpsAgent
}
export async function customFetch (url, { timeout, ...options } = {}) {
options.agent = options.agent || agent
if (debugMode) {

@@ -5,0 +27,0 @@ const { method = 'get', headers, body } = options

{
"name": "wikibase-edit",
"version": "7.2.3",
"version": "7.2.4",
"description": "Edit Wikibase from NodeJS",

@@ -42,2 +42,3 @@ "type": "module",

"dependencies": {
"cross-fetch": "^4.1.0",
"crypto-js": "^4.1.1",

@@ -44,0 +45,0 @@ "lodash.isequal": "^4.5.0",