Skip to content

chore: upgrade @notionhq/client to 5.17.0 and fix three issues#32

Merged
andrzejchm merged 1 commit into
mainfrom
chore/upgrade-sdk-fix-issues
Apr 7, 2026
Merged

chore: upgrade @notionhq/client to 5.17.0 and fix three issues#32
andrzejchm merged 1 commit into
mainfrom
chore/upgrade-sdk-fix-issues

Conversation

@andrzejchm
Copy link
Copy Markdown
Owner

Upgrades the Notion SDK from 5.16.0 to 5.17.0 (resolves 1 npm vulnerability) and fixes three issues found during E2E testing:

  1. search/ls --json empty results — printed human-readable text instead of [] when no results matched in --json mode, breaking pipe chains.

  2. 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 deprecated archived field to in_trash.

  3. create-page --parent <db-id> silently failsfetchDatabaseSchema() only tried dataSources.retrieve(), so passing a database page ID (vs data source ID) would silently fall through to page-parent mode. Now uses resolveDataSourceId() for proper fallback.

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.
@andrzejchm andrzejchm temporarily deployed to integration-tests April 7, 2026 19:53 — with GitHub Actions Inactive
@andrzejchm andrzejchm merged commit 3245fa2 into main Apr 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant