stack/packages
BilalG1 df5c5884ae
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Build and Run / docker (push) Has been cancelled
Runs E2E API Tests (Local Emulator) / E2E Tests (Local Emulator, Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (mock, 22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (prod, 22.x) (push) Has been cancelled
Runs E2E API Tests with custom port prefix / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Mirror main branch to main-mirror-for-wdb / lint_and_build (push) Has been cancelled
Publish npm packages / publish (push) Has been cancelled
Dev Environment Test With Custom Base Port / restart-dev-and-test-with-custom-base-port (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests with custom base port / setup-tests-with-custom-base-port (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
Publish Swift SDK to prerelease repo / publish (push) Has been cancelled
Sync Main to Dev / sync-commits (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
Fix default redirectMethod for Node.js environments (#1301)
## Summary
- Fixes the default `redirectMethod` to check `typeof window !==
"undefined"` before defaulting to `"window"`
- In Node.js/CLI environments (where `window` is undefined), defaults to
`"none"` instead, preventing runtime errors

## Context
PR #1253 changed the default `redirectMethod` from `"none"` to
`"window"`, but this breaks non-browser environments (Node.js scripts,
CLI tools, backend services) that don't have a `window` object.

## Test plan
- [ ] Verify existing e2e tests pass (they explicitly set
`redirectMethod: "none"`)
- [ ] Verify browser usage still defaults to `"window"`
- [ ] Verify Node.js usage (e.g. `stack-cli`) defaults to `"none"`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Fixed redirect behavior so client-side redirects continue in browser
environments, while non-browser or server-side executions now default to
no automatic redirect, avoiding unexpected navigation. Existing
platform-specific redirect handling remains unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-31 16:00:22 -07:00
..
dashboard-ui-components chore: update package versions 2026-03-31 10:54:12 -07:00
init-stack chore: update package versions 2026-03-31 10:54:12 -07:00
js chore: update package versions 2026-03-31 10:54:12 -07:00
react chore: update package versions 2026-03-31 10:54:12 -07:00
stack chore: update package versions 2026-03-31 10:54:12 -07:00
stack-cli chore: update package versions 2026-03-31 10:54:12 -07:00
stack-sc chore: update package versions 2026-03-31 10:54:12 -07:00
stack-shared chore: update package versions 2026-03-31 10:54:12 -07:00
stack-ui chore: update package versions 2026-03-31 10:54:12 -07:00
template Fix default redirectMethod for Node.js environments (#1301) 2026-03-31 16:00:22 -07:00