NotionX / react-notion-x

Fast and accurate React renderer for Notion. TS batteries included. ⚡️
https://react-notion-x-demo.transitivebullsh.it
MIT License
4.69k stars 544 forks source link

Clean up build logs #524

Open pnodet opened 9 months ago

pnodet commented 9 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch notion-compat@6.16.0 for the project I'm working on.

We use nextjs to build a static site using your packages and it works great but on build the logs are filled with blocks info that are not relevant for me, and maybe for many apart from you on debugs. Would you consider removing this?

Thanks!

Here is the diff that solved my problem:

diff --git a/node_modules/notion-compat/build/index.js b/node_modules/notion-compat/build/index.js
index 4d51e77..c23ecbc 100644
--- a/node_modules/notion-compat/build/index.js
+++ b/node_modules/notion-compat/build/index.js
@@ -692,7 +692,6 @@ var NotionCompatAPI = class {
     let blocks = [];
     let cursor;
     do {
-      console.log("blocks.children.list", { blockId, cursor });
       const res = await this.client.blocks.children.list({
         block_id: blockId,
         start_cursor: cursor

This issue body was partially generated by patch-package.

pnodet commented 9 months ago

Sorry, all good this was fixed in #499

pnodet commented 9 months ago

This issue should be fixed in v6.16.1 but npm is still at 6.16.0