Skip to content

Commit

Permalink
[ci] release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 21, 2023
1 parent af43fb5 commit 3dd0a23
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
5 changes: 0 additions & 5 deletions .changeset/three-timers-arrive.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@astrojs/react": "^3.0.5",
"@astrojs/react": "^3.0.6",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^4.0.4",
"@astrojs/vue": "^3.0.4",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.0.5",
"@astrojs/react": "^3.0.6",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"astro": "^3.5.6",
Expand Down
6 changes: 6 additions & 0 deletions packages/integrations/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @astrojs/react

## 3.0.6

### Patch Changes

- [#9141](https://github.com/withastro/astro/pull/9141) [`af43fb517`](https://github.com/withastro/astro/commit/af43fb51726fa2242cec03cb019fa4fa4a4403ef) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue where slotting self-closing elements (img, br, hr) into react components with `experimentalReactChildren` enabled led to an error.

## 3.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/react",
"description": "Use React components within Astro",
"version": "3.0.5",
"version": "3.0.6",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
Expand Down
22 changes: 11 additions & 11 deletions packages/integrations/react/test/parsed-react-children.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { expect } from 'chai';
import convert from "../vnode-children.js";
import convert from '../vnode-children.js';

describe('experimental react children', () => {
it('has undefined as children for direct children', () => {
const [ imgVNode ] = convert('<img src="abc"></img>');
expect(imgVNode.props).to.deep.include({ children: undefined });
})
it('has undefined as children for direct children', () => {
const [imgVNode] = convert('<img src="abc"></img>');
expect(imgVNode.props).to.deep.include({ children: undefined });
});

it('has undefined as children for nested children', () => {
const [ divVNode ] = convert('<div><img src="xyz"></img></div>');
const [ imgVNode ] = divVNode.props.children;
expect(imgVNode.props).to.deep.include({ children: undefined });
})
})
it('has undefined as children for nested children', () => {
const [divVNode] = convert('<div><img src="xyz"></img></div>');
const [imgVNode] = divVNode.props.children;
expect(imgVNode.props).to.deep.include({ children: undefined });
});
});
9 changes: 4 additions & 5 deletions packages/integrations/react/vnode-children.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ export default function convert(children) {
let key = 0;

function createReactElementFromNode(node) {
const childVnodes = Array.isArray(node.children) && node.children.length
? node.children
.map((child) => createReactElementFromNode(child))
.filter(Boolean)
: undefined;
const childVnodes =
Array.isArray(node.children) && node.children.length
? node.children.map((child) => createReactElementFromNode(child)).filter(Boolean)
: undefined;

if (node.type === DOCUMENT_NODE) {
return createElement(Fragment, {}, childVnodes);
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3dd0a23

Please sign in to comment.