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

@slack/webhook

Package Overview
Dependencies
Maintainers
13
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/webhook - npm Package Compare versions

Comparing version 7.0.3 to 7.0.4

2

dist/errors.d.ts
/// <reference types="node" />
import { AxiosError, AxiosResponse } from 'axios';
import type { AxiosError, AxiosResponse } from 'axios';
/**

@@ -4,0 +4,0 @@ * All errors produced by this package adhere to this interface

/// <reference types="node" />
import { Agent } from 'http';
import { Block, KnownBlock, MessageAttachment } from '@slack/types';
import type { Agent } from 'node:http';
import type { Block, KnownBlock, MessageAttachment } from '@slack/types';
/**

@@ -5,0 +5,0 @@ * A client for Slack's Incoming Webhooks

@@ -30,7 +30,6 @@ "use strict";

headers: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'User-Agent': (0, instrument_1.getUserAgent)(),
},
});
delete this.defaults.agent;
this.defaults.agent = undefined;
}

@@ -53,3 +52,3 @@ /**

return this.buildResult(response);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// biome-ignore lint/suspicious/noExplicitAny: errors can be anything
}

@@ -61,8 +60,6 @@ catch (error) {

}
else if (error.request !== undefined) {
if (error.request !== undefined) {
throw (0, errors_1.requestErrorWithOriginal)(error);
}
else {
throw error;
}
throw error;
}

@@ -73,3 +70,2 @@ }

*/
// eslint-disable-next-line class-methods-use-this
buildResult(response) {

@@ -76,0 +72,0 @@ return {

@@ -27,4 +27,4 @@ "use strict";

exports.getUserAgent = exports.addAppMetadata = void 0;
const os = __importStar(require("os"));
const packageJson = require('../package.json'); // eslint-disable-line import/no-commonjs, @typescript-eslint/no-var-requires
const os = __importStar(require("node:os"));
const packageJson = require('../package.json');
/**

@@ -53,7 +53,9 @@ * Replaces occurrences of '/' with ':' in a string, since '/' is meaningful inside User-Agent strings as a separator.

function getUserAgent() {
const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' ');
const appIdentifier = Object.entries(appMetadata)
.map(([name, version]) => `${name}/${version}`)
.join(' ');
// only prepend the appIdentifier when its not empty
return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent;
return (appIdentifier.length > 0 ? `${appIdentifier} ` : '') + baseUserAgent;
}
exports.getUserAgent = getUserAgent;
//# sourceMappingURL=instrument.js.map
{
"name": "@slack/webhook",
"version": "7.0.3",
"version": "7.0.4",
"description": "Official library for using the Slack Platform's Incoming Webhooks",
"author": "Slack Technologies, LLC",
"license": "MIT",
"keywords": [
"slack",
"request",
"client",
"http",
"api",
"proxy"
],
"keywords": ["slack", "request", "client", "http", "api", "proxy"],
"main": "dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/**/*"
],
"files": ["dist/**/*"],
"engines": {

@@ -36,7 +27,7 @@ "node": ">= 18",

"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "eslint --fix --ext .ts src",
"mocha": "mocha --config .mocharc.json src/*.spec.js",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"mocha": "mocha --config .mocharc.json src/*.spec.ts",
"test": "npm run lint && npm run test:unit",
"test:unit": "npm run build && c8 npm run mocha",
"ref-docs:model": "api-extractor run"
"test:unit": "npm run build && c8 npm run mocha"
},

@@ -46,23 +37,13 @@ "dependencies": {

"@types/node": ">=18.0.0",
"axios": "^1.7.4"
"axios": "^1.7.8"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.38.0",
"@biomejs/biome": "^1.8.3",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.0",
"c8": "^9.1.0",
"chai": "^4.3.8",
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-import-newlines": "^1.3.4",
"eslint-plugin-jsdoc": "^46.5.0",
"eslint-plugin-node": "^11.1.0",
"mocha": "^10.2.0",
"nock": "^13.3.3",
"shx": "^0.3.2",
"sinon": "^17.0.0",
"source-map-support": "^0.5.21",

@@ -69,0 +50,0 @@ "ts-node": "^8.2.0",

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

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