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

@podium/client

Package Overview
Dependencies
Maintainers
6
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@podium/client - npm Package Compare versions

Comparing version 4.4.2 to 5.0.0-next.1

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# [5.0.0-next.1](https://github.com/podium-lib/client/compare/v4.4.2...v5.0.0-next.1) (2020-07-12)
### Features
* Make HttpIncoming required first argument to .fetch() and .stream() ([9b80ee7](https://github.com/podium-lib/client/commit/9b80ee715397e780d2df267483b6bc2db32b1c62))
### BREAKING CHANGES
* `HttpIncoming` must now be passed as the first argument to .fetch() and .stream()
# Changelog

@@ -2,0 +14,0 @@

3

lib/http-outgoing.js

@@ -7,3 +7,2 @@ /* eslint-disable no-underscore-dangle */

const assert = require('assert');
const utils = require('./utils');

@@ -52,3 +51,3 @@ const _killRecursions = Symbol('podium:httpoutgoing:killrecursions');

// A HttpIncoming object
this[_incoming] = utils.validateIncoming(incoming);
this[_incoming] = incoming;

@@ -55,0 +54,0 @@ // Kill switch for breaking the recursive promise chain

@@ -15,2 +15,3 @@ /* eslint-disable no-underscore-dangle */

const Resolver = require('./resolver');
const utils = require('./utils');

@@ -64,2 +65,3 @@ const _resolver = Symbol('podium:client:resource:resolver');

async fetch(incoming = {}, reqOptions = {}) {
if (!utils.validateIncoming(incoming)) throw new TypeError('you must pass an instance of "HttpIncoming" as the first argument to the .fetch() method');
const outgoing = new HttpOutgoing(this[_options], reqOptions, incoming);

@@ -97,2 +99,3 @@

stream(incoming = {}, reqOptions = {}) {
if (!utils.validateIncoming(incoming)) throw new TypeError('you must pass an instance of "HttpIncoming" as the first argument to the .stream() method');
const outgoing = new HttpOutgoing(this[_options], reqOptions, incoming);

@@ -99,0 +102,0 @@ this[_state].setInitializingState();

'use strict';
const { HttpIncoming } = require('@podium/utils');
/**

@@ -46,3 +44,3 @@ * Checks if a header Oject has a header.

* @returns {HttpIncoming}
*/

@@ -58,18 +56,7 @@ function incomingDeprecated() {

}
*/
module.exports.validateIncoming = (incoming = {}) => {
if (
Object.prototype.toString.call(incoming) ===
'[object PodiumHttpIncoming]'
) {
return incoming;
}
incomingDeprecated();
const inc = new HttpIncoming({
headers: {},
});
inc.context = incoming;
return inc;
return (Object.prototype.toString.call(incoming) === '[object PodiumHttpIncoming]');
};
{
"name": "@podium/client",
"version": "4.4.2",
"version": "5.0.0-next.1",
"main": "lib/client.js",

@@ -22,4 +22,8 @@ "license": "MIT",

"files": [
"lib",
"index.d.ts"
"package.json",
"CHANGELOG.md",
"index.d.ts",
"README.md",
"LICENSE",
"lib"
],

@@ -38,3 +42,3 @@ "types": "index.d.ts",

"@podium/schemas": "4.0.2",
"@podium/utils": "4.2.5",
"@podium/utils": "4.3.0",
"abslog": "2.4.0",

@@ -48,10 +52,17 @@ "http-cache-semantics": "^4.0.3",

"devDependencies": {
"@semantic-release/changelog": "5.0.1",
"@semantic-release/commit-analyzer": "8.0.1",
"@semantic-release/git": "9.0.0",
"@semantic-release/github": "7.0.7",
"@semantic-release/npm": "7.0.5",
"@semantic-release/release-notes-generator": "9.0.1",
"semantic-release": "17.1.1",
"@podium/test-utils": "2.2.0",
"@sinonjs/fake-timers": "6.0.1",
"benchmark": "2.1.4",
"eslint": "7.1.0",
"eslint-config-airbnb-base": "14.1.0",
"eslint": "7.3.1",
"eslint-config-airbnb-base": "14.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-prettier": "3.1.4",
"express": "4.17.1",

@@ -62,4 +73,4 @@ "get-stream": "5.1.0",

"prettier": "2.0.5",
"tap": "^14.10.6"
"tap": "14.10.7"
}
}

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

# @podium/client
# @podium/client v5

@@ -3,0 +3,0 @@ Client for fetching podium component fragments over HTTP.

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