Skip to content

chore: standardize on Yarn + Node 22.21.1 across CI, Docker, and README#1

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/standardize-repo-with-yarn
Draft

chore: standardize on Yarn + Node 22.21.1 across CI, Docker, and README#1
Copilot wants to merge 4 commits into
mainfrom
copilot/standardize-repo-with-yarn

Conversation

Copy link
Copy Markdown

Copilot AI commented May 2, 2026

  • Actualizar badge de Astro (5.15.3 → 5.16+)
  • Agregar badge de Node 22.21.1, Yarn 1.22 y CI (GitHub Actions)
  • Corregir enlace Demo a toallaalacarta.netlify.app (antes apuntaba a storeplate)
  • Actualizar sección de dependencias como tabla con versiones mínimas
  • Agregar nota sobre Yarn como gestor oficial (no usar npm)
  • Agregar sección de variables de entorno con tabla de .env.example
  • Traducir comandos al español (Install/Dev/Build/Preview)
  • Agregar yarn preview como comando documentado
  • Corregir "Reporting Issues" para apuntar al repo correcto (Medalcode/Toallaalacarta)
Original prompt

Estandarizar el repositorio en Yarn como único gestor de paquetes y alinear la versión de Node usada en CI/workflows/Docker/Netlify.

Repositorio: Medalcode/Toallaalacarta (default branch: main)

Cambios requeridos:

  1. GitHub Actions CI (.github/workflows/ci.yml):

    • Reemplazar instalación/ejecución con npm (npm ci, etc.) por Yarn.
    • Usar corepack enable y yarn install --frozen-lockfile.
    • Alinear versión de Node a la usada por Netlify (actualmente 22.21.1 en netlify.toml).
    • Ajustar cache para Yarn.
    • Asegurar que se ejecuten yarn check (astro check) y yarn test (vitest run).
  2. Workflow Validate Checkout (.github/workflows/validate-checkout.yml):

    • Alinear Node version a 22.x (idealmente 22.21.1).
    • Mantener Yarn y --frozen-lockfile.
  3. Dockerfile:

    • Cambiar instalación a Yarn (via corepack) y usar lockfile (yarn.lock).
    • Evitar npm install.
    • Mantener multi-stage build; runtime debe ejecutar el server de Astro (node ./dist/server/entry.mjs).
  4. Verificar que exista yarn.lock y que los workflows usen lo correcto.

    • Si no existe yarn.lock, generarlo de forma coherente (no modificar dependencias salvo que sea necesario).
  5. (Opcional pero recomendable) Actualizar README o docs mínimas si mencionan npm para que indiquen Yarn.

Criterios de aceptación:

  • Los workflows ya no usan npm.
  • Node version queda consistente (preferentemente 22.21.1 o 22.x) en Netlify + GitHub Actions + validate-checkout.
  • Build local con Yarn sigue funcionando (yarn install, yarn build).
  • Docker build funciona usando Yarn.

Notas:

  • No hacer cambios funcionales de negocio; solo tooling/infra.
  • Mantener el estilo actual del repo.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Give me a high level overview of this repo

Assistant: Toallaalacarta is a public Astro 5 + TypeScript e-commerce storefront (based on the Storeplate template) customized for a towels/textiles shop, integrating Shopify Storefront API for catalog data, Appwrite for authentication/data, and payments via Transbank (Webpay Plus) and PayPal. It’s deployed at https://toallaalacarta.netlify.app/ and licensed under MIT.

What it does (at a glance)

  • Shopify-powered product catalog (dynamic products via Storefront API / GraphQL)
  • Checkout & payments: Transbank (Webpay Plus) + PayPal (capture/authorize)
  • User auth: Appwrite
  • Admin panel: order + inventory management
  • Transactional emails: Resend
  • UX features: real-time cart edits, search/sort/filter, tags/categories/variants, image zoom/slider, responsive UI, dynamic home hero slider
  • Testing + CI: Vitest + GitHub Actions (lint/tests + checkout validation)

Tech stack & repo shape

  • Primary language: TypeScript (~76%), plus Astro components (~17%)
  • Framework: Astro (with some React components mentioned in the structure)
  • Tooling: Prettier, Vitest, Dockerfile present, Netlify config (netlify.toml)
  • Topic tags: ecommerce, typescript, nextjs (tag), towels, chile, business

High-level architecture (from the repo docs)

The repo is organized in a domain/modular style under src/, roughly:

  • src/infrastructure/ – external clients/config (e.g., Appwrite singleton)
  • src/modules/orders/ – domain business logic (orders)
  • src/lib/ – shared utilities (payments/email/cart/content) + shopify/ GraphQL client/queries
  • src/layouts/ – Astro + React UI components (storefront/admin/cart)
  • src/pages/api/ – HTTP/API layer delegating into services/libs
  • src/pages/ – Astro routes/pages
  • src/styles/, src/types/ – styling and TS types

Ops / “agent + skills” concept

The repo includes an “operational agent” concept (toallaalacarta-ops) with documented runbooks, secrets mapping, and reusable “Super-Skills” under docs/technical/ (plus a script scripts/validate_checkout.js and a workflow .github/workflows/validate-checkout.yml referenced in the README).

Key entry points if you’re new

  • README.md (project overview + setup steps)
  • docs/technical/README.md (technical index)
  • src/ (implementation)
  • .env.example (required environment variables for Shopify/Appwrite/Resend/payments)

If you tell me whether you want a product-level overview (features/user flows) or a developer-level overview (packages, env vars, request flow, where to add features), I can tailor the next summary.

User: ves alguna mejora critica posible de realizar

Assistant: Sí: hay una mejora crítica y bastante “obligatoria” a nivel de confiabilidad del repo: están inconsistentes los gestores de paquetes y versiones de Node entre local/CI/Netlify/Docker. Eso suele romper builds “al azar”, bloquear contribuciones y volver el CI poco confiable.

Mejora crítica #1 (recomendada): unificar Node + package manager en todos los entornos

Ahora mismo:

  • package.json declara **`packageMa...

This pull request was created from Copilot chat.

Copilot AI and others added 2 commits May 2, 2026 15:43
Copilot AI changed the title [WIP] Standardize repository with Yarn as package manager chore: standardize on Yarn + Node 22.21.1 across CI, Docker, and README May 2, 2026
Copilot AI requested a review from Medalcode May 2, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants