Socket
Socket
Sign inDemoInstall

@octokit-next/endpoint

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit-next/endpoint - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

25

index.test-d.ts

@@ -102,3 +102,3 @@ import { expectType, expectNotType } from "tsd";

export function apiWithDefaults() {
const myEndpoint = endpoint.withDefaults({
const myEndpoint = endpoint.defaults({
baseUrl: "https://github-enterprise.acme-inc.com/api/v3",

@@ -118,3 +118,3 @@ headers: {

const myEndpointWithToken2 = myEndpoint.withDefaults({
const myEndpointWithToken2 = myEndpoint.defaults({
headers: {

@@ -135,3 +135,3 @@ authorization: `token 0000000000000000000000000000000000000002`,

expectType<"https://api.github.com">(endpoint.DEFAULTS.baseUrl);
const myEndpoint = endpoint.withDefaults({
const myEndpoint = endpoint.defaults({
baseUrl: "https://github-enterprise.acme-inc.com/api/v3",

@@ -148,4 +148,21 @@ });

export function apiDeepDefaults() {
expectType<"application/vnd.github.v3+json">(
endpoint.DEFAULTS.headers.accept
);
const myEndpoint = endpoint.defaults({
headers: {
foo: "bar",
},
});
// TODO: defaults should deeply merge
// expectType<"application/vnd.github.v3+json">(
// myEndpoint.DEFAULTS.headers.accept
// );
expectType<string>(myEndpoint.DEFAULTS.headers.foo);
}
export function apiMerge() {
const myProjectEndpoint = endpoint.withDefaults({
const myProjectEndpoint = endpoint.defaults({
baseUrl: "https://github-enterprise.acme-inc.com/api/v3",

@@ -152,0 +169,0 @@ headers: {

2

lib/version.js

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

export const VERSION = "2.2.0";
export const VERSION = "2.3.0";
{
"name": "@octokit-next/endpoint",
"version": "2.2.0",
"version": "2.3.0",
"publishConfig": {

@@ -30,3 +30,3 @@ "access": "public"

"dependencies": {
"@octokit-next/types": "2.2.0",
"@octokit-next/types": "2.3.0",
"is-plain-obj": "^4.0.0",

@@ -33,0 +33,0 @@ "type-fest": "^3.0.0",

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