Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
16 KiB
@astrojs/lit
4.3.0
Minor Changes
-
#11234
4385bf7
Thanks @ematipico! - Adds a new function calledaddServerRenderer
to the Container API. Use this function to manually store renderers inside the instance of your container.This new function should be preferred when using the Container API in environments like on-demand pages:
import type { APIRoute } from 'astro'; import { experimental_AstroContainer } from 'astro/container'; import reactRenderer from '@astrojs/react/server.js'; import vueRenderer from '@astrojs/vue/server.js'; import ReactComponent from '../components/button.jsx'; import VueComponent from '../components/button.vue'; // MDX runtime is contained inside the Astro core import mdxRenderer from 'astro/jsx/server.js'; // In case you need to import a custom renderer import customRenderer from '../renderers/customRenderer.js'; export const GET: APIRoute = async (ctx) => { const container = await experimental_AstroContainer.create(); container.addServerRenderer({ renderer: reactRenderer }); container.addServerRenderer({ renderer: vueRenderer }); container.addServerRenderer({ renderer: customRenderer }); // You can pass a custom name too container.addServerRenderer({ name: 'customRenderer', renderer: customRenderer, }); const vueComponent = await container.renderToString(VueComponent); return await container.renderToResponse(Component); };
4.2.0
Minor Changes
-
#11144
803dd80
Thanks @ematipico! - The integration now exposes a function calledgetContainerRenderer
, that can be used inside the Container APIs to load the relative renderer.import { experimental_AstroContainer as AstroContainer } from 'astro/container'; import ReactWrapper from '../src/components/ReactWrapper.astro'; import { loadRenderers } from 'astro:container'; import { getContainerRenderer } from '@astrojs/react'; test('ReactWrapper with react renderer', async () => { const renderers = await loadRenderers([getContainerRenderer()]); const container = await AstroContainer.create({ renderers, }); const result = await container.renderToString(ReactWrapper); expect(result).toContain('Counter'); expect(result).toContain('Count: <!-- -->5'); });
4.1.0
Minor Changes
- #11164
cf9b2ff
Thanks @scottnath! - Removes deprecatedtemplate
attribute and replaces deprecated domparser function
4.0.1
Patch Changes
- #9479
1baf0b0d3cbd0564954c2366a7278794fad6726e
Thanks @sarah11918! - Updates README
4.0.0
Major Changes
- #8822
b0a71946f
Thanks @Geoffrey-Pliez! - Upgrade to Lit 3.0
3.0.3
Patch Changes
- #9018
23c9a30ad
Thanks @augustjk! - Fix hydration ordering of nested custom elements. Child components will now wait for their parents to hydrate before hydrating themselves.
3.0.2
Patch Changes
- #8826
754c40f6e
Thanks @lilnasy! - Fixed an issue where an incompatible version of lit was installed.
3.0.1
Patch Changes
- #8737
6f60da805
Thanks @ematipico! - Add provenance statement when publishing the library from CI
3.0.0
Major Changes
-
#8188
d0679a666
Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023. -
#8179
6011d52d3
Thanks @matthewp! - Astro 3.0 Release Candidate
3.0.0-rc.1
Major Changes
3.0.0-beta.0
Major Changes
1eae2e3f7
Thanks @Princesseuh! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
2.1.1
Patch Changes
2.1.0
Minor Changes
2.0.2
Patch Changes
2.0.1
Patch Changes
- #6752
c7eb0d431
Thanks @augustjk! - ProviderenderInfo
when rendering Lit components. Fixes issue with rendering nested components.
2.0.0
Major Changes
- #6681
4b077318f
Thanks @e111077! - Update to use@lit-labs/ssr@^3
[BREAKING] DOM shim required for Lit SSR has been greatly reduced.window
,document
, and other objects are no longer available in global. Most SSR-ready component code should not be affected but, if so, they can be fixed with optional chaining or by using theisServer
environment checker from thelit
package. See [lit.dev docs on authoring components for SSR].(https://lit.dev/docs/ssr/authoring/#browser-only-code) [BREAKING] Adds compatibility withlit@2.7.0
hydration behavior. Do not update if you're usinglit@2.6.1
or lower. Includes support for template[shadowrootmode] support.
1.3.0
Minor Changes
- #6213
afbbc4d5b
Thanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
1.2.1
Patch Changes
- #6351
26bf12ef3
Thanks @hrmcdonald! - Render DSD attributes based onshadowRootOptions
1.2.0
Minor Changes
- #6111
ec38a8921
Thanks @e111077! - Implement client:only functionality in Lit and add lit to the client:only warning
1.1.2
Patch Changes
-
#6080
0db220415
Thanks @e111077! - Fixes Lit hydration not having the same reactive values as server (losing state upon hydration) -
#6055
2567aa48b
Thanks @e111077! - Add forwards compatibility for streaming Declarative Shadow DOM
1.1.1
Patch Changes
1.1.0
Minor Changes
-
#5782
1f92d64ea
Thanks @Princesseuh! - Only shim fetch if not already present
1.0.2
Patch Changes
-
#5782
1f92d64ea
Thanks @Princesseuh! - Only shim fetch if not already present -
#5776
6a31433ed
& #5791f7aa1ec25
Thanks @ba55ie! - Fix Lit slotted content
1.0.2-beta.0
See changes in 1.0.2-beta.0
Patch Changes
1.0.1
Patch Changes
1.0.0
Major Changes
-
04ad44563
- > Astro v1.0 is out! Read the official announcement post.No breaking changes. This package is now officially stable and compatible with
astro@1.0.0
!
0.3.2
Patch Changes
0.3.1
Patch Changes
- #3854
b012ee55
Thanks @bholmesdev! - [astro add] Support adapters and third party packages
0.3.0
Minor Changes
-
#3652
7373d61c
Thanks @natemoo-re! - Adds support for passing named slots from.astro
=> Lit components.All slots are treated as Light DOM content.
0.2.0
Minor Changes
-
#3625
f5afaf24
Thanks @matthewp! - Conform to Constructor based renderingThis changes
@astrojs/lit
to conform to the way rendering happens in all other frameworks. Instead of using the tag name<my-element client:load>
you use the imported constructor function,<MyElement client:load>
like you would do with any other framework.Support for
tag-name
syntax had to be removed due to the fact that it was a runtime feature that was not statically analyzable. To improve build performance, we have removed all runtime based component discovery. Using the imported Constructor name allows Astro to discover what components need to be built and bundled for production without ever running your file.
0.1.5
Patch Changes
- #3511
2fedb974
Thanks @natemoo-re! - Patch Lit's server shim to allow forsass
compatibility
0.1.4
Patch Changes
0.1.3
Patch Changes
- #3375
fe61e469
Thanks @jdvivar! - Added tests and fix a small edge case for when you call render with no props/attrs
0.1.2
Patch Changes
0.1.1
Patch Changes
815d62f1
Thanks @FredKSchott! - no changes.
0.1.0
Minor Changes
- #2979
9d7a4b59
Thanks @FredKSchott! - Welcome to the Astro v1.0.0 Beta! Read the official announcement for more details.
0.0.2
Patch Changes
- #2885
6b004363
Thanks @bholmesdev! - Add README across Astro built-in integrations
- #2847
3b621f7a
Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site
0.0.2-next.0
Patch Changes
- #2847
3b621f7a
Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site