Skip to content
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
135 changes: 135 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:

env:
CI: true

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run lint
run: pnpm lint

build:
name: Build
needs: [lint]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run build
run: pnpm build

test:
name: Test
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm test
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
ci:
uses: ./.github/workflows/ci.yml

version:
needs: [ci]
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 1 addition & 2 deletions packages/effect-app/test/rpc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ export class Stats extends TaggedRequest<Stats>()("Stats", {}, {
}
}) {}

declare const stats: typeof Stats.success.Type
console.log(stats.usersActiveLastWeek)
declare const _stats: typeof Stats.success.Type
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@
<script
setup
lang="ts"
generic="
// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
generic="// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
From extends Record<PropertyKey, any>,
To extends Record<PropertyKey, any>
"
To extends Record<PropertyKey, any>"
>
import { type DeepKeys, type DeepValue } from "@tanstack/vue-form"
import { computed, onMounted, provide } from "vue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
<script
setup
lang="ts"
generic="
From extends Record<PropertyKey, string>,
To extends Record<PropertyKey, string>
"
generic="From extends Record<PropertyKey, string>,
To extends Record<PropertyKey, string>"
>
import { type DeepKeys } from "@tanstack/vue-form"
import { Array as A, Order, pipe } from "effect-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
<script
setup
lang="ts"
generic="
From extends Record<PropertyKey, any>,
generic="From extends Record<PropertyKey, any>,
To extends Record<PropertyKey, any>,
Name extends DeepKeys<From>
"
Name extends DeepKeys<From>"
>
import { type DeepKeys } from "@tanstack/vue-form"
import { inject } from "vue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
<script
setup
lang="ts"
generic="
From extends Record<PropertyKey, any>,
generic="From extends Record<PropertyKey, any>,
To extends Record<PropertyKey, any>,
K extends keyof OmegaFormState<From, To> = keyof OmegaFormState<From, To>,
Props = DefaultInputProps<From>
"
Props = DefaultInputProps<From>"
>
/**
* Form component that wraps TanStack Form's useForm hook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const createUseFormWithCustomInput = (CustomInputComponent: Component) =>
// Override the default slot that OmegaInternalInput provides
default: <TName extends DeepKeys<From>>(inputProps: InputProps<From, TName>) => {
// If we receive inputProps from OmegaInternalInput, use our custom component
if (inputProps && 'field' in inputProps) {
if (inputProps && "field" in inputProps) {
return h(CustomInputComponent, {
inputProps,
vuetifyValue: inputProps.field.state.value
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-components/stories/OmegaForm/CustomInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:name="inputProps.name"
:value="inputProps.field.state.value"
@change="(e: any) => inputProps.field.handleChange(e.target.value)"
></input>
>
</div>
</template>

Expand Down
5 changes: 4 additions & 1 deletion packages/vue/test/stubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export const fakeIntlLayer = (messages: Record<string, string> | Record<string,
return {
locale,
intl,
trans: (id, values) => intl.formatMessage({ id }, values)
trans: (id, values) => intl.formatMessage({ id }, values),
get formatMessage() {
return intl.formatMessage
}
} as ReturnType<MakeIntlReturn<string>["useIntl"]>
})
)
Expand Down