-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(router-core): update cookie-es dependency to v2.0.0 #5138
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
Updates cookie-es from ^1.2.2 to ^2.0.0 to address deployment issues on AWS Amplify Hosting. Fixes TanStack#5137
WalkthroughUpdated the cookie-es dependency version in packages/router-core/package.json from ^1.2.2 to ^2.0.0. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (5 passed)✅ Passed checks (5 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. ✨ 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 |
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 (1)
packages/router-core/package.json (1)
84-84
: Add a patch changeset for router-coreSince this change fixes a production install/runtime issue, add a patch changeset for @tanstack/router-core to ensure a release is cut.
Example changeset (create under .changeset/ e.g. fix-router-core-cookie-es.md):
--- "@tanstack/router-core": patch --- fix(router-core): declare cookie-es as a dependency and bump to ^2.0.0 to prevent SSR module resolution failures on AWS Amplify/Lambda.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/router-core/package.json
(1 hunks)
🔇 Additional comments (1)
packages/router-core/package.json (1)
84-84
: Add cookie-es as a runtime dependency (dependencies) at ^2.0.0Declare/move "cookie-es" into dependencies in packages/router-core/package.json to avoid SSR module-not-found; verify v2.x is the intended upstream release and ESM/CJS behavior.
File: packages/router-core/package.json — current line:
"cookie-es": "^2.0.0",
Sanity checks to run:
- Search for subpath imports that could break across bundlers/CDNs:
rg -nP -C2 "(from|require\()\s*['\"]cookie-es(?:/index\.js|/index|/.+)['\"]" -g "packages/**" rg -nP -C2 "(from|require\()\s*['\"]cookie-es['\"]" packages/router-core/src
- Verify no other packages in the monorepo still use ^1.x:
rg -n '"cookie-es":' -g "packages/**/package.json"
- If deploying on AWS Amplify/Lambda, confirm the SSR host Node runtime is >=16/18 to avoid resolution issues.
View your CI Pipeline Execution ↗ for commit 166fb55
☁️ Nx Cloud last updated this comment at |
closed in favor of #5195 |
Thanks :_ |
Description
When deploying applications that use
@tanstack/router-core
on AWS Amplify Hosting, the deployment fails with the following error:Root Cause
The
@tanstack/router-core
package importscookie-es
but was using an older version (^1.2.2
) that may have compatibility issues in certain deployment environments.Solution
Updated
cookie-es
dependency from^1.2.2
to^2.0.0
in@tanstack/router-core
's package.json.This aligns with other packages in the monorepo that are already using
cookie-es
v2.0.0.Fixes #5137
Summary by CodeRabbit
Chores
Documentation
Tests
Bug Fixes