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
9 changes: 2 additions & 7 deletions apps/relay/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ ENV PATH="$BUN_HOME:$PATH"

FROM base AS builder
WORKDIR /app
RUN bun install -g turbo
COPY . .

# Generate a partial monorepo with a pruned lockfile for the relay workspace
RUN turbo prune @evolu/relay --docker
RUN bunx turbo@2.8.2 prune @evolu/relay --docker

# ------------------------------------------------------------
# Installer stage - build the pruned workspace
FROM base AS installer
WORKDIR /app

# Install pnpm and turbo (Wait, we want bun)
# RUN corepack enable pnpm # Removed
RUN bun install -g turbo

# Install dependencies from pruned lockfile
COPY --from=builder /app/out/json/ .
RUN bun install --frozen-lockfile
Expand All @@ -27,7 +22,7 @@ RUN bun install --frozen-lockfile
COPY --from=builder /app/out/full/ .
# Ensure README.md is available at the root for the build process
COPY --from=builder /app/README.md ./README.md
RUN turbo run build
RUN bunx turbo@2.8.2 run build

# Prune dev dependencies to create a production-ready environment
RUN bun install --production
Expand Down
7 changes: 4 additions & 3 deletions apps/web/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,13 @@ const SearchDialog = ({
setOpen(false);
},
});
const _pathname = usePathname();
const _searchParams = useSearchParams();
const pathname = usePathname();
const searchParams = useSearchParams();

// biome-ignore lint/correctness/useExhaustiveDependencies: Effect should trigger on navigation changes to close dialog
useEffect(() => {
setOpen(false);
}, [setOpen]);
}, [pathname, searchParams, setOpen]);

useEffect(() => {
if (open) {
Expand Down
8 changes: 3 additions & 5 deletions apps/web/src/components/SectionProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ const useVisibleSections = (sectionStore: StoreApi<SectionState>) => {

const SectionStoreContext = createContext<StoreApi<SectionState> | null>(null);

const emptyStore = createSectionStore([]);

const useIsomorphicLayoutEffect =
typeof window === "undefined" ? useEffect : useLayoutEffect;

Expand Down Expand Up @@ -157,9 +159,5 @@ export const useSectionStore = <T,>(
selector: (state: SectionState) => T,
): T => {
const store = useContext(SectionStoreContext);
if (!store) {
return {} as T;
}
// biome-ignore lint/correctness/useHookAtTopLevel: intentional
return useStore(store, selector);
return useStore(store ?? emptyStore, selector);
};
7 changes: 4 additions & 3 deletions packages/common/src/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,15 @@ export type InferTaskDone<T extends Task<any, any, any>> =
/**
* A {@link Task} suitable for use with platform-specific `runMain` functions.
*
* Returns `Disposable`, `AsyncDisposable`, or `undefined`. Returning a disposable
* Returns `Disposable`, `AsyncDisposable`, `void`, or `undefined`. Returning a disposable
* (typically via `stack.move()`) transfers resource ownership to `runMain`,
* main tasks must handle all errors internally.
*
* @group Core Types
*/
export type MainTask<D> = Task<
Disposable | AsyncDisposable | undefined,
// biome-ignore lint/suspicious/noConfusingVoidType: void | undefined allows both ok() and ok(undefined)
Disposable | AsyncDisposable | void | undefined,
never,
RunnerDeps & D
>;
Expand Down Expand Up @@ -3358,7 +3359,7 @@ function pool<T, E>(
stopped = result;
abortWorkers(
isErr(result) && AbortError.is(result.error)
? (result.error as any).reason
? result.error.reason
: abortReason,
);
stopSignal?.resolve();
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/local-first/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import type { AppOwner } from "./Owner.js";
import { OwnerId } from "./Owner.js";
import type { Query, Row } from "./Query.js";
import type { CrdtMessage, DbChange } from "./Storage.js";
import { Timestamp, type TimestampBytes } from "./Timestamp.js";
import type { TimestampBytes } from "./Timestamp.js";

/**
* Defines the schema of an Evolu database.
Expand Down