Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
42 KiB
astro
1.4.4
Patch Changes
-
#4967
e6a881081
Thanks @matthewp! - Final perf fix from 1.3.0 regressionA regression in rendering perf happened in 1.3.0. This is the final fix for the underlying issue.
1.4.3
Patch Changes
-
#4956
ee8dd424f
Thanks @matthewp! - Fix perf regression in SSR -
#4952
5bcd76e3a
Thanks @bluwy! - Refactor ViteConfigWithSSR type
1.4.2
Patch Changes
-
#4932
9898088c0
Thanks @matthewp! - Prevent hydration mismatch in streaming SSR -
#4939
cf2bba1e4
Thanks @natemoo-re! - Fix MDX error handling, preventing a memory leak
1.4.1
Patch Changes
- #4928
7690849a8
Thanks @Princesseuh! - Fix module definition of Markdown and MDX files not being available outside Astro files
1.4.0
Minor Changes
-
#4907
01c1aaa00
Thanks @matthewp! - Order Astro styles last, to override imported stylesThis fixes CSS ordering so that imported styles are placed higher than page/component level styles. This means that if you do:
--- import '../styles/global.css'; --- <style> body { background: limegreen; } </style>
The
<style>
defined in this component will be placed below the imported CSS. When compiled for production this will result in something like this:/* /src/styles/global.css */ body { background: blue; } /* /src/pages/index.astro */ body:where(.astro-12345) { background: limegreen; }
Given Astro's 0-specificity hashing, this change effectively makes it so that Astro styles "win" when they have the same specificity as global styles.
-
#4876
d3091f89e
Thanks @matthewp! - Adds the Astro.cookies APIAstro.cookies
is a new API for manipulating cookies in Astro components and API routes.In Astro components, the new
Astro.cookies
object is a map-like object that allows you to get, set, delete, and check for a cookie's existence (has
):--- type Prefs = { darkMode: boolean; }; Astro.cookies.set<Prefs>( 'prefs', { darkMode: true }, { expires: '1 month', } ); const prefs = Astro.cookies.get<Prefs>('prefs').json(); --- <body data-theme={prefs.darkMode ? 'dark' : 'light'}></body>
Once you've set a cookie with Astro.cookies it will automatically be included in the outgoing response.
This API is also available with the same functionality in API routes:
export function post({ cookies }) { cookies.set('loggedIn', false); return new Response(null, { status: 302, headers: { Location: '/login', }, }); }
See the RFC to learn more.
Patch Changes
-
#4892
ff7ba0ee0
Thanks @matthewp! - Prevent multiple rendering of head content -
#4842
812658ad2
Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm) -
#4891
87a7cf48e
Thanks @matthewp! - Hoist hydration scripts out of slot templates -
Updated dependencies [
812658ad2
,812658ad2
]:- @astrojs/markdown-remark@1.1.3
- @astrojs/telemetry@1.0.1
1.3.1
Patch Changes
-
#4861
42fe8e0c7
Thanks @rishi-raj-jain! - use const instead of let for define:vars -
#4878
90c207299
Thanks @rishi-raj-jain! - add warning for post routes called when output is not server -
#4855
49ca9e129
Thanks @matthewp! - Fix TS errors when not using skipLibCheck -
#4845
3389f0ce9
Thanks @matthewp! - Prevent the root folder from being deleted during the build -
#4841
4b092269c
Thanks @rishi-raj-jain! - copy assets even if outDir is out of process.cwd() -
#4849
ee5fdeffd
Thanks @rishi-raj-jain! - append .html to the file URL in case build.format says file -
#4867
03e8b750a
Thanks @rishi-raj-jain! - check if class:list's value is defined before converting -
#4873
83ed1cc1f
Thanks @bluwy! - Prevent /undefined catch-all routes in dev -
#4454
6a1a17dd2
Thanks @bluwy! - Allow HMR for internal e2e tests -
#4712
17dbc6701
Thanks @Lifeni! - Fix slashes for paths containing non-ASCII characters on Windows -
#4850
edb7bead6
Thanks @rishi-raj-jain! - add support for changing mode via CLI -
#4868
b99f9902b
Thanks @rishi-raj-jain! - remove all the ssr generated folders in static build if only empty -
Updated dependencies [
5e4c5252b
]:- @astrojs/webapi@1.1.0
1.3.0
Minor Changes
-
#4775
b0cc93996
Thanks @tony-sull! - Adds a new "astro:build:generated" hook that runs after SSG builds finish but before build artifacts are cleaned up. This is a very specific use case, "astro:build:done" is probably what you're looking for. -
#4669
a961aa3c2
Thanks @aggre! - astro-island now correctly passes Uint8Array/Uint16Array/Uint32Array -
#4832
73f215df7
Thanks @matthewp! - Allows Responses to be passed to set:htmlThis expands the abilities of
set:html
to ultimate service this use-case:<div set:html={fetch('/legacy-post.html')}></div>
This means you can take a legacy app that has been statically generated to HTML and directly consume that HTML within your templates. As is always the case with
set:html
, this should only be used on trusted content.To make this possible, you can also pass several other types into
set:html
now:Response
objects, since that is what fetch() returns:<div set:html={new Response('<span>Hello world</span>', { headers: { 'content-type': 'text/html' }, })} > </div>
ReadableStream
s:<div set:html={new ReadableStream({ start(controller) { controller.enqueue(`<span>read me</span>`); controller.close(); }, })} > </div>
AsyncIterable
s:<div set:html={(async function* () { for await (const num of [1, 2, 3, 4, 5]) { yield `<li>${num}</li>`; } })()} > </div>
Iterable
s (non-async):<div set:html={(function* () { for (const num of [1, 2, 3, 4, 5]) { yield `<li>${num}</li>`; } })()} > </div>
Patch Changes
-
#4831
29b29e6a8
Thanks @yuhang-dong! - Update vite-jsx-plugin for jsx export -
#4754
baae1b3fd
Thanks @Princesseuh! - Updateastro check
to latest version of the language server
1.2.8
Patch Changes
-
#4813
be9eaa069
Thanks @bluwy! - Allow overridevite.build.target
-
#4817
a49bc2f02
Thanks @mohammed-elhaouari! - fix parsing integration names with astro add command -
#4819
518e8f7e2
Thanks @matthewp! - Allow passing promises to set:html -
#4807
44fa37818
Thanks @lucacasonato! - Remove explicitTransfer-Encoding: chunked
header from streaming responses -
#4803
f53d97d56
Thanks @Enteleform! - replaces hard-codedminify
values withvite.build.minify
-
Updated dependencies [
df54595a8
]:- @astrojs/markdown-remark@1.1.2
1.2.7
Patch Changes
1.2.6
Patch Changes
1.2.5
Patch Changes
-
#4768
9a59e24e0
Thanks @matthewp! - nsure before-hydration is only loaded when used -
#4759
fc885eaea
Thanks @matthewp! - Read jsxImportSource from tsconfig
1.2.4
Patch Changes
-
#4736
13ca686ea
Thanks @bluwy! - Handle builds with outDir outside of current working directory -
#4748
c5e134d03
Thanks @bluwy! - Fix console.error filtering -
#4742
cf8a7e933
Thanks @matthewp! - Allow file uploads in dev server -
#4594
005d5bacd
Thanks @matthewp! - Allow custom 404 route to handle API route missing methods
1.2.3
Patch Changes
1.2.2
Patch Changes
-
#4705
5b6173fd0
Thanks @Princesseuh! - Properly show an error message when a renderer is not properly configured -
#4723
0dba3b6f3
Thanks @matthewp! - Makes the dev server more resilient to crashes
1.2.1
Patch Changes
- #4703
d28f7013c
Thanks @bholmesdev! - Fix: [astro add] Apply fetch polyfill before running
1.2.0
Minor Changes
-
#4682
d1e695914
Thanks @bholmesdev! - astro add - move configuration updates to final step -
#4549
255636cc7
Thanks @altano! - Allow specifying custom encoding when using a non-html route. Only option before was 'utf-8' and now that is just the default. -
#4578
c706d845e
Thanks @bholmesdev! - Restart dev server when config file is added, updated, or removed
Patch Changes
1.1.8
Patch Changes
-
#4675
63e49c3b6
Thanks @matthewp! - Prevent locking up when encountering invalid CSS -
#4684
919df13b9
Thanks @natemoo-re! - Fixes regression introduced in #4646 with better cyclic reference detection -
#4683
cc242d3af
Thanks @Princesseuh! - Fixtsc
compilation errors whenskipLibCheck
wasn't enabled -
#4667
9290b2414
Thanks @Holben888! - Fix framework components on Vercel Edge -
#4645
f27ca6ab3
Thanks @bholmesdev! - Fix client-side scripts reloads on dev server in windows
1.1.7
Patch Changes
-
#4646
98f242cdc
Thanks @natemoo-re! - Add cyclic ref detection when serializing props -
#4656
6d845c353
Thanks @matthewp! - Fix bug with usingassert
as import identifier -
#4403
d31e72c3b
Thanks @JohnDaly! - Fix for components, declared with JSXMemberExpression nodes, that failed to hydrate due to incomplete 'component-export' metadata
1.1.6
Patch Changes
-
#4623
eb1862b4e
Thanks @delucis! - Improve third-party Astro package support -
#4643
307b7b97c
Thanks @matthewp! - Remove regression when there is duplicate client/server CSS -
#4584
29a5fdc15
Thanks @bluwy! - Correctly escape paths in file names -
#4621
0068afb87
Thanks @AllanChain! - Ensure SSR module is loaded before testing if it's CSS in dev
1.1.5
Patch Changes
1.1.4
Patch Changes
-
#4586
16814dc71
Thanks @bluwy! - Move ast-types as dev dependency -
#4585
f018e365c
Thanks @FredKSchott! - Add docs link to "missing adapter" error msg
1.1.3
Patch Changes
- #4574
b92c24f40
Thanks @delucis! - Updateastro add
to list official integrations & adapters with same organisation we use in docs
1.1.2
Patch Changes
-
#4519
a2e8e76c3
Thanks @JuanM04! - Upgraded Shiki to v0.11.1 -
#4531
2d2e38e47
Thanks @bluwy! - Remove hardcoded Vite middleware handling -
#4553
2f05f5d30
Thanks @matthewp! - Include trailingSlash in astro:build:done hookThis change ensures that the
pages
provided in theastro:build:done
hook conform to thetrailingSlash
andbuild.format
configs. -
#4526
046bfd908
Thanks @bluwy! - Skip clean SSR output if page generation fails -
#4546
bb71be78d
Thanks @bholmesdev! - Update "Add an Adapter" help heading to "Add an SSR Adapter" -
#4548
69b640b87
Thanks @bholmesdev! - Fix "failed to load for SSR" on styles when using tailwind -
#4535
ca28d7578
Thanks @Princesseuh! - Add missingslot
attributes to SVG definitions -
#4524
d431fbe4e
- fix import in the config type declarations -
Updated dependencies [
a2e8e76c3
]:- @astrojs/markdown-remark@1.1.1
1.1.1
Patch Changes
- #4507
4e1af3f0e
Thanks @Princesseuh! - Fiximport-meta.d.ts
not being included in the npm package
1.1.0
Minor Changes
- #4352
cd154e447
Thanks @matthewp! - Make Astro.url match the build.format configuration during the build
- #4423
d4cd7a59f
Thanks @bholmesdev! - Update Markdown type signature to match new markdown plugin,and update top-level layout props for better alignment
- #4474
ac0321824
Thanks @bholmesdev! - Add "extends" to markdown plugin config to preserve Astro defaults
Patch Changes
- #4500
9874c7bf4
Thanks @Princesseuh! - Updateastro check
to use latest version of the Astro language server
- #4439
77ce6be30
Thanks @Princesseuh! - Add tsconfig templates for users to extend from
- #4499
1f42c0791
Thanks @Princesseuh! - Fixtsc
not being able to find Vite's import.meta types on Linux
-
#4497
78e06c8ec
Thanks @bholmesdev! - Production build logging - Only log[code].html
instead of[code]/index.html
for 404 and 500 routes -
Updated dependencies [
ac0321824
,839097c84
]:- @astrojs/markdown-remark@1.1.0
1.1.0-next.0
Minor Changes
- #4352
cd154e447
Thanks @matthewp! - Make Astro.url match the build.format configuration during the build
- #4423
d4cd7a59f
Thanks @bholmesdev! - Update Markdown type signature to match new markdown plugin,and update top-level layout props for better alignment
- #4474
ac0321824
Thanks @bholmesdev! - Add "extends" to markdown plugin config to preserve Astro defaults
Patch Changes
-
#4439
77ce6be30
Thanks @Princesseuh! - Add tsconfig templates for users to extend from -
Updated dependencies [
ac0321824
,839097c84
]:- @astrojs/markdown-remark@1.1.0-next.0
1.0.9
Patch Changes
- #4456
47e71ae8f
Thanks @Princesseuh! - Added an error message when the second argument of Astro.slots.render is not an array
1.0.8
Patch Changes
- #4427
b2e976f39
Thanks @cameronmcefee! - Fix config types to allow falsy values in integrations list, to match docs
- #4385
8164fa6f1
Thanks @krolebord! - Fix warning when using hooks inside the react components not exported as a function declaration
- #4445
df4e99928
Thanks @bholmesdev! - Add "waiting for X integration" log for long-running integration hooks
- #4430
dc42f2c00
Thanks @bholmesdev! - astro add - Fix third-party npm orgs, i.e.@example/integration
- #4441
ca0c7e8b8
Thanks @Princesseuh! - Allow arbitrary strings on the target attribute
-
#4446
27ac6a03a
Thanks @matthewp! - Deterministic CSS orderingThis makes our CSS link order deterministic. It uses CSS depth; that is how deeply a module import the CSS comes from, in order to determine which CSS is page-level vs. component-level CSS.
This is intended to match dev ordering where, because we do not bundle, the page-level CSS always comes after component-level.
1.0.7
Patch Changes
- #4362
aa5118e85
Thanks @joseph-lozano! - Allow user config to setmarkdown.drafts
option
- #4405
a70f69a06
Thanks @FredKSchott! - Refactor JSX build plugin, improve performance
1.0.6
Patch Changes
- #4324
45fdbc465
Thanks @BurntCaramel! - Use TextEncoder instead of Buffer.byteLength() for Deno compatibility
- #4329
0274b8d47
Thanks @tony-sull! - Updates routing logic to allow multiple routes to match the same URL in SSR
- #4347
166b3b8a5
Thanks @bholmesdev! - Fix MDXLayoutProps type signature for linting
1.0.5
Patch Changes
- #4302
1d3a0a16f
Thanks @FredKSchott! - Revert "Ensure hydration scripts inside of slots render ASAP (#4288)" to fix Svelte integration bug
- #4284
73f367c77
Thanks @FredKSchott! - Prevent preview if 'output: server' is configured
1.0.4
Patch Changes
- #4268
f7afdb889
Thanks @bholmesdev! - Align MD with MDX on layout props and "glob" import results:- Add
Content
to MDX - Add
file
andurl
to MDX frontmatter (layout import only) - Update glob types to reflect differences (lack of
rawContent
andcompiledContent
)
- Add
- #4265
8f845ca95
Thanks @matthewp! - Prevents automatic trailingSlash appending on getStaticPaths produced pages
- #4282
c0992e1fe
Thanks @natemoo-re! - Fix bug where Astro's server runtime would end up in the browser
- #4272
24d2f7a6e
Thanks @natemoo-re! - Properly handle hydration for namespaced components
- #4289
3ca905174
Thanks @bholmesdev! - [astro add] Setoutput: 'server'
when adding adapter
1.0.3
Patch Changes
- #4279
42fd6936c
Thanks @FredKSchott! - Handle "not found" imports without throwing an "Invalid URL" error
- #4273
0022f46b5
Thanks @Princesseuh! - Fix build output adding/index.html
at the end of endpoints route
- #4270
7127b1bb3
Thanks @natemoo-re! - Make third-party integration names nicer when usingastro add
1.0.2
Patch Changes
- #4240
561a34d91
Thanks @matthewp! - Properly invalidate Astro modules when a child script updates in HMR
1.0.1
Patch Changes
3a7f2385e
Thanks @FredKSchott! - Add rawContent and compiledContent to MD layout props
1.0.0
Astro v1.0 is out! Read the official announcement post.
Note
If you need help migrating an existing Astro project to the new Astro v1.0, check out our updated Migration Guide and full documentation website.
0.X
For older changelog entries -- including all v0.X, v1.0 Beta, and v1.0 Release Candidate versions -- check out the v0.X changelog.