Skip to content

fix: logger level and static paths params#14799

Merged
ematipico merged 3 commits intofeat/environment-apifrom
env-api/i18n-static-paths
Nov 18, 2025
Merged

fix: logger level and static paths params#14799
ematipico merged 3 commits intofeat/environment-apifrom
env-api/i18n-static-paths

Conversation

@ematipico
Copy link
Copy Markdown
Member

Changes

This PR fixes two issues

Logger

The log level wasn't correctly passed to the various pipelines. We now save the log level inside AstroSettings -> SSRManifest.

Also, inside the static build, we correctly use the logger coming from the BaseApp

Static paths with build.format: "file"

When format: "file" is enabled, the static paths parameters that were cached didn't match, because the parameters contained .html at end.

I tweaked the function by checking if pathname ends with .html, and if so, we use the version without it, which allows to match the keyed params coming from the cache.

@matthewp please check this part, because I'm not sure if the fix is correct. Howerver, it works.

Testing

  • The tests aren't bloated anymore with Astro build logs
  • All tests in i18n-routing.test.js now pass

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 18, 2025

⚠️ No Changeset found

Latest commit: 2944e31

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 18, 2025
@ematipico ematipico force-pushed the env-api/i18n-static-paths branch from 87ec635 to 7d880e2 Compare November 18, 2025 16:57
Copy link
Copy Markdown
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm aside from one comment

Copy link
Copy Markdown
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is currently failing

@ematipico ematipico requested a review from matthewp November 18, 2025 17:12
@ematipico ematipico merged commit 771832e into feat/environment-api Nov 18, 2025
9 of 21 checks passed
@ematipico ematipico deleted the env-api/i18n-static-paths branch November 18, 2025 18:37
ematipico added a commit that referenced this pull request Dec 4, 2025
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: Alexander Niebuhr <alexander@nbhr.io>
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
Co-authored-by: matthewp <361671+matthewp@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: florian-lefebvre <69633530+florian-lefebvre@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by:  Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Hayato Hasegawa <hase1225hayato@gmail.com>
fix: creation of routes list in build (#14325)
Fix unit tests for environment API (#14394)
fixture (#14599)
fix: organize imports and formatting in cloudflare handler (#14697)
fix: resolve environment-api build issues for client & CSS (#14770)
Fixes CSS when both static/client styles exist (#14790)
fix: flag `serverLike` incorrectly computed (#14792)
fix: redirects and i18n routing (#14797)
fix: logger level and static paths params (#14799)
Fix image tests crashing (#14803)
fix(environment): Error overlay not working (#14816)
fix: hashing of chunks (#14811)
Fix before-hydration script emission for environment-api (#14818)
fix: node leak into content collections (#14820)
fix: avoid `node:path` (#14827)
Fix API route tests (#14825)
Fix unit tests (#14832)
fix: server islands build (#14830)
Fix astro-component-bundling tests (#14840)
Fix astro-component-bundling tests (#14837)
Fix config alias by using resolve.alias config (#14828)
fix: container and routing tests (#14852)
fix: respect user vite config on sourcemaps (#14847)
fix: remove useless tests (#14854)
Fixes assetQueryParams and public folder tests (#14853)
fix: renderError fallback (#14855)
Fix server-islands data being used across tests (#14857)
fix: incorrect configuration in tests (#14858)
Fixes for tests in environment branch (#14865)
Fixes for e2e tests in environment branch (#14870)
fix(test): svelte async rendering (#14886)
fix(cloudflare/vercel/netlify): some tests pass and excluded others (#14892)
Fixes for node integrations tests (#14900)
Fix @astrojs/db tests (#14899)
fix(environment): Prevent Vite from interpreting injected sourcemap comments as actual sourcemaps (#14921)
Fix remaining cloudflare tests (#14912)
fix(vite): import mergeConfig from direct file to avoid dynamic import being processed by Vite (#14939)
Fix astro:env tests in Cloudflare (#14925)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants