Releases: fasteiner/Notion
v0.14.0-preview0003
[v0.14.0-preview0003]
v0.13.0
[v0.13.0]
Added
-
tests/Unit/Public/Block/Bookmark/New-NotionBookmarkBlock.Tests.ps1
Introduced unit tests forNew-NotionBookmarkBlock, covering default and captioned bookmark creation. -
tests/Unit/Public/Block/Breadcrumb/New-NotionBreadcrumbBlock.Tests.ps1
Added unit tests validating default behavior of breadcrumb block creation. -
tests/Unit/Public/Block/BulletedListItem/New-NotionBulletedListItemBlock.Tests.ps1
Introduced tests to verify text content and color for bulleted list items. -
tests/Unit/Public/Block/ChildDatabase/New-NotionChildDatabaseBlock.Tests.ps1
Added validation for empty and titled child database block generation. -
tests/Unit/Public/Block/ChildDatabase/ChildPage/New-NotionChildPageBlock.Tests.ps1
Implemented tests for verifying empty and titled child page block creation. -
tests/Unit/Public/Block/Code/New-NotionCodeBlock.Tests.ps1
Introduced unit tests for code block creation with various combinations of text, caption, and language. -
tests/Unit/Public/Block/Column/New-NotionColumnBlock.Tests.ps1,
tests/Unit/Public/Block/ColumnList/New-NotionColumnListBlock.Tests.ps1
Added tests for verifying the default behavior of column and column list block generation. -
tests/Unit/Public/Block/Divider/New-NotionDividerBlock.Tests.ps1
Added validation for divider block construction. -
tests/Unit/Public/Block/Embed/New-NotionEmbedBlock.Tests.ps1
Added extensive test coverage for URL and caption handling in embed blocks. -
tests/Unit/Public/Block/Equation/New-NotionEquationBlock.Tests.ps1
Added unit tests verifying LaTeX expression parsing in equation blocks. -
tests/Unit/Public/Block/File/New-NotionFileBlock.Tests.ps1
Introduced tests for external, hosted, and file-object-based file block creation, including expiry handling. -
tests/Unit/Public/Block/Heading/New-NotionHeadingBlock.Tests.ps1
Renamed and relocated test under a structured directory. -
tests/Unit/Public/Block/Image/New-NotionImageBlock.Tests.ps1
Added support for image block testing fromnotion_fileobjects. -
tests/Unit/Public/Block/LinkPreview/New-NotionLinkPreviewBlock.Tests.ps1
Added test confirming thatlink_previewblocks cannot be manually created. -
tests/Unit/Public/Block/NumberedListItem/New-NotionNumberedListItemBlock.Tests.ps1
Added tests to verify rich text rendering in numbered list items. -
tests/Unit/Public/Block/Paragraph/New-NotionParagraphBlock.Tests.ps1
Implemented tests for default and colored paragraph content. -
tests/Unit/Public/Block/Pdf/New-NotionPdfBlock.Tests.ps1
Renamed and moved PDF block tests into structured folder. -
tests/Unit/Public/Block/Quote/New-NotionQuoteBlock.Tests.ps1
Added validation for quote blocks with content and color options. -
tests/Unit/Public/Block/Synced/New-NotionSyncedBlock.Tests.ps1
Added coverage for synced block creation. -
tests/Unit/Public/Block/Table/New-NotionTableBlock.Tests.ps1
Rewritten and expanded validation for table blocks, including headers, error handling, and hashtable inputs. -
tests/Unit/Public/Block/TableOfContents/New-NotionTableOfContentsBlock.Tests.ps1
Introduced default and color-specific table of contents creation tests. -
tests/Unit/Public/Block/TableRow/New-NotionTableRowBlock.Tests.ps1
Added tests verifying creation of table rows from flat cell content arrays. -
tests/Unit/Public/Block/ToDo/New-NotionToDoBlock.Tests.ps1
Extensive tests covering plain, checked, and color-variant to-do block creation. -
tests/Unit/Public/Block/Toggle/New-NotionToggleBlock.Tests.ps1
Implemented tests for toggle blocks including rich text and color validation. -
tests/Unit/Public/Block/Video/New-NotionVideoBlock.Tests.ps1
Renamed and organized video block tests into structured location. -
tests/Unit/Public/Block/New-NotionBlock.Tests.ps1
Added meta tests covering dynamic creation of multiple block types usingNew-NotionBlock. -
tests/Unit/Public/Block/_RichText/New-NotionRichText.Tests.ps1
Comprehensive unit tests for rich text construction across multiple parameter sets. -
tests/Unit/Public/Block/_RichText/New-NotionRichTextAnnotation.Tests.ps1
Added focused testing for annotation creation via object and flag-based inputs.
Changed
-
source/Classes/Block/RichText/01_Rich_Text.ps1
Minor formatting improvement to spacing inswitchblock for content type routing. -
source/Classes/Block/RichText/02_Rich_Text_Annotation.ps1
Improved readability, added verbose logging, and corrected default handling inConvertFromObject. -
source/Classes/Block/RichText/Type/01_Rich_text_text.ps1
Introduced verbose output and ensuredplain_textis assigned from the underlying text structure. -
source/Classes/Block/RichText/Type/03_Rich_text_equation.ps1
Implemented full support forConvertFromObjectlogic and commented out unusedToJson()method stub. -
source/Classes/03_File/03_external_file.ps1, source/Classes/Block/23.1_File_block.ps1
AddedWrite-Verbosediagnostic logging for constructor calls.
Fixed
-
source/Classes/Block/05_Bookmark.ps1
Refactoredbookmark_structureconstructor to unify input parsing and ensure consistent caption/url handling. -
source/Classes/Block/11_Code.ps1
Fixed incorrect assignment of caption text to rich text; reordered constructor logic for correctness. -
source/Classes/Block/30_Table_Of_Contents.ps1
Ensuredcolorproperty is always initialized to a valid default. -
source/Classes/Block/27.2_TableRow.ps1
Corrected debug output to reference actual dynamic cell count instead of fixed index. -
tests/Unit/Classes/Block/05_Bookmark.tests.ps1
Removed redundant assertion and corrected expected structure for caption verification. -
tests/Unit/Classes/Block/11_Code.tests.ps1
Corrected assertion expecting incorrect text in the caption field. -
tests/Unit/Classes/Block/30_Table_Of_Contents.tests.ps1
Updated type expectation to match new default structure initialization. -
tests/Unit/Classes/Database/DatabaseProperties/09_dp_formula.Tests.ps1
Adjusted tests to validate exception behavior when formula input is missing or malformed. -
All test files:
Applied-DisableNameCheckingto allImport-Module Pesterstatements to suppress Pester warnings and improve compatibility.
v0.12.0
[v0.12.0]
Added
-
.github/copilot-instructions.md- Introduced internal documentation to guide GitHub Copilot in understanding the Notion PowerShell module:
- Describes project structure, coding and testing conventions.
- Covers class hierarchy, type usage, PowerShell best practices, and module loading order.
- Includes inline code examples and module-specific conventions for cmdlets, parameters, and testing.
- Introduced internal documentation to guide GitHub Copilot in understanding the Notion PowerShell module:
-
source/Private/Remove-DefaultPropertyNames.ps1- Added utility function
Remove-DefaultPropertyNamesto filter out common .NET object property names, used during property conversion processes for cleaner hashtable parsing.
- Added utility function
-
source/Public/Database/Add-NotionDatabaseToParent.ps1- Introduced new cmdlet
Add-NotionDatabaseToParent, wrapping the database creation API call in a reusable function. - Accepts parameters for
parent_obj,title, andproperties, returning a strongly-typednotion_databaseobject. - Implements detailed parameter validation and integrates with
New-NotionDatabaseand object converters for simplified database creation logic.
- Introduced new cmdlet
-
source/Classes/02_Page/PageProperties/01_pp.ps1- Enhanced
ConvertFromObjectmethod innotion_pagepropertiesto handle both hashtables and custom objects, usingRemove-DefaultPropertyNamesfor cleaner property filtering.
- Enhanced
-
source/Classes/Database/DatabaseProperties/01_dp.ps1- Re-implemented
ConvertFromObjectmethod innotion_databasepropertiesto support input validation and dynamic property extraction, aligning with improvements innotion_pageproperties.
- Re-implemented
-
source/Public/zz1_Type_Accelerator.ps1- Complete Type Accelerator Reorganization: Added comprehensive type accelerators for all Database and Page Property classes, organized into clear sections:
- DatabaseProperties Section: Added all database property classes (
notion_*_database_property) and related classes (DatabasePropertiesBase, relation hierarchy,notion_status_group) - PageProperties Section: Added all page property classes (
notion_*_page_property) and related classes (PagePropertiesBase,notion_pageproperties) - Structure Cleanup: Removed internal
*_structureclasses to keep type accelerators focused on main classes - Proper Organization: Moved misplaced classes (
notion_unique_id,notion_verification) to appropriate sections - Alphabetical Ordering: All classes within sections are alphabetically sorted for better maintainability
- DatabaseProperties Section: Added all database property classes (
- Complete Type Accelerator Reorganization: Added comprehensive type accelerators for all Database and Page Property classes, organized into clear sections:
-
Unit Tests
- Introduced
New-NotionDatabase.Tests.ps1with Pester tests to validate theNew-NotionDatabasefunction:- Ensures
-parent_objis mandatory. - Verifies creation with string titles and rich_text title objects.
- Supports pre-converted
notion_databaseproperties. - Confirms default values (archived, in_trash, is_inline) are unset.
- Ensures
- Added
notion_database.Class.Tests.ps1with Pester unit tests for the notion_database class, covering constructors, ConvertFromObject, default values, nested object conversions, and edge cases. - Comprehensive Database Properties Test Suite: Added complete Pester test coverage for all Database Property classes with extensive German inline comments:
- Database Property Tests: Added individual Pester unit tests for all simple database property types (e.g., checkbox, created_by, created_time, date, email, files, formula, last_edited_by, last_edited_time, people, phone_number, rich_text, title, url). Each test file includes:
- Constructor, property, and
ConvertFromObjecttests. - Inheritance validation from
DatabasePropertiesBase. - Edge case coverage including nulls, type checks, and validation errors.
- Consistent test structure and German inline documentation for clarity and maintainability.
- Constructor, property, and
- Complex Property Tests:
12_dp_multi_select.Tests.ps1(with options management and 100-item limit validation),13_dp_number.Tests.ps1(with format type support),16_dp_relation.Tests.ps1(with inheritance hierarchy for single/dual relations),18_dp_rollup.Tests.ps1(with fallback mechanisms),19_dp_select.Tests.ps1(with options management),20_dp_status.Tests.ps1(with groups and options),23_dp_unique_id.Tests.ps1(with prefix handling)- Each test file includes: Constructor Tests, Property Tests, ConvertFromObject Tests, Inheritance Tests from
DatabasePropertiesBase - Comprehensive edge case handling: null values, empty arrays, type validation, parameter limits, and error conditions
- All tests follow consistent structure with detailed German documentation for maintainability
- Each test file includes: Constructor Tests, Property Tests, ConvertFromObject Tests, Inheritance Tests from
- Database Property Tests: Added individual Pester unit tests for all simple database property types (e.g., checkbox, created_by, created_time, date, email, files, formula, last_edited_by, last_edited_time, people, phone_number, rich_text, title, url). Each test file includes:
- Introduced
Changed
-
source/Classes/Block/08_Callout.ps1- Refactored constructor of
callout_structureto accept rich text object(s) directly, replacing single string handling withrich_text::ConvertFromObjects, enhancing flexibility and correctness.
- Refactored constructor of
-
source/Classes/Database/01_database.ps1- Reordered parameters in constructors of
notion_databaseto placeparentbeforetitlefor consistent and intuitive usage. - Adjusted
ConvertFromObjectlogic to correctly transformtitleanddescriptionfields usingforeachwith clearer formatting.
- Reordered parameters in constructors of
-
source/Public/Database/New-NotionDatabase.ps1- Simplified rich text conversion for the
titleparameter usingrich_text::ConvertFromObjects. - Refactored function to directly return a new
notion_databaseobject instead of manually building a body and invoking the API call, reducing redundancy and centralizing object construction logic. - Updated documentation to clarify parameter usage.
- Simplified rich text conversion for the
-
source/Public/Database/Add-NotionPageToDatabase.ps1- Minor formatting and parameter declaration updates to align with standard PowerShell conventions.
-
source/Public/Invoke-NotionApiCall.ps1- Unified casing for
paramandprocesskeywords for consistency. - Updated format specifiers from
-Fto lowercase-f, aligning with PowerShell formatting best practices. - Cleaned up spacing and streamlined control flow for pagination logic in API call processing.
- Unified casing for
-
source/Classes/00_General/17_notion_rollup.ps1- Added
Createfactory method to instantiate rollup subclasses based on rollup type (array,date,number, etc.), improving usability and maintainability.
- Added
-
source/Classes/00_General/19_notion_select.ps1- Extended constructor overloads in
notion_selectto accept color and name parameters. - Improved object initialization with default color assignment.
- Extended constructor overloads in
-
source/Classes/00_General/20_notion_status.ps1- Added default constructor for
notion_status. - Enhanced overloaded constructors to default missing parameters and reduce errors during object construction.
- Added default constructor for
-
source/Classes/Database/DatabaseProperties/00_dp_base.ps1- Improved validation and error handling in
DatabasePropertiesBase::ConvertFromObject. - Expanded switch statement for more readable property type conversion.
- Ensures
nullinputs are properly caught with helpful errors.
- Improved validation and error handling in
-
source/Classes/Database/DatabaseProperties/01_dp.ps1- Improved logic in
notion_databaseproperties::ConvertFromObjectto handle hashtables, custom objects, and existing instances more flexibly. - Added internal validation to
Add()method to enforce proper typing and error reporting.
- Improved logic in
-
source/Classes/Database/DatabaseProperties/09_dp_formula.ps1- Improved structure conversion logic with validation for missing
expressionfield. - Added constructor-level documentation and default handling in
notion_formula_database_property.
- Improved structure conversion logic with validation for missing
-
source/Classes/Database/DatabaseProperties/12_dp_multi_select.ps1- Refactored
addmethod to include validation for color and item limits. - Enhanced constructor overloads to allow immediate option injection.
- Refactored
-
source/Classes/Database/DatabaseProperties/13_dp_number.ps1- Refined error checking for
notion_number_database_property_structure. - Streamlined constructor input parsing and enum conversion.
- Refined error checking for
-
source/Classes/Database/DatabaseProperties/16_dp_relation.ps1- Removed
database_idfrom structure constructors where no longer applicable. - Improved validation and error handling in all classes related to
notion_relation_database_property. - Fixed improper use of
-invalidDataparameter inWrite-Error.
- Removed
-
source/Classes/Database/DatabaseProperties/19_dp_select.ps1- Added overloads to
notion_select_database_property_structurefor adding options with or without colors and IDs. - Improved error handling and capped item count to 100.
- Clarified and improved structure population logic.
- Added overloads to
-
source/Classes/Database/DatabaseProperties/20_dp_status.ps1- Introduced constructors and
addmethods for programmatically buildingnotion_status_database_property_structure. - Added null-checks and error validation in
ConvertFromObjectto reduce conversion-time failures.
- Introduced constructors and
-
source/Classes/Database/DatabaseProperties/21_dp_title.ps1- Removed obsolete
TODOcomment. - Minor formatting cleanup.
- Removed obsolete
-
source/Classes/Database/DatabaseProperties/23_dp_unique_id.ps1- Improved null checking and early return in
ConvertFromObject. - Replaced all raw type checks with consistent, safe PowerShell exception handling.
- Reformatted parameter block and function declaration to align with PowerShell style standards.
- Improved null checking and early return in
Fixed
source/Classes/Database/01_database.ps1- Fixed constructor to ensure all kind of possible parameter types are handled correctly, including rich text objects for
title.
- Fixed constructor to ensure all kind of possible parameter types are handled correctly, including rich text objects for
source/Classes/Database/DatabaseProperties/16_dp_relation.ps1- Fixed Write Error parameters to use
-Category InvalidData, fixed the error message to include the actual type value, and removed the-invalidDataparameter which is not a valid parameter forWrite-Error.
- Fixed Write Error parameters to use
v0.12.0-preview0007
[v0.12.0-preview0007]
Added
-
.github/copilot-instructions.md- Introduced internal documentation to guide GitHub Copilot in understanding the Notion PowerShell module:
- Describes project structure, coding and testing conventions.
- Covers class hierarchy, type usage, PowerShell best practices, and module loading order.
- Includes inline code examples and module-specific conventions for cmdlets, parameters, and testing.
- Introduced internal documentation to guide GitHub Copilot in understanding the Notion PowerShell module:
-
source/Private/Remove-DefaultPropertyNames.ps1- Added utility function
Remove-DefaultPropertyNamesto filter out common .NET object property names, used during property conversion processes for cleaner hashtable parsing.
- Added utility function
-
source/Public/Database/Add-NotionDatabaseToParent.ps1- Introduced new cmdlet
Add-NotionDatabaseToParent, wrapping the database creation API call in a reusable function. - Accepts parameters for
parent_obj,title, andproperties, returning a strongly-typednotion_databaseobject. - Implements detailed parameter validation and integrates with
New-NotionDatabaseand object converters for simplified database creation logic.
- Introduced new cmdlet
-
source/Classes/02_Page/PageProperties/01_pp.ps1- Enhanced
ConvertFromObjectmethod innotion_pagepropertiesto handle both hashtables and custom objects, usingRemove-DefaultPropertyNamesfor cleaner property filtering.
- Enhanced
-
source/Classes/Database/DatabaseProperties/01_dp.ps1- Re-implemented
ConvertFromObjectmethod innotion_databasepropertiesto support input validation and dynamic property extraction, aligning with improvements innotion_pageproperties.
- Re-implemented
-
source/Public/zz1_Type_Accelerator.ps1- Complete Type Accelerator Reorganization: Added comprehensive type accelerators for all Database and Page Property classes, organized into clear sections:
- DatabaseProperties Section: Added all database property classes (
notion_*_database_property) and related classes (DatabasePropertiesBase, relation hierarchy,notion_status_group) - PageProperties Section: Added all page property classes (
notion_*_page_property) and related classes (PagePropertiesBase,notion_pageproperties) - Structure Cleanup: Removed internal
*_structureclasses to keep type accelerators focused on main classes - Proper Organization: Moved misplaced classes (
notion_unique_id,notion_verification) to appropriate sections - Alphabetical Ordering: All classes within sections are alphabetically sorted for better maintainability
- DatabaseProperties Section: Added all database property classes (
- Complete Type Accelerator Reorganization: Added comprehensive type accelerators for all Database and Page Property classes, organized into clear sections:
-
Unit Tests
- Introduced
New-NotionDatabase.Tests.ps1with Pester tests to validate theNew-NotionDatabasefunction:- Ensures
-parent_objis mandatory. - Verifies creation with string titles and rich_text title objects.
- Supports pre-converted
notion_databaseproperties. - Confirms default values (archived, in_trash, is_inline) are unset.
- Ensures
- Added
notion_database.Class.Tests.ps1with Pester unit tests for the notion_database class, covering constructors, ConvertFromObject, default values, nested object conversions, and edge cases. - Comprehensive Database Properties Test Suite: Added complete Pester test coverage for all Database Property classes with extensive German inline comments:
- Database Property Tests: Added individual Pester unit tests for all simple database property types (e.g., checkbox, created_by, created_time, date, email, files, formula, last_edited_by, last_edited_time, people, phone_number, rich_text, title, url). Each test file includes:
- Constructor, property, and
ConvertFromObjecttests. - Inheritance validation from
DatabasePropertiesBase. - Edge case coverage including nulls, type checks, and validation errors.
- Consistent test structure and German inline documentation for clarity and maintainability.
- Constructor, property, and
- Complex Property Tests:
12_dp_multi_select.Tests.ps1(with options management and 100-item limit validation),13_dp_number.Tests.ps1(with format type support),16_dp_relation.Tests.ps1(with inheritance hierarchy for single/dual relations),18_dp_rollup.Tests.ps1(with fallback mechanisms),19_dp_select.Tests.ps1(with options management),20_dp_status.Tests.ps1(with groups and options),23_dp_unique_id.Tests.ps1(with prefix handling)- Each test file includes: Constructor Tests, Property Tests, ConvertFromObject Tests, Inheritance Tests from
DatabasePropertiesBase - Comprehensive edge case handling: null values, empty arrays, type validation, parameter limits, and error conditions
- All tests follow consistent structure with detailed German documentation for maintainability
- Each test file includes: Constructor Tests, Property Tests, ConvertFromObject Tests, Inheritance Tests from
- Database Property Tests: Added individual Pester unit tests for all simple database property types (e.g., checkbox, created_by, created_time, date, email, files, formula, last_edited_by, last_edited_time, people, phone_number, rich_text, title, url). Each test file includes:
- Introduced
Changed
-
source/Classes/Block/08_Callout.ps1- Refactored constructor of
callout_structureto accept rich text object(s) directly, replacing single string handling withrich_text::ConvertFromObjects, enhancing flexibility and correctness.
- Refactored constructor of
-
source/Classes/Database/01_database.ps1- Reordered parameters in constructors of
notion_databaseto placeparentbeforetitlefor consistent and intuitive usage. - Adjusted
ConvertFromObjectlogic to correctly transformtitleanddescriptionfields usingforeachwith clearer formatting.
- Reordered parameters in constructors of
-
source/Public/Database/New-NotionDatabase.ps1- Simplified rich text conversion for the
titleparameter usingrich_text::ConvertFromObjects. - Refactored function to directly return a new
notion_databaseobject instead of manually building a body and invoking the API call, reducing redundancy and centralizing object construction logic. - Updated documentation to clarify parameter usage.
- Simplified rich text conversion for the
-
source/Public/Database/Add-NotionPageToDatabase.ps1- Minor formatting and parameter declaration updates to align with standard PowerShell conventions.
-
source/Public/Invoke-NotionApiCall.ps1- Unified casing for
paramandprocesskeywords for consistency. - Updated format specifiers from
-Fto lowercase-f, aligning with PowerShell formatting best practices. - Cleaned up spacing and streamlined control flow for pagination logic in API call processing.
- Unified casing for
-
source/Classes/00_General/17_notion_rollup.ps1- Added
Createfactory method to instantiate rollup subclasses based on rollup type (array,date,number, etc.), improving usability and maintainability.
- Added
-
source/Classes/00_General/19_notion_select.ps1- Extended constructor overloads in
notion_selectto accept color and name parameters. - Improved object initialization with default color assignment.
- Extended constructor overloads in
-
source/Classes/00_General/20_notion_status.ps1- Added default constructor for
notion_status. - Enhanced overloaded constructors to default missing parameters and reduce errors during object construction.
- Added default constructor for
-
source/Classes/Database/DatabaseProperties/00_dp_base.ps1- Improved validation and error handling in
DatabasePropertiesBase::ConvertFromObject. - Expanded switch statement for more readable property type conversion.
- Ensures
nullinputs are properly caught with helpful errors.
- Improved validation and error handling in
-
source/Classes/Database/DatabaseProperties/01_dp.ps1- Improved logic in
notion_databaseproperties::ConvertFromObjectto handle hashtables, custom objects, and existing instances more flexibly. - Added internal validation to
Add()method to enforce proper typing and error reporting.
- Improved logic in
-
source/Classes/Database/DatabaseProperties/09_dp_formula.ps1- Improved structure conversion logic with validation for missing
expressionfield. - Added constructor-level documentation and default handling in
notion_formula_database_property.
- Improved structure conversion logic with validation for missing
-
source/Classes/Database/DatabaseProperties/12_dp_multi_select.ps1- Refactored
addmethod to include validation for color and item limits. - Enhanced constructor overloads to allow immediate option injection.
- Refactored
-
source/Classes/Database/DatabaseProperties/13_dp_number.ps1- Refined error checking for
notion_number_database_property_structure. - Streamlined constructor input parsing and enum conversion.
- Refined error checking for
-
source/Classes/Database/DatabaseProperties/16_dp_relation.ps1- Removed
database_idfrom structure constructors where no longer applicable. - Improved validation and error handling in all classes related to
notion_relation_database_property. - Fixed improper use of
-invalidDataparameter inWrite-Error.
- Removed
-
source/Classes/Database/DatabaseProperties/19_dp_select.ps1- Added overloads to
notion_select_database_property_structurefor adding options with or without colors and IDs. - Improved error handling and capped item count to 100.
- Clarified and improved structure population logic.
- Added overloads to
-
source/Classes/Database/DatabaseProperties/20_dp_status.ps1- Introduced constructors and
addmethods for programmatically buildingnotion_status_database_property_structure. - Added null-checks and error validation in
ConvertFromObjectto reduce conversion-time failures.
- Introduced constructors and
-
source/Classes/Database/DatabaseProperties/21_dp_title.ps1- Removed obsolete
TODOcomment. - Minor formatting cleanup.
- Removed obsolete
-
source/Classes/Database/DatabaseProperties/23_dp_unique_id.ps1- Improved null checking and early return in
ConvertFromObject. - Replaced all raw type checks with consistent, safe PowerShell exception handling.
- Reformatted parameter block and function declaration to align with PowerShell style standards.
- Improved null checking and early return in
Fixed
source/Classes/Database/01_database.ps1- Fixed constructor to ensure all kind of possible parameter types are handled correctly, including rich text objects for
title.
- Fixed constructor to ensure all kind of possible parameter types are handled correctly, including rich text objects for
source/Classes/Database/DatabaseProperties/16_dp_relation.ps1- Fixed Write Error parameters to use
-Category InvalidData, fixed the error message to include the actual type value, and removed the-invalidDataparameter which is not a valid parameter for `Writ...
- Fixed Write Error parameters to use
v0.12.0-preview0001
[v0.12.0-preview0001]
v0.11.0
[v0.11.0]
Added
-
source/Public/Block/Pdf/New-NotionPdfBlock.ps1- Implemented
New-NotionPdfBlockto generate a Notion PDF block from provided caption and URL.
- Implemented
-
source/Public/Block/Video/New-NotionVideoBlock.ps1- Implemented
New-NotionVideoBlockto create a Notion video block with specified input.
- Implemented
-
tests/Unit/Public/Block/New-NotionPdfBlock.Tests.ps1- Added unit tests for
New-NotionPdfBlock, validating block construction from caption and URL.
- Added unit tests for
-
tests/Unit/Public/Block/New-NotionVideoBlock.Tests.ps1- Added unit tests for
New-NotionVideoBlock, covering basic functionality and input validation.
- Added unit tests for
Fixed
/workspaces/Notion/source/Classes/Block/27.99_Table.ps1- Fixed
[Table_structure]::ConvertFromObject()
- Fixed
Removed
- Removed unimplemented placeholder versions of these functions from the
Cmdsfolder after relocating and implementing them.source/Public/Block/Cmds/Pdf/New-NotionPdfBlock.ps1source/Public/Block/Cmds/Video/New-NotionVideoBlock.ps1
v0.10.0
[v0.10.0]
Added
-
.devcontainer/setup.ps1- Added logic to ensure the
.dotnet/toolsdirectory is prepended to$env:PATHif not already present, improving the reliability of dotnet tool availability in devcontainers.
- Added logic to ensure the
-
GitVersion.yml- Updated the
hotfixbranch regex to also matchbugfixprefixes, enhancing support for multiple fix naming conventions.
- Updated the
-
source/Private/Invoke-TransposeTable.ps1- Introduced
Invoke-TransposeTable, a utility function that transposes a 2D array. Useful for converting row-major to column-major formats.
- Introduced
-
source/Public/Block/Image/New-NotionImageBlock.ps1- Implemented
New-NotionImageBlockto construct anotion_image_blockfrom a file input.
- Implemented
-
tests/Integration/Block/table.tests.ps1- Added integration tests verifying creation of table blocks with structured content.
-
tests/QA/ModulePrefix.Tests.ps1- Introduced QA test to enforce module function naming conventions using
Verb-PrefixFunctionNamepattern.
- Introduced QA test to enforce module function naming conventions using
-
tests/Unit/Classes/Block/27.99_Table.tests.ps1- Added comprehensive unit tests for
Table_structureandnotion_table_blockclasses, covering constructors, methods, and conversion behavior.
- Added comprehensive unit tests for
-
tests/Unit/Private/Invoke-TransposeTable.Tests.ps1- Introduced unit tests for
Invoke-TransposeTable, validating matrix transposition and error handling for invalid input.
- Introduced unit tests for
-
tests/Unit/Public/Block/New-NotionTableBlock.Tests.ps1- Added extensive unit tests for
New-NotionTableBlock, validating behavior across input types, flags, and edge cases.
- Added extensive unit tests for
Changed
-
source/Classes/Block/21_Image.ps1- Enhanced
notion_image_block.ConvertFromObjectto handle bothnotion_fileobjects and plain objects, improving robustness.
- Enhanced
-
source/Classes/Block/27.2_TableRow.ps1- Updated
TableRow_structure.ConvertFromObjectto short-circuit if input is already aTableRow_structureinstance, avoiding unnecessary processing.
- Updated
-
source/Classes/Block/27.99_Table.ps1- Modified
addRowandaddRowsto sethas_childrenflag when adding rows, ensuring block state consistency.
- Modified
-
source/Public/Block/_RichText/New-NotionRichText.ps1- Updated the
Annotationsparameter to inherit defaults from parent object when unspecified.
- Updated the
-
tests/Integration/Block/callout.tests.ps1- Adjusted emoji and color properties of callout blocks to align with expected test results.
-
tests/Unit/Classes/Page/PageProperties/pp_checkbox.Tests.ps1- Fixed path resolution logic to correct import of project resources.
-
tests/Unit/Classes/Parent/parent.Tests.ps1- Improved error handling for invalid parent types in
notion_parent.ConvertFromObject.
- Improved error handling for invalid parent types in
Fixed
-
source/Public/Block/Table/New-NotionTableBlock.ps1- Renamed function from
New-NotionTabletoNew-NotionTableBlockand significantly refactored its logic to support structured inputs (e.g., hashtables). - Corrected behavior for handling column and row headers.
- Added support for optional pivoting of data and validation of inputs.
- Renamed function from
-
source/Public/Block/TableRow/New-NotionTableRowBlock.ps1- Renamed function from
New-NotionTableRowtoNew-NotionTableRowBlockand updated references to match, ensuring correct module export and functionality.
- Renamed function from
v0.9.2
v0.9.1
v0.9.0
[v0.9.0]
Added
- .github/workflows/update-changelog-on-release.yml
- Added a GitHub Actions workflow to automatically update the changelog upon release.
- github/workflows/publish.yml
- Added a exclusion for ChangeLog.md changes and commits by the bot user to prevent unnecessary workflow runs.