Comparing version 0.9.5 to 0.9.6
{ | ||
"name": "notabase", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"description": "API Wrapper For Notion's Database", | ||
@@ -21,3 +21,2 @@ "main": "dist/index.js", | ||
], | ||
"type": "module", | ||
"bugs": { | ||
@@ -28,3 +27,2 @@ "url": "https://github.com/mayneyao/notabase/issues" | ||
"dependencies": { | ||
"@types/node": "^13.7.6", | ||
"axios": "^0.19.0", | ||
@@ -36,2 +34,3 @@ "dayjs": "^1.8.15", | ||
"devDependencies": { | ||
"@types/node": "^14.11.8", | ||
"jest": "^24.9.0", | ||
@@ -38,0 +37,0 @@ "typescript": "^3.8.2" |
@@ -472,3 +472,3 @@ import * as utils from './utils'; | ||
this.client.submitTransaction(postData) | ||
return true | ||
return | ||
} | ||
@@ -475,0 +475,0 @@ } |
import { Collection } from './collection'; | ||
import { v4 as uuid } from 'uuid'; | ||
import * as utils from './utils'; | ||
import nodeFetch from 'node-fetch'; | ||
@@ -71,3 +72,2 @@ import { BlockValue } from './interface'; | ||
let tkHeader = token ? { 'cookie': `token_v2=${token}` } : {} | ||
const fetch = require("node-fetch") | ||
@@ -78,3 +78,3 @@ // non-token browse ext env | ||
async post(path, data) { | ||
let r = await fetch(`${NOTION_BASE_URL}${path}`, | ||
let r = await nodeFetch(`${NOTION_BASE_URL}${path}`, | ||
{ | ||
@@ -84,3 +84,3 @@ method: 'POST', | ||
'accept-encoding': 'gzip, deflate', | ||
'content-length': JSON.stringify(data).length, | ||
'content-length': JSON.stringify(data).length + '', | ||
'content-type': 'application/json;charset=UTF-8', | ||
@@ -87,0 +87,0 @@ 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36', |
4
2
49511
3
15
1137
No
- Removed@types/node@^13.7.6
- Removed@types/node@13.13.52(transitive)