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

notion-client

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-client - npm Package Compare versions

Comparing version 2.2.3 to 2.3.0

18

build/cjs/notion-api.js

@@ -53,3 +53,3 @@ "use strict";

exports.__esModule = true;
var got_1 = __importDefault(require("got"));
var node_fetch_1 = __importDefault(require("node-fetch"));
var p_map_1 = __importDefault(require("p-map"));

@@ -337,3 +337,5 @@ var notion_utils_1 = require("notion-utils");

return __generator(this, function (_b) {
headers = {};
headers = {
'Content-Type': 'application/json'
};
if (this._authToken) {

@@ -343,10 +345,8 @@ headers.cookie = "token_v2=" + this._authToken;

url = this._apiBaseUrl + "/" + endpoint;
console.log('got', { url: url });
return [2 /*return*/, got_1["default"]
.post(url, {
// prefixUrl: this._apiBaseUrl,
json: body,
console.log('notion fetch', url);
return [2 /*return*/, node_fetch_1["default"](url, {
method: 'post',
body: JSON.stringify(body),
headers: headers
})
.json()];
}).then(function (res) { return res.json(); })];
});

@@ -353,0 +353,0 @@ });

@@ -48,3 +48,3 @@ var __assign = (this && this.__assign) || function () {

};
import got from 'got';
import fetch from 'node-fetch';
import pMap from 'p-map';

@@ -332,3 +332,5 @@ import { parsePageId, getPageContentBlockIds, uuidToId } from 'notion-utils';

return __generator(this, function (_b) {
headers = {};
headers = {
'Content-Type': 'application/json'
};
if (this._authToken) {

@@ -338,10 +340,8 @@ headers.cookie = "token_v2=" + this._authToken;

url = this._apiBaseUrl + "/" + endpoint;
console.log('got', { url: url });
return [2 /*return*/, got
.post(url, {
// prefixUrl: this._apiBaseUrl,
json: body,
console.log('notion fetch', url);
return [2 /*return*/, fetch(url, {
method: 'post',
body: JSON.stringify(body),
headers: headers
})
.json()];
}).then(function (res) { return res.json(); })];
});

@@ -348,0 +348,0 @@ });

{
"name": "notion-client",
"version": "2.2.3",
"version": "2.3.0",
"description": "Robust TypeScript client for the unofficial Notion API.",

@@ -18,3 +18,3 @@ "repository": "NotionX/notion-kit",

"dependencies": {
"got": "^11.6.0",
"node-fetch": "^2.6.1",
"notion-types": "^2.2.1",

@@ -25,5 +25,6 @@ "notion-utils": "^2.2.3",

"devDependencies": {
"@types/node-fetch": "^2.5.7",
"ava": "^3.11.1"
},
"gitHead": "5f022591c762a285e015b31444a6488b6a3a81c7"
"gitHead": "f3a245c4a01ca0f213908af27c03f7200a4833c5"
}

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

import got from 'got'
import fetch from 'node-fetch'
import pMap from 'p-map'

@@ -362,3 +362,5 @@

}): Promise<T> {
const headers: any = {}
const headers: any = {
'Content-Type': 'application/json'
}

@@ -370,11 +372,10 @@ if (this._authToken) {

const url = `${this._apiBaseUrl}/${endpoint}`
console.log('got', { url })
return got
.post(url, {
// prefixUrl: this._apiBaseUrl,
json: body,
headers
})
.json()
console.log('notion fetch', url)
return fetch(url, {
method: 'post',
body: JSON.stringify(body),
headers
}).then((res) => res.json())
}
}

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