Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦 Publish Mitosis #1658

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .changeset/clean-cobras-know.md

This file was deleted.

31 changes: 0 additions & 31 deletions .changeset/polite-pugs-pull.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @builder.io/mitosis-cli

## 0.5.25

### Patch Changes

- Updated dependencies [af43f50]
- Updated dependencies [20ad8dc]
- @builder.io/[email protected]

## 0.5.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder.io/mitosis-cli",
"version": "0.5.24",
"version": "0.5.25",
"description": "mitosis CLI",
"types": "build/types/types.d.ts",
"bin": {
Expand Down
60 changes: 60 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Change Log

## 0.5.25

### Patch Changes

- af43f50: [All] Refactored `useMetadata` hook to enable import resolution instead of simple `JSON5` parsing.

You could use a normal JS `Object` and import it inside your `*.lite.tsx` file like this:

```ts
// data.ts

export const myMetadata: Record<string, string | number> = {
a: 'b',
c: 1,
};
```

```tsx
// my-button.lite.tsx
import { useMetadata } from '@builder.io/mitosis';
import { myMetadata } from './data.ts';

useMetadata({
x: 'y',
my: myMetadata,
});

export default function MyButton() {
return <button></button>;
}
```

- 20ad8dc: [angular]: Fix issue with events forced to become `toLowerCase()`.

Based on [choosing-event-names](https://angular.dev/guide/components/outputs#choosing-event-names) custom events are camelCase.
[DOM events](https://www.w3schools.com/jsref/dom_obj_event.asp) are always lower-cased for Angular components.

Checkout [event-handlers.ts](https://github.com/BuilderIO/mitosis/blob/main/packages/core/src/helpers/event-handlers.ts) for a list of all events that are automatically lower-cased. Everything else will be treated as a custom event and therefore camelCased.

If you need some other event to be lower-cased you can use `useMetadata.angular.nativeEvents`:

```tsx
import { useMetadata } from '@builder.io/mitosis';

useMetadata({
angular: {
nativeEvents: ['onNativeEvent'],
},
});

export default function MyComponent(props) {
return (
<div>
<input onNativeEvent={(event) => console.log(event)} />
Hello!
</div>
);
}
```

## 0.5.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"name": "Builder.io",
"url": "https://www.builder.io"
},
"version": "0.5.24",
"version": "0.5.25",
"homepage": "https://github.com/BuilderIO/mitosis",
"main": "./dist/src/index.js",
"exports": {
Expand Down
Loading