-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Pinning Notion client version in app file #18310
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
Conversation
WalkthroughThis PR updates version strings for the Notion component and one action, and pins the Notion client import to version 4.0.2. No functional logic or public API signatures were changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
components/notion/actions/query-database/query-database.mjs(1 hunks)components/notion/notion.app.mjs(1 hunks)components/notion/package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/notion/package.json (1)
3-3: Version bump LGTM and dependency pin is consistent."@notionhq/client": "4.0.2" here already enforces the desired version. No changes needed in this file.
components/notion/actions/query-database/query-database.mjs (1)
8-8: Action version bump LGTM.Non-functional change; consistent with the package bump.
| @@ -1,4 +1,4 @@ | |||
| import notion from "@notionhq/client"; | |||
| import notion from "@notionhq/client@4.0.2"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Package specifier with version suffix will fail to resolve; rely on package.json and standard ESM import.
Node/ESM resolution won’t resolve "@notionhq/[email protected]". You already pin 4.0.2 in components/notion/package.json, so this double‑pin is unnecessary and risky. Use a namespace or named import from "@notionhq/client" and keep the existing usage.
Apply this minimal fix:
-import notion from "@notionhq/[email protected]";
+import * as notion from "@notionhq/client";Run to find any other imports pinning versions in specifiers:
🏁 Script executed:
#!/bin/bash
rg -nP -g '!**/node_modules/**' '\bfrom\s+["'\''][^"'\''@]*@[\d]+\.[\d]+\.[\d]+["'\'']'Length of output: 148
To catch any version-pinned imports across JS/TS/MJS files (excluding node_modules), run:
🏁 Script executed:
#!/bin/bash
# Search ESM imports with version suffix
rg -nP --type js --type ts --type mjs -n -g '!node_modules/**' 'from\s+["'\'']@?[^"\'']+@[0-9]+\.[0-9]+\.[0-9]+'
# Search CommonJS requires with version suffix
rg -nP --type js --type ts --type mjs -n -g '!node_modules/**' 'require\(["'\'']@?[^"\'']+@[0-9]+\.[0-9]+\.[0-9]+'Length of output: 55
To reliably detect any version-pinned imports across all JS/TS/MJS files (excluding node_modules), run:
🏁 Script executed:
#!/bin/bash
# ESM imports with version suffix
rg -nP -n -g '!node_modules/**' -g '*.js' -g '*.ts' -g '*.mjs' "from\s+['\"][^'\"]+@[0-9]+\.[0-9]+\.[0-9]+['\"]"
# CommonJS requires with version suffix
rg -nP -n -g '!node_modules/**' -g '*.js' -g '*.ts' -g '*.mjs' "require\(['\"][^'\"]+@[0-9]+\.[0-9]+\.[0-9]+['\"]\)"Length of output: 79
Fix version-pinned import in components/notion/notion.app.mjs
The @4.0.2 suffix in the import path breaks ESM resolution. Remove it and import from the package name:
-import notion from "@notionhq/[email protected]";
+import * as notion from "@notionhq/client";📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import notion from "@notionhq/client@4.0.2"; | |
| import * as notion from "@notionhq/client"; |
🤖 Prompt for AI Agents
In components/notion/notion.app.mjs around line 1, the import uses a
version-pinned path ("@notionhq/[email protected]") which breaks ESM resolution;
change the import to the package name only by removing the "@4.0.2" suffix so it
imports from "@notionhq/client" to allow normal ESM resolution and package
manager control.
Summary by CodeRabbit