diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0ddbb7..614ba73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: pull_request: push: - branches: [main] + branches: [main, staging] workflow_dispatch: permissions: diff --git a/docs/TODO.md b/docs/TODO.md index e25d73b..d61a85e 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -50,11 +50,13 @@ The placeholder `"This is a example description"` appears in the frontmatter ### Pinned dependencies to unpin later -- [ ] `astro` is pinned to `6.1.2` and `@astrojs/netlify` to `7.0.6` to - dodge [withastro/astro#16209](https://github.com/withastro/astro/issues/16209). - Watch [PR #16207](https://github.com/withastro/astro/pull/16207) (or a - later astro release that re-fixes `plugin-chunk-imports`) and unpin per - the checklist in [docs/astro/known-issues.md](astro/known-issues.md). +- [x] `astro` pinned to `6.1.2` / `@astrojs/netlify` to `7.0.6` for + [withastro/astro#16209](https://github.com/withastro/astro/issues/16209). + Fix shipped in `astro@6.1.8` via + [#16282](https://github.com/withastro/astro/pull/16282) and + [#16367](https://github.com/withastro/astro/pull/16367). Unpin PR + opened; see [docs/astro/known-issues.md](astro/known-issues.md) for + the verification checklist and for future use of the same recipe. ### OpenGraph image diff --git a/docs/astro/known-issues.md b/docs/astro/known-issues.md index c653c6f..c648b73 100644 --- a/docs/astro/known-issues.md +++ b/docs/astro/known-issues.md @@ -9,7 +9,10 @@ watch for before unpinning. ## Astro 6.1.3+ `plugin-chunk-imports` corrupts dynamic `import()` on Netlify **First hit:** 2026-04-19 — Netlify deploy of commit `54583a6` failed. -**Status:** Pinned around in commit `d117ef9` (PR #12). Waiting on upstream fix. +**Pinned around:** commit `d117ef9` (PR #12). +**Fixed upstream:** `astro@6.1.8` (2026-04-18) — see "Upstream resolution" below. +**Status:** Historical. Unpin tracked in a follow-up PR; this section is kept +for future-proofing future regressions in the same code path. ### Symptom @@ -65,21 +68,46 @@ Upstream tracking: - Issue: [withastro/astro#16209](https://github.com/withastro/astro/issues/16209) (closed as "use the issue template") - Related issue: [withastro/astro#16196](https://github.com/withastro/astro/issues/16196) -- Proposed fix: [withastro/astro#16207](https://github.com/withastro/astro/pull/16207) - (currently closed, not merged) +- First proposed fix: [withastro/astro#16207](https://github.com/withastro/astro/pull/16207) + — closed by a maintainer in favor of the two PRs below. -### What we did +### Upstream resolution -Pinned to the last known-good release: +Two PRs shipped together in [`astro@6.1.8`](https://github.com/withastro/astro/releases/tag/astro%406.1.8) +(2026-04-18): -| Package | Before | After | Reason | -|---------------------|-----------|---------|---------------------------------------| -| `astro` | `^6.1.7` | `6.1.2` | Regression introduced in `6.1.3`. | -| `@astrojs/netlify` | `^7.0.7` | `7.0.6` | `7.0.7` imports `verifyOptions` from astro internals — a symbol added after `6.1.2`. | +1. **[#16282](https://github.com/withastro/astro/pull/16282)** by @jmurty — + root-cause fix. Corrects the offset math in `plugin-chunk-imports.ts` so + the query string is appended to dynamic `import()` specifiers correctly + instead of being spliced into the middle. +2. **[#16367](https://github.com/withastro/astro/pull/16367)** by @ematipico + — defense in depth. A new `cleanChunkName()` replaces chars outside + `[\w.\-/]` in chunk names so that any leftover garbage from Vite module + IDs can't re-introduce a Netlify deploy break. -The pins are exact (no caret) so `pnpm install` on Netlify can't silently +The canonical place to find upstream fixes is the Astro +[releases page](https://github.com/withastro/astro/releases), not any single +issue or PR — for this bug the issue thread (#16209) was closed without a +useful resolution pointer, and the first PR that fixed it (#16207) was +closed in favor of others. **Always cross-check the changelog of a recent +release before assuming "no fix yet."** + +### What we did — then and now + +**Emergency pin (PR #12, 2026-04-19):** rolled back to the last known-good +release. + +| Package | `^6.1.7` era | Pinned | Reason | +|---------------------|--------------|---------|---------------------------------------| +| `astro` | `^6.1.7` | `6.1.2` | Regression introduced in `6.1.3`. | +| `@astrojs/netlify` | `^7.0.7` | `7.0.6` | `7.0.7` imports `verifyOptions` from astro internals — a symbol added after `6.1.2`. | + +The pins were exact (no caret) so `pnpm install` on Netlify couldn't silently drift back into the broken range. `pnpm-lock.yaml` is gitignored in this -repo, so the pin lives in `package.json`. +repo, so the pin lived in `package.json`. + +**Unpin (follow-up PR):** once `astro@6.1.8` was confirmed to include both +#16282 and #16367, ranges were restored to `^6.1.8` and `^7.0.7`. ### Reproducing locally @@ -96,34 +124,39 @@ the adapter. Use this when: - Adding or changing client `