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

@octokit/graphql

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/graphql - npm Package Compare versions

Comparing version 4.6.0 to 4.6.1

14

dist-node/index.js

@@ -8,3 +8,3 @@ 'use strict';

const VERSION = "4.6.0";
const VERSION = "4.6.1";

@@ -32,6 +32,14 @@ class GraphqlError extends Error {

const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
function graphql(request, query, options) {
if (typeof query === "string" && options && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
if (options) {
if (typeof query === "string" && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
}
for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
}
}

@@ -38,0 +46,0 @@

@@ -11,6 +11,14 @@ import { GraphqlError } from "./error";

];
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
export function graphql(request, query, options) {
if (typeof query === "string" && options && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
if (options) {
if (typeof query === "string" && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
}
for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
continue;
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
}
}

@@ -17,0 +25,0 @@ const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;

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

export const VERSION = "4.6.0";
export const VERSION = "4.6.1";

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

export declare const VERSION = "4.6.0";
export declare const VERSION = "4.6.1";
import { request } from '@octokit/request';
import { getUserAgent } from 'universal-user-agent';
const VERSION = "4.6.0";
const VERSION = "4.6.1";

@@ -31,6 +31,14 @@ class GraphqlError extends Error {

];
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
function graphql(request, query, options) {
if (typeof query === "string" && options && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
if (options) {
if (typeof query === "string" && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
}
for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
continue;
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
}
}

@@ -37,0 +45,0 @@ const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;

{
"name": "@octokit/graphql",
"description": "GitHub GraphQL API client for browsers and Node",
"version": "4.6.0",
"version": "4.6.1",
"license": "MIT",

@@ -18,10 +18,3 @@ "files": [

],
"homepage": "https://github.com/octokit/graphql.js#readme",
"bugs": {
"url": "https://github.com/octokit/graphql.js/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/octokit/graphql.js.git"
},
"repository": "github:octokit/graphql.js",
"dependencies": {

@@ -28,0 +21,0 @@ "@octokit/request": "^5.3.0",

@@ -38,3 +38,3 @@ # graphql.js

<script type="module">
import { endpoint } from "https://cdn.skypack.dev/@octokit/graphql";
import { graphql } from "https://cdn.skypack.dev/@octokit/graphql";
</script>

@@ -41,0 +41,0 @@ ```

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