Skip to content

Commit 7262d03

Browse files
📦 Publish Mitosis (#1740)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a65e72b commit 7262d03

File tree

6 files changed

+74
-68
lines changed

6 files changed

+74
-68
lines changed

.changeset/rotten-steaks-enjoy.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

.changeset/unlucky-planes-compete.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/cli/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @builder.io/mitosis-cli
22

3+
## 0.9.0
4+
5+
### Patch Changes
6+
7+
- a65e72b: JSX generator properly escapes single character > and <
8+
- Updated dependencies [8ad66fd]
9+
- Updated dependencies [a65e72b]
10+
- @builder.io/mitosis@0.9.0
11+
312
## 0.8.0
413

514
### Patch Changes

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@builder.io/mitosis-cli",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"description": "mitosis CLI",
55
"types": "build/types/types.d.ts",
66
"bin": {

packages/core/CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,68 @@
11
# Change Log
22

3+
## 0.9.0
4+
5+
### Minor Changes
6+
7+
- 8ad66fd: [angular]: Angular v17.2+ uses [signals](https://angular.dev/guide/signals) as a new feature.
8+
This allows the generator to match better with other targets (`onUpdate` becomes [`effect`](https://angular.dev/guide/signals#effects)).
9+
10+
This PR will rewrite the complete Angular generator to match all new features for Angular.
11+
12+
You can access the new Angular generator by using the `api="signals"` inside your mitosis config e.g.:
13+
14+
```js
15+
/**
16+
* @type {import('@builder.io/mitosis'.MitosisConfig)}
17+
*/
18+
module.exports = {
19+
files: 'src/**',
20+
targets: ['angular', 'react', 'vue'],
21+
options: {
22+
angular: {
23+
api: 'signals',
24+
},
25+
react: {},
26+
vue: {},
27+
},
28+
};
29+
```
30+
31+
Furthermore, this PR will fix some issues with the angular output by using Babel instead of search and replace. Additionally, we use [`@if`](https://angular.dev/api/core/@if) etc. to provide a better output.
32+
33+
Some features are not yet implemented for signals api:
34+
35+
- Spread props - `<div {...rest}>{children}</div>`
36+
- Dynamic components:
37+
38+
```tsx
39+
export default function MyComponent(props) {
40+
const [obj, setObj] = useState(FooComponent);
41+
42+
return <obj>{props.children}</obj>;
43+
}
44+
```
45+
46+
There are some new metadata properties for Angular if you use the signals api:
47+
48+
```tsx
49+
useMetadata({
50+
angular: {
51+
signals: {
52+
writeable: ['disabled'],
53+
required: ['label'],
54+
},
55+
},
56+
});
57+
```
58+
59+
- `writeable` will use `model()` to enable two-way binding for the property.
60+
- `required` will convert the `input` to a `required` input.
61+
62+
### Patch Changes
63+
64+
- a65e72b: JSX generator properly escapes single character > and <
65+
366
## 0.8.0
467

568
### Minor Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"name": "Builder.io",
2323
"url": "https://www.builder.io"
2424
},
25-
"version": "0.8.0",
25+
"version": "0.9.0",
2626
"homepage": "https://github.com/BuilderIO/mitosis",
2727
"main": "./dist/src/index.js",
2828
"exports": {

0 commit comments

Comments
 (0)