Repository navigation
chore(vtex): bump @decocms/start devDep to 2.5.0 + drop responseHeaders bag fallback - #30
Merged
Conversation
…rs bag fallback `vtex/client.ts:getResponseHeaders` was carrying a forward-compat fallback that bag-stored a `Headers` instance because `RequestContext.responseHeaders` didn't exist when the function was written. The TODO comment pointed at a PR — `decocms/blocks#57`, merged 2026-03-30 — and the property has been part of every `@decocms/start` release since v0.39.0. apps-start's devDep was still pinned to `^0.38.0`, which is *before* the new property landed, forcing the `(ctx as any).responseHeaders` biome-ignored cast and the bag-backed fallback to satisfy the type checker. Real consumers (baggagio, casaevideo-storefront) all use >= 2.x via the `>=0.19.0` peerDep range, so they were silently using the runtime fast path. Changes: - Bump `@decocms/start` devDep `^0.38.0` → `^2.5.0`. Peer dep (`>=0.19.0`) is unchanged — no impact on consumers. - Simplify `getResponseHeaders()` from 12 lines to 4. Drop the `(ctx as any)` cast, drop the bag.set/bag.get fallback, drop the biome-ignore. - Update the docstring to call out the floor version. Verification: - `npx tsc --noEmit` exits 0 (was 0 before too — no other type errors surfaced from a 0.38 → 2.5 bump in the surface area we use). - `npx vitest run` → 18 files, 244 tests, all pass. Made-with: Cursor
|
🎉 This PR is included in version 1.6.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves a stale `TODO` in `vtex/client.ts:15` that asked to remove a forward-compat fallback once `decocms/deco-start#57` shipped — that PR merged on 2026-03-30 (~5 weeks ago).
The `getResponseHeaders()` helper was carrying:
…because apps-start's `@decocms/start` devDep was still pinned to `^0.38.0`, which predates the `responseHeaders` property added in v0.39.0. Real consumers (baggagio, casaevideo-storefront) use `@decocms/[email protected]` via the `>=0.19.0` peerDep range, so they were already on the runtime fast path — the dead branch only existed to keep the typechecker happy.
Changes
```diff
-/**
-function getResponseHeaders(): Headers | null {
-}
+/**
+function getResponseHeaders(): Headers | null {
+}
```
Verification
```
$ npx tsc --noEmit
exit 0
(was 0 before — clean 0.38 → 2.5 bump in the surface area apps-start touches)
$ npx vitest run
Test Files 18 passed (18)
Tests 244 passed (244)
```
Test plan
Made with Cursor