-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: update dependencies #1884
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
WalkthroughUpgrades many dependencies in package.json. Removes a custom kyOptions beforeRequest hook when instantiating NotionAPI and updates addSignedUrls to drop the kyOptions parameter and no longer forward it to notion.getSignedFileUrls. Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant NotionAPI
participant Network
rect rgb(230,245,255)
Note over App,NotionAPI: OLD FLOW (with beforeRequest hook)
App->>NotionAPI: new NotionAPI({ kyOptions: { beforeRequest } })
App->>NotionAPI: request /api/v3/syncRecordValues
NotionAPI->>NotionAPI: beforeRequest rewrites URL -> /api/v3/syncRecordValuesMain
NotionAPI->>Network: request /api/v3/syncRecordValuesMain
end
rect rgb(245,255,230)
Note over App,NotionAPI: NEW FLOW (hook removed)
App->>NotionAPI: new NotionAPI()
App->>NotionAPI: request /api/v3/syncRecordValues
NotionAPI->>Network: request /api/v3/syncRecordValues
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ 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). (1)
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.
|
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: 0
🧹 Nitpick comments (2)
package.json (2)
23-27: Align AWS SDK minor versions to reduce duplicationAll AWS SDK v3 deps are on 3.895.0 except cloudfront-signer (3.893.0). Align to the same minor to help dedupe and avoid subtle transitive mismatches.
Apply this diff:
- "@aws-sdk/cloudfront-signer": "^3.893.0", + "@aws-sdk/cloudfront-signer": "^3.895.0",
166-166: Align @types/node with engines for fewer type/runtime mismatchesEngines target Node >=18.18, but @types/node is 22.x. Using Node 22 types can expose APIs not available in Node 18 environments.
Recommend pinning to Node 18 LTS types:
- "@types/node": "^22.13.5", + "@types/node": "^18.19.0",Also applies to: 5-7
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json(4 hunks)
🔇 Additional comments (4)
package.json (4)
117-117: No change required — keep postcss as ^8.5.6 npm shows 8.5.6 is published and is the latest 8.x, which satisfies Tailwind 3.4's PostCSS 8.x requirement.
37-37: Resolved — @next/[email protected] is compatible with Next 14; no change requiredPeerDependencies for @next/third-parties allow next: ^13 || ^14 || ^15 (published package metadata), so using @next/third-parties ^15.5.4 with [email protected] is supported.
22-153: Regenerate lockfile and run dependency dedupepackage-lock.json exists; after these dependency bumps regenerate the lockfile (npm install / npm ci) and run your package manager's dedupe (npm dedupe, pnpm dedupe, or yarn-deduplicate) to remove duplicate minor copies (esp. AWS SDK). Commit the updated lockfile.
107-107: Verified — no CommonJS requires or default imports of nanoid foundAll direct imports use named ESM imports (import { nanoid } / { customAlphabet }) — found in: components/chat/chat.tsx, lib/year-in-review/send-emails.ts, lib/utils.ts, lib/integrations/slack/install.ts.
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: 0
🧹 Nitpick comments (2)
lib/notion/utils.ts (2)
57-66: Make signed URL assignment resilient to count mismatchesAvoid dropping all mappings when the API returns fewer items; map what you have and warn on mismatch.
- if (signedUrls.length === allFileInstances.length) { - for (const [i, file] of allFileInstances.entries()) { - const signedUrl = signedUrls[i]; - if (!signedUrl) continue; - - const blockId = file.permissionRecord.id; - if (!blockId) continue; - - recordMap.signed_urls[blockId] = signedUrl; - } - } + if (signedUrls.length !== allFileInstances.length) { + console.warn("NotionAPI getSignedFileUrls count mismatch", { + requested: allFileInstances.length, + received: signedUrls.length, + }); + } + for (let i = 0; i < Math.min(signedUrls.length, allFileInstances.length); i++) { + const file = allFileInstances[i]; + const signedUrl = signedUrls[i]; + if (!signedUrl) continue; + const blockId = file.permissionRecord.id; + if (!blockId) continue; + recordMap.signed_urls[blockId] = signedUrl; + }
69-69: Typo in log messageCapitalize “File” to match method name for easier grepping.
- console.warn("NotionAPI getSignedfileUrls error", err); + console.warn("NotionAPI getSignedFileUrls error", err);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
lib/notion/index.ts(1 hunks)lib/notion/utils.ts(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). (2)
- GitHub Check: Vercel Agent Review
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
lib/notion/index.ts (1)
3-3: Default NotionAPI() instantiation — LGTM; confirm hook removal doesn’t regressWith the beforeRequest ky hook removed, ensure flows that previously depended on URL rewriting (e.g., syncRecordValuesMain) still work with the upgraded notion-client.
If you haven’t already, run the repository scan from my other comment to ensure no stale references remain, and smoke-test getPage/addSignedUrls against a public page in staging.
lib/notion/utils.ts (1)
53-56: Removal of kyOptions parameter confirmed Verified no two-arg getSignedFileUrls calls or kyOptions/beforeRequest usages remain.
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 ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json(5 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). (1)
- GitHub Check: Vercel Agent Review
| "@aws-sdk/client-lambda": "^3.899.0", | ||
| "@aws-sdk/client-s3": "^3.899.0", | ||
| "@aws-sdk/cloudfront-signer": "^3.893.0", | ||
| "@aws-sdk/lib-storage": "^3.900.0", | ||
| "@aws-sdk/s3-request-presigner": "^3.899.0", |
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.
Align S3 client to lib-storage’s peer requirement
@aws-sdk/[email protected] declares a peer dependency on the same @aws-sdk/client-s3 version, so keeping the client at 3.899.0 will throw peer-dependency warnings and has historically broken type-checking/runtime when the versions drift.(app.unpkg.com)
Please bump the S3 client (and the other tightly-coupled AWS SDK packages you touched in the same stanza) to the matching 3.900.0 release:
- "@aws-sdk/client-lambda": "^3.899.0",
- "@aws-sdk/client-s3": "^3.899.0",
- "@aws-sdk/lib-storage": "^3.900.0",
- "@aws-sdk/s3-request-presigner": "^3.899.0",
+ "@aws-sdk/client-lambda": "^3.900.0",
+ "@aws-sdk/client-s3": "^3.900.0",
+ "@aws-sdk/lib-storage": "^3.900.0",
+ "@aws-sdk/s3-request-presigner": "^3.900.0",📝 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.
| "@aws-sdk/client-lambda": "^3.899.0", | |
| "@aws-sdk/client-s3": "^3.899.0", | |
| "@aws-sdk/cloudfront-signer": "^3.893.0", | |
| "@aws-sdk/lib-storage": "^3.900.0", | |
| "@aws-sdk/s3-request-presigner": "^3.899.0", | |
| "@aws-sdk/client-lambda": "^3.900.0", | |
| "@aws-sdk/client-s3": "^3.900.0", | |
| "@aws-sdk/cloudfront-signer": "^3.893.0", | |
| "@aws-sdk/lib-storage": "^3.900.0", | |
| "@aws-sdk/s3-request-presigner": "^3.900.0", |
🤖 Prompt for AI Agents
package.json lines 23-27: the @aws-sdk packages are version-mismatched with
lib-storage; update the versions so they align. Change "@aws-sdk/client-s3" to
"^3.900.0" and bump the other related AWS SDK packages in the same block
("@aws-sdk/client-lambda", "@aws-sdk/cloudfront-signer",
"@aws-sdk/s3-request-presigner") to "^3.900.0" to match
"@aws-sdk/[email protected]", then run your package manager (npm/yarn/pnpm) to
reinstall and verify typechecks/tests pass.
Summary by CodeRabbit