-
Notifications
You must be signed in to change notification settings - Fork 12
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
v2.0.0 #13
base: main
Are you sure you want to change the base?
v2.0.0 #13
Conversation
Constructor for blocks with single `Text` instance in content. Also refactor blocks main constructors to make it shorter.
Add `bold`: Set text to bold. Add `italic`: Set text to italic. Add `underline`: Set text to underline. Add `code`: Set text to code style. Add `color`: Set a different color for the text. Add static list method to generate textual lists with `Text` instances.
Add `src/` directory Add exports to improve usage Remove base fields class Change from public to private the token, version and dateVersion variables for clients
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
==========================================
- Coverage 96.84% 88.85% -8.00%
==========================================
Files 24 26 +2
Lines 698 951 +253
==========================================
+ Hits 676 845 +169
- Misses 22 106 +84
☔ View full report in Codecov by Sentry. |
Publish successfully version 2.0.0-beta1 🎉 |
Publish successfully version 2.0.0-beta2 🎉 |
For mandatory database properties
Throws `FormatException` if any property is null inside the json given
Updates documentation Removes unused code - empty constructor - addPropertiesFromJson Improves `withDefaults` constructor & rename it to `simple`
And mark as deprecated list databases method
and add name as a base field of properties
and adds more expectations for retrieve a database
and DateTime errors
Adds missing url field from `toJSON` Removes `this` for usage of class member when is obvious Improves database test (logic and style)
And updates sdk version
Update at 24/Feb/2022 at the 02:53 am, because why not:
I'm doing a huuuuuge update for this package and I will be using this version (2.0.0) for that update. Practically I'm going to break all (even me) and do it again. I'm going to reuse a lot of code but I HAVE TO update and fix a lot of logic bugs. I don't know when I'm going to finish but to say something let say
31/03/2022
.If someone read this please wish me luck.
See my notes here in Notion of course.
enums
to have atoString()
(and maybetoType()
) built-in instead offromXTypeToString
and that stuff.Problem: The users cannot access to the block content from pagination because use the
Block
class and it not contains a content field or something like that.Solution: See how new database properties works and do the same for blocks.
Problem: ?
Solution: I don’t even understand the problem.
Problem: The package use a different structure from the official package on JavaScript.
Solution: Follow a similar structure. At least at usage level.
Important:
Some of the changes bellow will be canceled even they where accomplished just in the name of YAGNI (You Ain't Gonna Need It), and other will be added... actually a lot of things will change and even me, who is making them, don't know how is going to end, so yeah, don't pay attention to the list bellow.
This PR will be open until the next release (tentative date
04/08/2021
). It will contain any pre-release update for this version.New feature: 🐣
Breaking change: 🍗
Database
.✅blocks
forChildren
constructor. ✅textSeparation
Children
:heading
paragraph
toDo
notion-sdk-js
src/
)Paragraph
:Paragraph.text('some text here...')
ToDo
:ToDo.text('some text here...', checked: true)
Heading
:Heading.text('some text here...', type: 2)
BulletedListItem
:BulletedListItem.text('some text here...')
NumberedListItem
:NumberedListItem.text('some text here...')
Toggle
:Toggle.text('some text here...', children: [])
🐣 Add more constructors forHeading
class:one
: Heading with type 1 by default.two
: Heading with type 2 by default.three
: Heading with type 3 by default.Text
class: ✅code
: Text with code style by default.italic
: Text with italic style by default.bold
: Text with bold style by default.underline
: Text with underline style by default.color
: Text with different color of default.list(List<Text> texts, String separator, String lastSeparator)
: ✅Notion API Package [v1.2.1]