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

@prismicio/client

Package Overview
Dependencies
Maintainers
19
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismicio/client - npm Package Compare versions

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

2

package.json
{
"name": "@prismicio/client",
"version": "6.0.0-beta.1",
"version": "6.0.0-beta.2",
"description": "The official JavaScript + TypeScript client library for Prismic",

@@ -5,0 +5,0 @@ "keywords": [

@@ -952,3 +952,12 @@ import * as prismicT from "@prismicio/types";

async getRepository(): Promise<prismicT.Repository> {
return await this.fetch<prismicT.Repository>(this.endpoint);
// TODO: Restore when Authorization header support works in browsers with CORS.
// return await this.fetch<prismicT.Repository>(this.endpoint);
const url = new URL(this.endpoint);
if (this.accessToken) {
url.searchParams.set("access_token", this.accessToken);
}
return await this.fetch<prismicT.Repository>(url.toString());
}

@@ -1086,3 +1095,3 @@

routes: params.routes || this.routes,
accessToken: undefined,
accessToken: params.accessToken || this.accessToken,
});

@@ -1337,10 +1346,12 @@ }

url: string,
params?: Partial<BuildQueryURLArgs>,
// TODO: Change to `params` when Authorization header support works in browsers with CORS.
_params?: Partial<BuildQueryURLArgs>,
): Promise<T> {
const accessToken = (params && params.accessToken) || this.accessToken;
const options = accessToken
? { headers: { Authorization: `Token ${accessToken}` } }
: {};
// TODO: Restore when Authorization header support works in browsers with CORS.
// const accessToken = (params && params.accessToken) || this.accessToken;
// const options = accessToken
// ? { headers: { Authorization: `Token ${accessToken}` } }
// : {};
const res = await this.fetchFn(url, options);
const res = await this.fetchFn(url);

@@ -1347,0 +1358,0 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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