From 1d10605bbd77ee516dd5b2009ffd1120f26de58e Mon Sep 17 00:00:00 2001 From: agj Date: Sat, 21 Feb 2026 14:38:46 -0300 Subject: [PATCH 01/12] =?UTF-8?q?Corrige=20link=20a=20documentaci=C3=B3n?= =?UTF-8?q?=20de=20|>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 548386c6f8cc61aee14d7e5fc097fd876ff7e5b2) --- book/appendix/function_types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/appendix/function_types.md b/book/appendix/function_types.md index 9f631364..9ff346b2 100644 --- a/book/appendix/function_types.md +++ b/book/appendix/function_types.md @@ -135,4 +135,4 @@ Esto es interesante porque nos permite hacer que el código se lea de izquierda > **Nota:** Yo, personalmente, prefiero cómo queda en el “antes” del ejemplo, pero tal vez es porque aprendí programación funcional en lenguajes que no permiten tuberías. -[pipe]: https://package.elm-lang.org/packages/elm/core/latest/Basics#|> +[pipe]: https://package.elm-lang.org/packages/elm/core/latest/Basics#|%3E From cfb5525570f9fb206e774f919c09f701459d3c97 Mon Sep 17 00:00:00 2001 From: agj Date: Sun, 10 May 2026 10:33:51 -0400 Subject: [PATCH 02/12] Actualiza magic nix cache action (cherry picked from commit cc56818e5d43692a9e686f253688971a03d88288) --- .github/workflows/check.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 55ae0dc1..6d278896 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -17,7 +17,7 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Carga caché Nix - uses: DeterminateSystems/magic-nix-cache-action@v8 + uses: DeterminateSystems/magic-nix-cache-action@5626df0a8b8f16cb060538f6d3041500a2d10cb0 - name: Carga caché general uses: actions/cache@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fc8f661a..d47fe9ba 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Carga caché Nix - uses: DeterminateSystems/magic-nix-cache-action@v8 + uses: DeterminateSystems/magic-nix-cache-action@5626df0a8b8f16cb060538f6d3041500a2d10cb0 - name: Carga caché general uses: actions/cache@v4 From 1d96b0c5a5c8357df0c9dfecc35c9a04e675d12b Mon Sep 17 00:00:00 2001 From: agj Date: Sun, 10 May 2026 10:39:20 -0400 Subject: [PATCH 03/12] Corrige error en workflow de Github action (cherry picked from commit 9600a0f075446e61e616107cfe667b5d4851ec1d) --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d47fe9ba..a74c5e19 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,8 +5,6 @@ on: branches: - master workflow_dispatch: - branches: - - master jobs: deploy: From 1463b6e406def62fd8c363531cc782e699eebf05 Mon Sep 17 00:00:00 2001 From: agj Date: Sun, 10 May 2026 10:39:56 -0400 Subject: [PATCH 04/12] Imprime ELM_HOME en workflows (cherry picked from commit 6c80683f4523ef44af1dec25289cfdaa3b30f44a) --- .github/workflows/check.yml | 3 ++- .github/workflows/deploy.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6d278896..ef4295b2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -31,8 +31,9 @@ jobs: - name: Información del entorno run: | - echo $HOME nix develop .#ci --command pnpm store path + echo "HOME=$HOME" + echo "ELM_HOME=$ELM_HOME" - name: Verifica run: nix develop .#ci --command just check diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a74c5e19..12024a34 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,8 +33,9 @@ jobs: - name: Información del entorno run: | - echo $HOME nix develop .#ci --command pnpm store path + echo "HOME=$HOME" + echo "ELM_HOME=$ELM_HOME" - name: Sube a GH Pages run: | From eeacbafade83097967389249a0646beebff40a0c Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 16:07:55 -0400 Subject: [PATCH 05/12] Corrige links mal formateados (cherry picked from commit 7567eb0b6f461edc1715b886ba44a4810910d316) --- book/core_language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/core_language.md b/book/core_language.md index 0914afb7..c7a479b2 100644 --- a/book/core_language.md +++ b/book/core_language.md @@ -49,7 +49,7 @@ Prueba juntar varios strings con el operador `(++)` ⬆️ Estos valores primitivos que hemos visto se vuelven más interesantes a medida que escribamos funciones para transformarlos. -> **Nota:** Puedes leer más sobre distintos operadores, como [`(+)`](op-plus), [`(/)`](op-div) y [`(++)`](op-concat) en la documentación del módulo [`Basics`](core-basics). Lamentablemente, esta documentación está en inglés, pero está escrita en un lenguaje muy poco técnico, y aunque sea con traducción automática, creo que vale la pena darle una leída una vez que te parezca apropiado. +> **Nota:** Puedes leer más sobre distintos operadores, como [`(+)`][op-plus], [`(/)`][op-div] y [`(++)`][op-concat] en la documentación del módulo [`Basics`][core-basics]. Lamentablemente, esta documentación está en inglés, pero está escrita en un lenguaje muy poco técnico, y aunque sea con traducción automática, creo que vale la pena darle una leída una vez que te parezca apropiado. [op-plus]: https://package.elm-lang.org/packages/elm/core/latest/Basics#+ [op-div]: https://package.elm-lang.org/packages/elm/core/latest/Basics#/ From 80b800388487bb54aa01a2b9aa7f69bd08044d66 Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 16:41:16 -0400 Subject: [PATCH 06/12] Add markdownlint checking (cherry picked from commit 4589b20f49807e369fdd3b1d20dfd40b75cbeef2) --- .markdownlint.jsonc | 12 ++++++++++++ flake.lock | 12 ++++++------ flake.nix | 7 ++++--- justfile | 1 + 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 .markdownlint.jsonc diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 00000000..61ca6c33 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,12 @@ +{ + "default": false, + "heading-increment": false, + "link-fragments": true, + "link-image-reference-definitions": true, + "links": true, + "no-duplicate-heading": true, + "no-empty-links": true, + "reference-links-images": true, + "single-title": true, + "table-column-count": true +} \ No newline at end of file diff --git a/flake.lock b/flake.lock index f7f34e81..0f706881 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1724395761, - "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", + "lastModified": 1784115452, + "narHash": "sha256-BoYPdqk6jlKXy+DyUzyGV/CtRGfAhk2MmIgBhsemTGI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", + "rev": "35d3407a3816f3b341d8cf1d60abaf2b7b8166ac", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b07f8aea..728aa947 100644 --- a/flake.nix +++ b/flake.nix @@ -16,9 +16,10 @@ pkgs.alejandra pkgs.elmPackages.elm pkgs.just - pkgs.nodePackages.pnpm - pkgs.nodePackages.prettier - pkgs.nodePackages.uglify-js + pkgs.markdownlint-cli + pkgs.pnpm + pkgs.prettier + pkgs.uglify-js pkgs.nodejs-slim_22 ]; in { diff --git a/justfile b/justfile index 68115944..51bdfbee 100644 --- a/justfile +++ b/justfile @@ -21,6 +21,7 @@ format: # Verifica que todo funcione y que los archivos estén formateados. check: build + markdownlint book/ prettier '**/*.{md,json,yml}' --check alejandra *.nix --check From e19acef64b1169e8a44d4d379c8e90c059651914 Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 16:42:28 -0400 Subject: [PATCH 07/12] Configure updated pnpm (cherry picked from commit 2e4ca742a6edbe983b023d5315fef92c641347be) --- pnpm-workspace.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 pnpm-workspace.yaml diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 00000000..082aac2e --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +allowBuilds: + elm-format: false From a1fbb96bf5658132d4c86f4c40e8865f2ac46b85 Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 21:20:35 -0400 Subject: [PATCH 08/12] Corrige varios problemas descubiertos por markdownlint (cherry picked from commit 64e1891e9829c8eb15d8dbd975534565a8c8eafb) # Conflicts: # book/interop/ports.md --- book/architecture/forms.md | 2 +- book/effects/json.md | 2 +- book/effects/time.md | 1 - book/interop/ports.md | 2 +- book/optimization/lazy.md | 2 +- book/webapps/navigation.md | 3 --- 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/book/architecture/forms.md b/book/architecture/forms.md index 8b2fe1f8..9733f655 100644 --- a/book/architecture/forms.md +++ b/book/architecture/forms.md @@ -90,7 +90,7 @@ viewValidation model = Es bastante similar a nuestro [ejemplo de campos de texto](text_fields.md), pero con más campos. -# Modelo +## Modelo Yo siempre empiezo pensando en el `Modelo`. Sabemos que vamos a necesitar tres campos de texto, así que partamos con eso. diff --git a/book/effects/json.md b/book/effects/json.md index a376396e..833db80a 100644 --- a/book/effects/json.md +++ b/book/effects/json.md @@ -149,7 +149,7 @@ Este ejemplo se parece mucho al anterior: La principal diferencia está en la definición de `getRandomQuote`. En vez de usar `Http.expectString`, lo hemos cambiado a `Http.expectJson`. ¿Qué significa esto? -## JSON +## Datos JSON Si le pides a [`/api/random-quotes`](https://elm-lang.org/api/random-quotes) una cita aleatoria, el servidor produce un poco de JSON con esta estructura: diff --git a/book/effects/time.md b/book/effects/time.md index 1f8f1954..c7c2f98e 100644 --- a/book/effects/time.md +++ b/book/effects/time.md @@ -176,7 +176,6 @@ Leer la documentación de [`Task`][task] es la mejor manera de entender esa lín -[utc]: https://package.elm-lang.org/packages/elm/time/latest/Time#utc [task]: https://package.elm-lang.org/packages/elm/core/latest/Task > **Ejercicios:** diff --git a/book/interop/ports.md b/book/interop/ports.md index 8b2d8a06..606afa7f 100644 --- a/book/interop/ports.md +++ b/book/interop/ports.md @@ -254,7 +254,7 @@ En este caso lo hacemos al recibir un mensaje vía websocket, pero podríamos en Aquí tienes algunas sugerencias y soluciones a problemas frecuentes: -- **Es recomendado enviar `Json.Encode.Value` en tus puertos.** Igual que con flags, hay ciertos tipos básicos que pueden transmitirse vía puertos. Esto viene del tiempo antes de que existieran los decodificadores de JSON, y puedes leer más al respecto [aquí](/interop/flags.html#verifying-flags). +- **Es recomendado enviar `Json.Encode.Value` en tus puertos.** Igual que con flags, hay ciertos tipos básicos que pueden transmitirse vía puertos. Esto viene del tiempo antes de que existieran los decodificadores de JSON, y puedes leer más al respecto [aquí](/interop/flags.html#verificando-las-flags). - **Todas las declaraciones `port` deben aparecer en un `port module`.** Probablemente lo mejor es organizar tus puertos en un sólo `port module` para que sea más fácil visualizar la interfaz, toda en un sólo lugar. diff --git a/book/optimization/lazy.md b/book/optimization/lazy.md index 45d27165..d36a4b37 100644 --- a/book/optimization/lazy.md +++ b/book/optimization/lazy.md @@ -75,7 +75,7 @@ Este proceso de comparación hace posible minimizar la manipulación del DOM. Si Dicho esto, ¿podemos reducir aún más el trabajo necesario? -## `Html.Lazy` +## Módulo `Html.Lazy` El módulo [`Html.Lazy`](https://package.elm-lang.org/packages/elm/html/latest/Html-Lazy/) nos permite incluso ahorrarnos la construcción de los nodos virtuales. La pieza central es la función `lazy`: diff --git a/book/webapps/navigation.md b/book/webapps/navigation.md index 47154598..95691259 100644 --- a/book/webapps/navigation.md +++ b/book/webapps/navigation.md @@ -42,9 +42,6 @@ En vez de cargar nuevo HTML, estas tres adiciones nos dan control completo sobre [u]: https://package.elm-lang.org/packages/elm/url/latest/Url#Url [ur]: https://package.elm-lang.org/packages/elm/browser/latest/Browser#UrlRequest -[bn]: https://package.elm-lang.org/packages/elm/browser/latest/Browser-Navigation -[bnp]: https://package.elm-lang.org/packages/elm/browser/latest/Browser-Navigation#pushUrl -[bnl]: https://package.elm-lang.org/packages/elm/browser/latest/Browser-Navigation#load ## Ejemplo From b19b7830b7f7ae8500f49769fa3a9bdd43ceb09a Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 21:24:21 -0400 Subject: [PATCH 09/12] Corrige formato (cherry picked from commit e6cf875625891c7d7236cfe66f151f7b894ecd68) --- book/interop/flags.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/book/interop/flags.md b/book/interop/flags.md index bf499d5c..abb3f4e3 100644 --- a/book/interop/flags.md +++ b/book/interop/flags.md @@ -135,20 +135,17 @@ Mucha gente prefiere usar `Json.Decode.Value` porque les otorga un control más Los otros tipos que Elm soporta son un rezago de la época antes de que existieran los decodificadores JSON. Si decides usar estos otros tipos, hay ciertos detalles a tener en cuenta. Los siguientes ejemplos muestran el tipo deseado de la flag, y en forma anidada se ilustra cómo se interpretan distintos valores JS: - `init : Int -> ...` - - `0` → `0` - `7` → `7` - `3.14` → error - `6.12` → error - `init : Maybe Int -> ...` - - `null` → `Nothing` - `42` → `Just 42` - `"hi"` → error - `init : { x : Float, y : Float } -> ...` - - `{ x: 3, y: 4, z: 50 }` → `{ x = 3, y = 4 }` - `{ x: 3, name: "Tom" }` → error - `{ x: 360, y: "why?" }` → error From 746fb2968bf8b1f1814c71789ac9b0e83ccce83c Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 21:24:47 -0400 Subject: [PATCH 10/12] Corrige tarea check para que se corresponda con tarea format (cherry picked from commit 6a83572f5b5e7092cef8675c2125874170b26048) --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 51bdfbee..8db5de2c 100644 --- a/justfile +++ b/justfile @@ -22,7 +22,7 @@ format: # Verifica que todo funcione y que los archivos estén formateados. check: build markdownlint book/ - prettier '**/*.{md,json,yml}' --check + prettier '**/*.{md,json,yml,css}' --check alejandra *.nix --check # Publica en Github Pages. From 81c3ea87231ab6bd3e3a522a0c23c09a560a4cb8 Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 21:34:46 -0400 Subject: [PATCH 11/12] Actualiza hash de commit de magic-nix-cache-action en CI --- .github/workflows/check.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ef4295b2..ace549bf 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -17,7 +17,7 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Carga caché Nix - uses: DeterminateSystems/magic-nix-cache-action@5626df0a8b8f16cb060538f6d3041500a2d10cb0 + uses: DeterminateSystems/magic-nix-cache-action@55718cd9ebf1737a061487d5ada21abf31e99a98 - name: Carga caché general uses: actions/cache@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 12024a34..c2d41610 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Carga caché Nix - uses: DeterminateSystems/magic-nix-cache-action@5626df0a8b8f16cb060538f6d3041500a2d10cb0 + uses: DeterminateSystems/magic-nix-cache-action@55718cd9ebf1737a061487d5ada21abf31e99a98 - name: Carga caché general uses: actions/cache@v4 From 552ff24bb312e1b9a0e3dc1000b85eae9344ec09 Mon Sep 17 00:00:00 2001 From: agj Date: Thu, 16 Jul 2026 21:55:12 -0400 Subject: [PATCH 12/12] =?UTF-8?q?Actualiza=20todas=20las=20dependencias=20?= =?UTF-8?q?de=20acciones,=20usando=20commits=20espec=C3=ADficos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check.yml | 8 ++++---- .github/workflows/deploy.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ace549bf..23857900 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,18 +9,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Carga rama de Git - uses: actions/checkout@v4 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 - name: Instala Nix - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0 with: nix_path: nixpkgs=channel:nixos-unstable - name: Carga caché Nix - uses: DeterminateSystems/magic-nix-cache-action@55718cd9ebf1737a061487d5ada21abf31e99a98 + uses: DeterminateSystems/magic-nix-cache-action@55718cd9ebf1737a061487d5ada21abf31e99a98 # v14 - name: Carga caché general - uses: actions/cache@v4 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | .direnv diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c2d41610..2f31876b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,18 +11,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Carga rama de Git - uses: actions/checkout@v4 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 - name: Instala Nix - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0 with: nix_path: nixpkgs=channel:nixos-unstable - name: Carga caché Nix - uses: DeterminateSystems/magic-nix-cache-action@55718cd9ebf1737a061487d5ada21abf31e99a98 + uses: DeterminateSystems/magic-nix-cache-action@55718cd9ebf1737a061487d5ada21abf31e99a98 # v14 - name: Carga caché general - uses: actions/cache@v4 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | .direnv