Skip to content
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

Merged
merged 19 commits into from
Jan 25, 2023
Merged

Plugins #40

merged 19 commits into from
Jan 25, 2023

Conversation

hatton
Copy link
Member

@hatton hatton commented Jan 23, 2023

See plugins/readme.md

Also fixes #2, #36, #39


This change is Reviewable

Copy link
Contributor

@andrew-polk andrew-polk left a 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).

Copy link
Member Author

@hatton hatton left a 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.

Copy link
Contributor

@andrew-polk andrew-polk left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @hatton)

@hatton hatton merged commit 7f95fe7 into main Jan 25, 2023
@hatton hatton deleted the plugins branch January 25, 2023 20:15
@github-actions
Copy link

🎉 This PR is included in version 0.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support links to other documents
2 participants