Socket
Socket
Sign inDemoInstall

postman-collection

Package Overview
Dependencies
Maintainers
6
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-collection - npm Package Compare versions

Comparing version 3.4.2-beta.1 to 3.4.2-beta.2

6

CHANGELOG.md
# Postman Collection SDK Changelog
#### v3.4.2 (unreleased)
* #769 Avoid substitution of disabled variables
* #770 Added an option to exclude disabled listeners in `EventList~listeners` and `EventList~listenersOwn`
* #773 Added an option to exclude headers with falsy keys in `Request~getHeaders`
* Updated dependencies
#### v3.4.1 (January 2, 2019)

@@ -4,0 +10,0 @@ * #763 Fixed a bug where poly chained variables are not resolved correctly

2

lib/collection/header.js

@@ -100,2 +100,3 @@ var util = require('../util'),

* @param {Object} options
* @todo check for allowed characters in header key-value or store encoded.
*/

@@ -106,2 +107,3 @@ update: function (options) {

* @type {String}
* @todo avoid headers with falsy key.
*/

@@ -108,0 +110,0 @@ this.key = _.get(options, 'key') || E;

@@ -8,2 +8,3 @@ var _ = require('../util').lodash,

DEFAULT_INDEXMULTI_ATTR = false,
DEFAULT_INDEXSANITIZE_ATTR = false,

@@ -61,2 +62,6 @@ PropertyList;

// if the type doesn't allow falsy key, set the flag
_.getOwn(type, '_postman_propertySanitizeKeys') && (this._postman_listSanitizeKeys =
type._postman_propertySanitizeKeys);
// prepopulate

@@ -99,2 +104,10 @@ populate && this.populate(populate);

/**
* Holds the attribute whether indexing of falsy index is allowed or not
*
* @private
* @type {String}
*/
_postman_listSanitizeKeys: DEFAULT_INDEXSANITIZE_ATTR,
/**
* Insert an element at the end of this list. When a reference member specified via second parameter is found, the

@@ -551,3 +564,3 @@ * member is inserted at an index before the reference member.

key = this._postman_listIndexKey,
sanitiseKeys = this._postman_sanitizeKeys || sanitizeKeys,
sanitiseKeys = this._postman_listSanitizeKeys || sanitizeKeys,
sensitive = !this._postman_listIndexCaseInsensitive || caseSensitive,

@@ -554,0 +567,0 @@ multivalue = this._postman_listAllowsMultipleValues || multiValue;

11

lib/collection/request.js

@@ -159,10 +159,15 @@ var _ = require('../util').lodash,

* @param {Boolean} options.multiValue When set to "true", duplicate header values will be stored in an array
* @param {Boolean} options.sanitizeKeys When set to "true", headers with falsy keys are removed
* @returns {Object}
* @note If multiple headers are present in the same collection with same name, but different case
* (E.g "x-forward-port" and "X-Forward-Port", and `options.ignoreCase` is set to true, the result will contain
* the value of the header which occurs the last.
* (E.g "x-forward-port" and "X-Forward-Port", and `options.ignoreCase` is set to true,
* the values will be stored in an array.
*/
getHeaders: function getHeaders (options) {
!options && (options = {});
return this.headers.toObject(options.enabled, !options.ignoreCase, options.multiValue);
// @note: options.multiValue will not be respected since, Header._postman_propertyAllowsMultipleValues
// gets higher precedence in PropertyLists~toObject.
// @todo: sanitizeKeys for headers by default.
return this.headers.toObject(options.enabled, !options.ignoreCase, options.multiValue, options.sanitizeKeys);
},

@@ -169,0 +174,0 @@

@@ -5,3 +5,3 @@ {

"author": "Postman Labs <help@getpostman.com>",
"version": "3.4.2-beta.1",
"version": "3.4.2-beta.2",
"keywords": [

@@ -8,0 +8,0 @@ "postman"

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