Skip to content

Commit

Permalink
Merge branch 'main' of github.com:BuilderIO/mitosis into update-build…
Browse files Browse the repository at this point in the history
…er-react

* 'main' of github.com:BuilderIO/mitosis:
  fix React Native signals (BuilderIO#1310)
  Fix/file extensions (BuilderIO#1308)
  • Loading branch information
teleaziz committed Nov 30, 2023
2 parents 28eef2f + e7e5052 commit 7431c75
Show file tree
Hide file tree
Showing 112 changed files with 642 additions and 650 deletions.
5 changes: 2 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ __snapshots__
.*
packages/fiddle/build/**
.yarn
e2e/**/output/**
e2e/**/output/src/**
e2e/e2e-app-vue3-output/vue3/src/**
e2e/e2e-angular/angular_src/app/lib/**
e2e/e2e-qwik/server/**
e2e/e2e-app-qwik-output/src/e2e-app/**
e2e/e2e-app-qwik-output/lib/**
packages/e2e-*/**
**/test-results/
**/playwright-report/
**/playwright/.cache/
**/tsconfig.json
# **/tsconfig.json

examples/**/output/**/*

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
},
"typescript.format.enable": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"typescript.tsdk": "node_modules/typescript/lib"
}
3 changes: 3 additions & 0 deletions .yarn/versions/2e8dddaa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
undecided:
- "@builder.io/mitosis-repo"
- "@builder.io/mitosis"
3 changes: 3 additions & 0 deletions .yarn/versions/3cb89724.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
undecided:
- "@builder.io/mitosis-repo"
- "@builder.io/mitosis"
10 changes: 5 additions & 5 deletions e2e/e2e-alpine/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Alpine from 'alpinejs'
import Alpine from 'alpinejs';
// import myComponent from '@builder.io/e2e-app/alpine/components/my-component.html?raw'
window.Alpine = Alpine

window.Alpine = Alpine;

// Alpine.data('myComponent', myComponent)

// console.log(myComponent)
// document.getElementById('app').innerHTML = myComponent;

Alpine.start()
Alpine.start();
16 changes: 13 additions & 3 deletions e2e/e2e-alpine/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ import { resolve } from 'path';
import { defineConfig } from 'vite';
import handlebars from 'vite-plugin-handlebars';

const dir = resolve(__dirname, 'node_modules', '@builder.io', 'e2e-app', 'output', 'alpine', 'alpine', 'src', 'components');
const dir = resolve(
__dirname,
'node_modules',
'@builder.io',
'e2e-app',
'output',
'alpine',
'alpine',
'src',
'components',
);

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
handlebars({
partialDirectory: dir,
})
]
}),
],
});
2 changes: 1 addition & 1 deletion e2e/e2e-angular/angular_src/app/mitosis.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// components we are using from Mitosis output. Ideally this would be generated
// by Mitosis, and/or Angular 14 "standalone components" would be generated.

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { components } from './mitosis-component-list';

Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"fast-glob": "^3.2.11",
"rimraf": "^3.0.2",
"sync-directory": "^5.1.5",
"typescript": "^4.8.4"
"typescript": "^5.3.2"
}
}
2 changes: 1 addition & 1 deletion e2e/e2e-app/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Mitosis E2E orchestration script

import { spawn } from 'child_process';
import { readFile, writeFile } from 'fs/promises';
import { resolve } from 'path';
import { spawn } from 'child_process';
import syncDirectory from 'sync-directory';

import { emitTable, Entry } from './e2e-output';
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-app/output/qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@builder.io/e2e-app": "workspace:*",
"@builder.io/qwik": "^1.1.4",
"@types/node": "latest",
"typescript": "^4",
"typescript": "^5.3.2",
"vite": "^3.2.2"
}
}
4 changes: 1 addition & 3 deletions e2e/e2e-app/output/qwik/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"name": "@builder.io/e2e-app-qwik",
"implicitDependencies": [
"@builder.io/e2e-app"
]
"implicitDependencies": ["@builder.io/e2e-app"]
}
8 changes: 2 additions & 6 deletions e2e/e2e-app/output/qwik/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,5 @@
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"emitDeclarationOnly": true
},
"include": [
"types.d.ts",
"types-hack.d.ts",
"src"
],
}
"include": ["types.d.ts", "types-hack.d.ts", "src"]
}
2 changes: 1 addition & 1 deletion e2e/e2e-app/output/qwik/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { resolve } from 'path';
import { defineConfig } from 'vite';

export default defineConfig(() => {
return {
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-app/output/vue/packages/_vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@vitejs/plugin-vue2": "^1.1.2",
"@vue/tsconfig": "^0.1.3",
"terser": "^5.14.2",
"typescript": "^4",
"typescript": "^5.3.2",
"vite": "^3.2.2",
"vite-plugin-dts": "^1.5.0",
"vue-tsc": "^0.38.8"
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2e-app/output/vue/packages/_vue2/tsconfig.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node"]
"types": ["node"],
"noImplicitAny": false
}
}
1 change: 1 addition & 0 deletions e2e/e2e-app/output/vue/packages/_vue2/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"baseUrl": ".",
"noImplicitAny": false,
"paths": {
"@/*": ["./src/*"]
}
Expand Down
7 changes: 2 additions & 5 deletions e2e/e2e-app/output/vue/packages/_vue2/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import vue from '@vitejs/plugin-vue2';
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue2';
import dts from 'vite-plugin-dts';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
dts({ insertTypesEntry: true }),
],
plugins: [vue(), dts({ insertTypesEntry: true })],
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-app/output/vue/packages/_vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/node": "^16.11.47",
"@vitejs/plugin-vue": "^3.0.1",
"@vue/tsconfig": "^0.1.3",
"typescript": "^4",
"typescript": "^5.3.2",
"vite": "^3.2.2",
"vite-plugin-dts": "^1.5.0",
"vue-tsc": "^0.39.5"
Expand Down
4 changes: 1 addition & 3 deletions e2e/e2e-app/output/vue/packages/_vue3/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"name": "@e2e-app/vue-3",
"implicitDependencies": [
"@builder.io/e2e-app"
]
"implicitDependencies": ["@builder.io/e2e-app"]
}
1 change: 1 addition & 0 deletions e2e/e2e-app/output/vue/packages/_vue3/tsconfig.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"compilerOptions": {
"composite": true,
"noImplicitAny": false,
"types": ["node"]
}
}
1 change: 1 addition & 0 deletions e2e/e2e-app/output/vue/packages/_vue3/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"noImplicitAny": false,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-app/output/vue/packages/_vue3/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import vue from '@vitejs/plugin-vue';
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import dts from 'vite-plugin-dts';

// https://vitejs.dev/config/
Expand Down
5 changes: 1 addition & 4 deletions e2e/e2e-app/output/vue/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"name": "@e2e-app/vue",
"implicitDependencies": [
"@e2e-app/vue-2",
"@e2e-app/vue-3"
]
"implicitDependencies": ["@e2e-app/vue-2", "@e2e-app/vue-3"]
}
2 changes: 1 addition & 1 deletion e2e/e2e-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"solid-styled-components": "^0.28.4",
"sync-directory": "^5.1.7",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"typescript": "^5.3.2",
"vue": "~2.6"
},
"peerDependencies": {
Expand Down
11 changes: 3 additions & 8 deletions e2e/e2e-app/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,12 @@
"name": "chromium",
"testDir": "/Users/kcordes/projects/Qwik/mitosis/e2e/e2e-app/tests",
"testIgnore": [],
"testMatch": [
"**/?(*.)@(spec|test).*"
],
"testMatch": ["**/?(*.)@(spec|test).*"],
"timeout": 20000
}
],
"reporter": [
[
"list",
null
],
["list", null],
[
"html",
{
Expand Down Expand Up @@ -367,4 +362,4 @@
}
],
"errors": []
}
}
23 changes: 9 additions & 14 deletions e2e/e2e-app/src/show-for-component/components/MyComponent.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
import { useStore, Show, For } from "@builder.io/mitosis";
import { For, Show, useStore } from '@builder.io/mitosis';

export default function MyComponent() {
const state = useStore({
numbers : [1,2,3],
vowels : ['a', 'e', 'i', 'o', 'u']
})
numbers: [1, 2, 3],
vowels: ['a', 'e', 'i', 'o', 'u'],
});

return (
<div>
<Show when={state.numbers}
else = {
<For each = {state.vowels}>
{(vowel) => <h1>vowel :{vowel}</h1>}
</For>
}
<Show
when={state.numbers}
else={<For each={state.vowels}>{(vowel) => <h1>vowel :{vowel}</h1>}</For>}
>
<For each={state.numbers}>
{(number) => <h1>number :{number}</h1>}
</For>
<For each={state.numbers}>{(number) => <h1>number :{number}</h1>}</For>
</Show>
</div>
);
}
}
2 changes: 1 addition & 1 deletion e2e/e2e-app/src/show-for-component/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {default} from './components/MyComponent.lite';
export { default } from './components/MyComponent.lite';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useStore, useMetadata } from '@builder.io/mitosis';
import { useMetadata, useStore } from '@builder.io/mitosis';

import ItemList from './item-list.lite';

Expand Down
8 changes: 2 additions & 6 deletions e2e/e2e-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@
"declaration": true,
"allowJs": true
},
"include": [
"src",
"tests",
"./playwright.config.ts"
]
}
"include": ["src", "tests", "./playwright.config.ts"]
}
6 changes: 3 additions & 3 deletions e2e/e2e-qwikcity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"@types/eslint": "8.21.1",
"@types/node": "^18.14.0",
"@types/node-fetch": "latest",
"@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.54.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "8.35.0",
"eslint-plugin-qwik": "0.21.0",
"node-fetch": "3.3.0",
"prettier": "2.8.4",
"typescript": "4.9.5",
"typescript": "^5.3.2",
"undici": "5.20.0",
"vite": "4.1.4",
"vite-tsconfig-paths": "3.5.0"
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-qwikcity/src/entry.preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*
*/
import { createQwikCity } from '@builder.io/qwik-city/middleware/node';
import render from './entry.ssr';
import qwikCityPlan from '@qwik-city-plan';
import render from './entry.ssr';

/**
* The default export is the QwikCity adapter used by Vite preview.
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-qwikcity/src/routes/[...index]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { E2eApp } from '@builder.io/e2e-app-qwik';
import { component$ } from '@builder.io/qwik';
import { useLocation } from '@builder.io/qwik-city';
import { E2eApp } from '@builder.io/e2e-app-qwik';

export interface MainProps {
url: string;
Expand Down
4 changes: 2 additions & 2 deletions e2e/e2e-qwikcity/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { qwikCity } from '@builder.io/qwik-city/vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig(() => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react-dom": "^18.0.5",
"@vitejs/plugin-react": "^1.3.0",
"rimraf": "^3.0.2",
"typescript": "^4.8.4",
"typescript": "^5.3.2",
"vite": "^3.2.2"
}
}
2 changes: 1 addition & 1 deletion e2e/e2e-react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
Expand Down
Loading

0 comments on commit 7431c75

Please sign in to comment.