diff --git a/DIFF_MAIN_feat-myaccountvtex.md b/DIFF_MAIN_feat-myaccountvtex.md new file mode 100644 index 000000000..9ed47935f --- /dev/null +++ b/DIFF_MAIN_feat-myaccountvtex.md @@ -0,0 +1,143 @@ +# Diff da branch vs main + +## Escopo + +- Branch atual: `feat/myaccountvtex` +- Base comparada: `main` +- Merge-base: `dd694199d49625184876bf6b422a8e886c9d1387` +- Data da coleta: 2026-03-05 + +## Resumo rapido + +- Commits a frente da `main`: **96** +- Arquivos alterados: **70** +- Status: **45 modificados** e **25 novos** +- Delta total: **109137 insercoes** e **30651 remocoes** + +## Onde mudou mais + +- `vtex`: 49 arquivos +- `power-reviews`: 5 arquivos +- `website`: 5 arquivos +- `blog`: 2 arquivos +- `htmx`: 2 arquivos +- Outros (`commerce`, `linx`, `shopify`, `vnda`, `wake`, `wap`): 1 arquivo cada +- Raiz do repo: 1 arquivo (`DIFF_MAIN_feat-myaccountvtex.md`) + +## Pontos de maior impacto (linhas alteradas) + +> Observacao: grande parte do volume esta em arquivos OpenAPI gerados. + +| Arquivo | Delta | +| ------------------------------------------------------ | --------------: | +| `vtex/utils/openapi/checkout.openapi.json` | +43725 / -0 | +| `vtex/utils/openapi/vcs.openapi.json` | +14251 / -22819 | +| `vtex/utils/openapi/checkout.openapi.gen.ts` | +27614 / -0 | +| `vtex/utils/openapi/logistics.openapi.json` | +12352 / -0 | +| `vtex/utils/openapi/vcs.openapi.gen.ts` | +243 / -7310 | +| `vtex/utils/openapi/logistics.openapi.gen.ts` | +6088 / -0 | +| `vtex/utils/openapi/vtexid.openapi.json` | +2088 / -0 | +| `vtex/utils/openapi/vtexid.openapi.gen.ts` | +594 / -0 | +| `vtex/loaders/intelligentSearch/productListingPage.ts` | +250 / -151 | +| `vtex/manifest.gen.ts` | +216 / -182 | +| `vtex/utils/types.ts` | +205 / -5 | + +## Mudancas relevantes fora de OpenAPI + +- `vtex/loaders/intelligentSearch/productListingPage.ts`: ajustes grandes na + logica de PLP e parametros (pickup point, zip-code, filtros, etc.). +- `vtex/actions/*` e `vtex/loaders/*`: adicao/expansao de endpoints para + address, sessions, payments, orders, profile e credentials. +- `vtex/utils/types.ts`: expansao de contratos e tipos. +- `website/components/Image.tsx` e `website/components/Picture.tsx`: ajustes no + pipeline de imagem/render. +- `website/components/Seo.tsx` e `website/utils/html.ts`: alteracoes em SEO e + tratamento de HTML. +- `power-reviews/*`: novo loader `productReviews` e adaptacoes em + listagem/detalhe. +- `blog/*`: ajustes em `handlePosts` e `Template`. + +## Arquivos alterados (name-status) + +```text +A DIFF_MAIN_feat-myaccountvtex.md +M blog/core/handlePosts.ts +M blog/sections/Template.tsx +M commerce/types.ts +M htmx/mod.ts +M htmx/sections/htmx.tsx +M linx/loaders/product/listingPage.ts +M power-reviews/loaders/productDetailsPage.ts +M power-reviews/loaders/productListingPage.ts +A power-reviews/loaders/productReviews.ts +M power-reviews/manifest.gen.ts +M power-reviews/mod.ts +M shopify/loaders/ProductListingPage.ts +M vnda/loaders/productListingPage.ts +M vtex/actions/address/create.ts +A vtex/actions/address/createAddress.ts +A vtex/actions/address/deleteAddress.ts +M vtex/actions/address/update.ts +A vtex/actions/address/updateAddress.ts +M vtex/actions/cart/updateAttachment.ts +A vtex/actions/credentials/validate.ts +A vtex/actions/masterdata/updatePartialDocument.ts +M vtex/actions/newsletter/updateNewsletterOptIn.ts +A vtex/actions/payments/delete.ts +A vtex/actions/profile/newsletterProfile.ts +A vtex/actions/sessions/delete.ts +A vtex/loaders/address/getAddressByZIP.ts +A vtex/loaders/address/list.ts +M vtex/loaders/cart.ts +M vtex/loaders/categories/tree.ts +M vtex/loaders/config.ts +M vtex/loaders/intelligentSearch/productListingPage.ts +A vtex/loaders/intelligentSearch/searches.ts +M vtex/loaders/legacy/productList.ts +M vtex/loaders/legacy/productListingPage.ts +A vtex/loaders/logistics/listHolidays.ts +M vtex/loaders/logistics/listPickupPointsByLocation.ts +M vtex/loaders/orders/getById.ts +M vtex/loaders/orders/list.ts +A vtex/loaders/orders/order.ts +A vtex/loaders/payments/info.ts +A vtex/loaders/payments/userPayments.ts +A vtex/loaders/profile/passwordLastUpdate.ts +A vtex/loaders/sessions/info.ts +M vtex/loaders/user.ts +M vtex/manifest.gen.ts +M vtex/middleware.ts +M vtex/mod.ts +M vtex/utils/client.ts +M vtex/utils/intelligentSearch.ts +M vtex/utils/legacy.ts +A vtex/utils/openapi/checkout.openapi.gen.ts +A vtex/utils/openapi/checkout.openapi.json +A vtex/utils/openapi/logistics.openapi.gen.ts +A vtex/utils/openapi/logistics.openapi.json +M vtex/utils/openapi/vcs.openapi.gen.ts +M vtex/utils/openapi/vcs.openapi.json +A vtex/utils/openapi/vtexid.openapi.gen.ts +A vtex/utils/openapi/vtexid.openapi.json +M vtex/utils/orderForm.ts +M vtex/utils/segment.ts +M vtex/utils/types.ts +M vtex/utils/vtexId.ts +M wake/loaders/productListingPage.ts +M wap/loaders/productListingPage.ts +M website/components/Events.tsx +M website/components/Image.tsx +M website/components/Picture.tsx +M website/components/Seo.tsx +M website/utils/html.ts +``` + +## Comandos usados para gerar este documento + +```bash +git rev-list --count main..HEAD +git merge-base main HEAD +git diff --shortstat main...HEAD +git diff --name-status main...HEAD +git diff --numstat main...HEAD +``` diff --git a/blog/core/handlePosts.ts b/blog/core/handlePosts.ts index 429a234eb..cfc8feda0 100644 --- a/blog/core/handlePosts.ts +++ b/blog/core/handlePosts.ts @@ -124,7 +124,8 @@ export const filterPostsBySlugs = (posts: BlogPost[], postSlugs: string[]) => export const filterPostsByTerm = (posts: BlogPost[], term: string) => posts.filter(({ content, excerpt, title }) => [content, excerpt, title].some((field) => - field?.toLowerCase().includes(term.toLowerCase()) + field && + field.toLowerCase().includes(term.toLowerCase()) ) ); diff --git a/commerce/types.ts b/commerce/types.ts index d4d97083d..05fa5d060 100644 --- a/commerce/types.ts +++ b/commerce/types.ts @@ -413,7 +413,10 @@ export interface Person extends Omit { taxID?: string; /** The telephone number. */ telephone?: string; + /** The birth date of the person. */ + birthDate?: string; } + // NON SCHEMA.ORG Compliant. Should be removed ASAP export interface Author extends Omit { "@type": "Author"; @@ -601,6 +604,7 @@ export interface PostalAddress extends Omit { /** The longitude of a location. For example -122.08585 (WGS 84). */ longitude?: number; } + export interface LocationFeatureSpecification extends Omit { "@type": "LocationFeatureSpecification"; diff --git a/htmx/mod.ts b/htmx/mod.ts index 0919997db..ae76d28a1 100644 --- a/htmx/mod.ts +++ b/htmx/mod.ts @@ -1,35 +1,20 @@ +import { type App, type FnContext } from "@deco/deco"; import { Markdown } from "../decohub/components/Markdown.tsx"; import { PreviewContainer } from "../utils/preview.tsx"; import manifest, { Manifest } from "./manifest.gen.ts"; -import { type App, type FnContext } from "@deco/deco"; -export type AppContext = FnContext; -export type Extension = - | "ajax-header" - | "alpine-morph" - | "class-tools" - | "client-side-templates" - | "debug" - | "event-header" - | "head-support" - | "include-vals" - | "json-enc" - | "idiomorph" - | "loading-states" - | "method-override" - | "morphdom-swap" - | "multi-swap" - | "path-deps" - | "preload" - | "remove-me" - | "response-targets" - | "restored" - | "ws" - | "path-params" - | "sse"; + +/** + * @title {{{name}}} + */ +export interface Extension { + name: string; + url: string; +} + export interface Props { - /** @default 1.9.11 */ + /** @default 1.9.12 */ version?: string; - /** @defaul https://cdn.jsdelivr.net/npm */ + /** @default https://cdn.jsdelivr.net/npm */ cdn?: string; /** @title HTMX extensions to include */ extensions?: Extension[]; @@ -50,6 +35,7 @@ export default function Site(state: Props): App> { manifest, }; } + export const preview = async () => { const markdownContent = await Markdown( new URL("./README.md", import.meta.url).href, @@ -71,3 +57,4 @@ export const preview = async () => { }, }; }; +export type AppContext = FnContext; diff --git a/htmx/sections/htmx.tsx b/htmx/sections/htmx.tsx index 5a8d4f7b0..54bc8cbbf 100644 --- a/htmx/sections/htmx.tsx +++ b/htmx/sections/htmx.tsx @@ -2,17 +2,25 @@ import { Head } from "$fresh/runtime.ts"; import { AppContext, Extension } from "../mod.ts"; import { type SectionProps } from "@deco/deco"; import { useScript } from "@deco/deco/hooks"; + const script = (extensions: Extension[]) => { if (extensions.length > 0) { if (document.readyState === "complete") { - document.body.setAttribute("hx-ext", extensions.join(",")); + document.body.setAttribute( + "hx-ext", + extensions.map((ext) => ext.name).join(","), + ); return; } globalThis.onload = () => { - document.body.setAttribute("hx-ext", extensions.join(",")); + document.body.setAttribute( + "hx-ext", + extensions.map((ext) => ext.name).join(","), + ); }; } }; + function Section({ version, cdn, extensions }: SectionProps) { return ( @@ -27,7 +35,7 @@ function Section({ version, cdn, extensions }: SectionProps) { {extensions.map((ext) => (