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

@segment/actions-core

Package Overview
Dependencies
Maintainers
130
Versions
915
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/actions-core - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3-next.0

17

dist/cjs/request-client.js

@@ -29,2 +29,3 @@ "use strict";

const fetch_1 = __importStar(require("./fetch"));
const omit_1 = require("./omit");
const real_type_of_1 = require("./real-type-of");

@@ -157,4 +158,12 @@ // We need the loose definition of "object" to iterate over things like `[object Headers]`

this.options.signal = this.abortController.signal;
this.cleanedOptions = omit_1.omit(this.options, [
'json',
'password',
'searchParams',
'throwHttpErrors',
'timeout',
'username'
]);
// Construct a request object to send to the Fetch API
this.request = new fetch_1.Request(url, this.options);
this.request = new fetch_1.Request(url, this.cleanedOptions);
// Parse search params and merge them with the request URL

@@ -167,9 +176,9 @@ if (this.options.searchParams) {

// Update the request object with the new url including the search params
this.request = new fetch_1.Request(new fetch_1.Request(url.toString(), this.request), this.options);
this.request = new fetch_1.Request(new fetch_1.Request(url.toString(), this.request), this.cleanedOptions);
}
// Automatically handle json header + stringification as a convenience when using `json` option
if (this.options.json !== undefined) {
this.options.body = JSON.stringify(this.options.json);
this.cleanedOptions.body = JSON.stringify(this.options.json);
this.request.headers.set('content-type', 'application/json');
this.request = new fetch_1.Request(this.request, { body: this.options.body });
this.request = new fetch_1.Request(this.request, { body: this.cleanedOptions.body });
}

@@ -176,0 +185,0 @@ }

import AbortController from 'abort-controller';
import { CustomError } from 'ts-custom-error';
import fetch, { Headers, Request, Response } from './fetch';
import { omit } from './omit';
import { isObject } from './real-type-of';

@@ -129,4 +130,12 @@ // We need the loose definition of "object" to iterate over things like `[object Headers]`

this.options.signal = this.abortController.signal;
this.cleanedOptions = omit(this.options, [
'json',
'password',
'searchParams',
'throwHttpErrors',
'timeout',
'username'
]);
// Construct a request object to send to the Fetch API
this.request = new Request(url, this.options);
this.request = new Request(url, this.cleanedOptions);
// Parse search params and merge them with the request URL

@@ -139,9 +148,9 @@ if (this.options.searchParams) {

// Update the request object with the new url including the search params
this.request = new Request(new Request(url.toString(), this.request), this.options);
this.request = new Request(new Request(url.toString(), this.request), this.cleanedOptions);
}
// Automatically handle json header + stringification as a convenience when using `json` option
if (this.options.json !== undefined) {
this.options.body = JSON.stringify(this.options.json);
this.cleanedOptions.body = JSON.stringify(this.options.json);
this.request.headers.set('content-type', 'application/json');
this.request = new Request(this.request, { body: this.options.body });
this.request = new Request(this.request, { body: this.cleanedOptions.body });
}

@@ -148,0 +157,0 @@ }

{
"name": "@segment/actions-core",
"description": "Core runtime for Destinations Actions.",
"version": "2.0.2",
"version": "2.0.3-next.0",
"repository": {

@@ -70,3 +70,3 @@ "type": "git",

},
"gitHead": "14341f8e1c2d3752747002d173b6501fab41bef3"
"gitHead": "f863de6990a42d2da8f573d737bd6c1c97d508b0"
}

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