Repository navigation
feat(vtex): native Tier B surface (no compat layer) - #23
Merged
Merged
Conversation
Adds the canonical Fresh-era VTEX import paths that sites migrating from deco-cx/apps expect, layered as thin compat wrappers over the existing apps-start primitives so we don't fork business logic: - vtex/loaders/intelligentSearch/productList (re-exports props + default) - vtex/loaders/intelligentSearch/productListingPage (LabelledFuzzy + mapLabelledFuzzyToFuzzy + default) - vtex/loaders/legacy/productListingPage (re-exports getFirstItemAvailable and the legacyProductListingPage loader) - vtex/loaders/paths/PDPDefaultPath, PLPDefaultPath (sitemap seeds) - vtex/utils/fetchVTEX (fetchSafe / fetchAPI / HttpError with URL sanitization) - vtex/actions/analytics/sendEvent (IS analytics, adapted to read IS cookies from the request instead of ctx.bag) Also exports getFirstItemAvailable from vtex/loaders/legacy.ts and adds the nested-path globs to package.json exports map. Manifest regenerated. Tests: 230 pass (5 new), typecheck clean, biome clean on changed files. Made-with: Cursor
Clean cut-off from deco-cx/apps Fresh-era paths. The new framework's
canonical paths (vtex/inline-loaders/*, vtex/loaders/legacy.ts) are the
only public API; we do not re-export old layouts.
Removed (compat layer):
- vtex/loaders/intelligentSearch/{productList,productListingPage}.ts
- vtex/loaders/legacy/productListingPage.ts
- vtex/loaders/paths/{PDPDefaultPath,PLPDefaultPath}.ts
- vtex/utils/fetchVTEX.ts (renamed)
Added natively:
- LabelledFuzzy type + mapLabelledFuzzyToFuzzy helper exported from
vtex/inline-loaders/productListingPage.ts (lives next to the loader
whose `fuzzy` param it feeds).
- CollectionProps / QueryProps / ProductIDProps / FacetsProps interfaces
exported from vtex/inline-loaders/productList.ts.
- vtex/utils/fetch.ts — fetchSafe/fetchAPI/HttpError with VTEX-style
query-string sanitization (utm_*/ft/map). Canonical helper for ad-hoc
VTEX fetches outside the typed client.
- vtex/actions/analytics/sendEvent.ts — IS analytics action, signature
trimmed to (props, req) for the TanStack stack (no ctx.bag).
Path loaders (PDPDefaultPath/PLPDefaultPath) are dropped entirely:
TanStack Start resolves paths at request time from CMS pages, so
static-path enumeration is no longer a framework concern.
Sites migrating from deco-cx/apps must update their imports to the
native paths. The deco-migrate script will be extended to perform
this rewrite automatically.
Made-with: Cursor
2 of 4 tasks
Pure mechanical fix from `biome check --write`: - shopify/manifest.gen.ts: alphabetize imports - vtex/manifest.gen.ts: alphabetize imports - vtex/inline-loaders/productListingPage.ts: alphabetize imports - vtex/utils/fetch.ts + tests: minor formatting Unblocks the Tier B VTEX surface PR — bagaggio (and other sites) need `mapLabelledFuzzyToFuzzy`, `LabelledFuzzy`, `getFirstItemAvailable`, `CollectionProps`/`FacetsProps`/etc. and `sendEvent` to compile. Verified locally: `biome check .` → 0 errors, `vitest run` → 234/234, `tsc --noEmit` → clean. Made-with: Cursor
Made-with: Cursor
- Merge main (which already shipped 1.5.0 with the canonical minicart hoist) into the Tier B surface branch. - Run `npm run generate:manifests` then `npx biome check --write` to re-sort imports in the post-merge files (vtex/hooks/useCart.ts, vtex/inline-loaders/minicart.ts, vtex/utils/minicart.ts, vtex/utils/__tests__/minicart.test.ts) plus regenerate manifests. - Revert the temporary CI probe — the discrepancy was that GitHub Actions tests the merge of the PR with main, while local was on the unmerged branch, so the post-merge files weren't sorted. Verified: `npm run lint` → 0 errors / 149 warnings, `npx tsc --noEmit` clean, `vitest run` → 244/244. Made-with: Cursor
1 task
vibe-dex
added a commit
that referenced
this pull request
Apr 28, 2026
Custom releaseRules silently overrode the angular preset's BREAKING
CHANGE handling. Without an explicit
`{ "breaking": true, "release": "major" }` rule, every commit —
including `feat!:` with `BREAKING CHANGE:` footers — just matched
`{ "type": "feat", "release": "minor" }` and stopped there. The notes
still landed in changelogs, but the version bump never escalated to
major.
Adds the breaking rule as the first entry to restore expected semver
behavior on future releases. No retroactive re-publish for PR #23
(Tier B compat-wrapper drop) — the historical 1.5 → 1.6 bump that
should have been a major stays as-is.
Direct push to main per agreement; this is a build-system fix with
no release-triggering content (chore on releaserc, no version change).
Made-with: Cursor
vibe-dex
added a commit
to decocms/blocks
that referenced
this pull request
May 1, 2026
…#93) Following the apps-start clean cut-off (no compat layer with deco-cx/apps), add explicit rewrites so future site migrations land directly on the canonical apps-start paths. Rewrites added (before the existing catch-all `apps/vtex/loaders/*`): - apps/vtex/loaders/intelligentSearch/{productList,productListingPage, productDetailsPage,suggestions} → @decocms/apps/vtex/inline-loaders/* - apps/vtex/loaders/legacy/{productList,productListingPage, productDetailsPage,search,category} → @decocms/apps/vtex/loaders/legacy - apps/vtex/loaders/paths/* → removed (no static paths in TanStack) - apps/vtex/utils/fetchVTEX → @decocms/apps/vtex/utils/fetch (was incorrectly mapped to vtex/client) Companion to decocms/apps-start#23. Made-with: Cursor
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
Adds the missing Tier B VTEX surface needed by sites migrating from deco-cx/apps to apps-start, as native exports — no compatibility layer.
The first commit on this branch initially mirrored deco-cx/apps's directory layout (
vtex/loaders/intelligentSearch/*,legacy/*,paths/*) as thin re-export wrappers. That approach was rejected: we want a clean cut-off, not technical debt that accrues every site migration.This branch now exposes the same functionality at the canonical apps-start paths so sites adapt forward to the new framework instead of the framework retrofitting to old paths.
Native exports added
vtex/inline-loaders/productListingPage—LabelledFuzzytype +mapLabelledFuzzyToFuzzy()helper (lives next to the loader whosefuzzyparam it feeds).vtex/inline-loaders/productList—CollectionProps/QueryProps/ProductIDProps/FacetsPropsinterfaces exported (so site code can type its prop unions).vtex/loaders/legacy—getFirstItemAvailableexported (was an internal helper; now a public surface for sites that need it).vtex/utils/fetch—fetchSafe/fetchAPI/HttpErrorwith VTEX-style query-string sanitization (utm_*/ft/map). Canonical helper for ad-hoc VTEX fetches outside the typed client.vtex/actions/analytics/sendEvent— IS analytics action, signature(props, req) => Promise<null>. Reads IS cookies (vtex_session/vtex_anonymous) directly from the request headers (noctx.bag).Dropped (intentionally)
vtex/loaders/paths/PDPDefaultPath,PLPDefaultPath) — TanStack Start resolves paths at request time from CMS pages, so static-path enumeration is not a framework concern. Sites that previously consumed these for sitemap seeds should query the catalog/IS APIs directly or rely on CMS routing.Migration impact for sites
Sites moving from deco-cx/apps must rewrite imports:
@decocms/apps/vtex/loaders/intelligentSearch/productList@decocms/apps/vtex/inline-loaders/productList@decocms/apps/vtex/loaders/intelligentSearch/productListingPage@decocms/apps/vtex/inline-loaders/productListingPage@decocms/apps/vtex/loaders/legacy/productListingPage(re-export)@decocms/apps/vtex/loaders/legacy(canonical)@decocms/apps/vtex/utils/fetchVTEX@decocms/apps/vtex/utils/fetch@decocms/apps/vtex/loaders/paths/*The
deco-migratescript will be extended to perform these rewrites automatically (follow-up PR ondecocms/deco-start).Test plan
npm run typecheck— passesnpm test— 234 tests passnpm run generate:manifests)npm linkagainst baggagio-tanstack — framework imports resolve