-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins #40
Conversation
Unfortunately the patch includes a large amount of stuff I didn't touch.
wip wip, compiles wip processing sample site wip
There was a drama around hooking up cosmicconfig that lead to using tsc instead of ts-node. See https://github.com/Codex-/cosmiconfig-typescript-loader/issues/70
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to consider squashing.
I won't claim to have been thorough... but I've reviewed it. Great work.
Reviewed 40 of 40 files at r1, all commit messages.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @hatton)
docu-notion.config.ts
line 29 at r1 (raw file):
}, ], };
Are these dummy
things just examples? Should there be some comments?
yarn-error.log
line 0 at r1 (raw file):
I don't think you want to commit this file.
src/NotionPage.ts
line 46 at r1 (raw file):
// // "tile" and "parent": "type": "database_id". But do we need to differentiate // //this.type = PageType.Unknown; // }
Might as well remove these comments.
src/pull.ts
line 292 at r1 (raw file):
if (overallResult?.results?.some(b => !isFullBlock(b))) { error( `The Notion API returned some blocks were not full blocks. docu-notion does not handle this yet. Please report it.`
Should be, "The Notion API returned some blocks that were not full blocks."
Code quote:
The Notion API returned some blocks were not full blocks.
src/TestRun.ts
line 1 at r1 (raw file):
import { Client } from "@notionhq/client";
I think I would move this file to /test
or /src/test
or /src/test-utils
or similar.
src/plugins/interalLinks.spec.ts
line 1 at r1 (raw file):
import { setLogLevel } from "../log";
file name has a typo (internal vs interal)
src/plugins/pluginTypes.ts
line 82 at r1 (raw file):
pages: NotionPage[]; counts: ICounts; };
I'm not sure if all these types are related to plugins or not.
I think maybe some are better in index.ts?
Or is the idea just that nothing needs them except plugins?
src/plugins/NumberedListTransformer.ts
line 9 at r1 (raw file):
// This is mostly what notion-to-markdown would normally do with a block of type // numbered_list_item. A patch is documented at the end. export function numberedListTransformer(
I don't think it really matters, but we could, I think, stop exporting these internal functions everywhere (and only export the "standard" wrappers).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't quite bring myself to lose the history, since so many things are included (beyond just plugins, alas). The history there will prove helpful if there are mistakes
Reviewable status: 15 of 42 files reviewed, 8 unresolved discussions (waiting on @andrew-polk)
docu-notion.config.ts
line 29 at r1 (raw file):
Previously, andrew-polk wrote…
Are these
dummy
things just examples? Should there be some comments?
Done.
src/NotionPage.ts
line 46 at r1 (raw file):
Previously, andrew-polk wrote…
Might as well remove these comments.
Done.
src/pull.ts
line 292 at r1 (raw file):
Previously, andrew-polk wrote…
Should be, "The Notion API returned some blocks that were not full blocks."
Done.
src/plugins/pluginTypes.ts
line 82 at r1 (raw file):
Previously, andrew-polk wrote…
I'm not sure if all these types are related to plugins or not.
I think maybe some are better in index.ts?Or is the idea just that nothing needs them except plugins?
OK, I moved a couple out, including to a new file named types.ts
.
yarn-error.log
line at r1 (raw file):
Previously, andrew-polk wrote…
I don't think you want to commit this file.
Done.
src/TestRun.ts
line 1 at r1 (raw file):
Previously, andrew-polk wrote…
I think I would move this file to
/test
or/src/test
or/src/test-utils
or similar.
Moved to plugins/pluginTestRun.ts
src/plugins/interalLinks.spec.ts
line 1 at r1 (raw file):
Previously, andrew-polk wrote…
file name has a typo (internal vs interal)
Done.
src/plugins/NumberedListTransformer.ts
line 9 at r1 (raw file):
Previously, andrew-polk wrote…
I don't think it really matters, but we could, I think, stop exporting these internal functions everywhere (and only export the "standard" wrappers).
I think it does matter, for clarity. Thanks for pointing it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 27 of 27 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @hatton)
🎉 This PR is included in version 0.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
See plugins/readme.md
Also fixes #2, #36, #39
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)