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

@bonniernews/b0rker

Package Overview
Dependencies
Maintainers
19
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bonniernews/b0rker - npm Package Compare versions

Comparing version 3.0.2 to 3.1.0

7

lib/http.js

@@ -15,4 +15,3 @@ import GoogleAuth from "google-auth-library";

const authHeaders = await gcpAuthHeaders(params.baseUrl);
const authHeaders = await gcpAuthHeaders(params.audience || params.baseUrl);
const opts = {

@@ -111,3 +110,3 @@ method,

async function gcpAuthHeaders(baseUrl) {
async function gcpAuthHeaders(audience) {
// this should ONLY be set to true if running locally

@@ -117,3 +116,3 @@ if (config.unauthenticatedHttp) {

}
const client = await auth.getIdTokenClient(baseUrl);
const client = await auth.getIdTokenClient(audience);
return await client.getRequestHeaders();

@@ -120,0 +119,0 @@ }

{
"name": "@bonniernews/b0rker",
"version": "3.0.2",
"version": "3.1.0",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=16 <=18"

@@ -23,2 +23,9 @@ import nock from "nock";

});
describe("google auth", () => {
it("should append auth header", async () => {
fakeApi.get("/some/path").matchHeader("Authorization", "Bearer some-gcp-token").reply(200, { ok: true });
const result = await http.asserted.get({ baseUrl, path: "/some/path", audience: "some-audience" });
result.should.eql({ ok: true });
});
});
describe("asserted", () => {

@@ -25,0 +32,0 @@ const correlationId = "http-test-asserted";

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