chore: upgrade @notionhq/client to 5.17.0 and fix three issues#32
Merged
Conversation
Upgrades the Notion SDK from 5.16.0 to 5.17.0 (also resolves 1 npm vulnerability). Fixes three issues discovered during E2E testing: 1. search/ls --json empty results: Output 'No results found' text instead of [] when --json was active. Now respects output mode. 2. archive command: Only tried pages.update, failing for databases. Now cascades through pages → dataSources → databases, supporting all entity types. Also migrates from deprecated 'archived' field to 'in_trash'. 3. create-page --parent <db-id>: fetchDatabaseSchema() only tried dataSources.retrieve(), failing when given a database page ID. Now uses resolveDataSourceId() which falls back through dataSources → databases to find the correct data source ID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the Notion SDK from 5.16.0 to 5.17.0 (resolves 1 npm vulnerability) and fixes three issues found during E2E testing:
search/ls --json empty results — printed human-readable text instead of
[]when no results matched in--jsonmode, breaking pipe chains.archive fails for databases — only tried
pages.update, which doesn't work for database or data source IDs. Now cascades through pages → dataSources → databases. Also migrates from deprecatedarchivedfield toin_trash.create-page --parent <db-id> silently fails —
fetchDatabaseSchema()only trieddataSources.retrieve(), so passing a database page ID (vs data source ID) would silently fall through to page-parent mode. Now usesresolveDataSourceId()for proper fallback.