This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@pluv/client@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io has been updated to introduce PluvProcedure, PluvRouter and PluvServer. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { io } from "../backend/io";
const client = createClient<typeof io>({
/* ... */
});
Now:
import { createIO } from "@pluv/io";
import { createPluvHandler, platformNode } from "@pluv/platform-node";
import { z } from "zod";
const io = createIO({
platform: platformNode(),
});
const router = io.router({
SEND_MESSAGE: io.procedure
.input(z.object({ message: z.string() }))
.broadcast(({ message }) => ({
RECEIVE_MESSAGE: { message },
})),
DOUBLE_VALUE: io.procedure
.input(z.object({ value: z.number() }))
.broadcast(({ value }) => ({
VALUE_DOUBLED: { value: value * 2 },
})),
});
export const ioServer = io.server({ router });
const Pluv = createPluvHandler({
io: ioServer, // <- This uses the PluvServer now
/* ... */
});
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { ioServer } from "../backend/io";
// This users the PluvServer type now
const client = createClient<typeof ioServer>({
/* ... */
});
PluvRouter instances can also be merged via the mergeRouters method, which effectively performs an Object.assign of the events object and returns a new PluvRouter with the correct types:
const router = io.mergeRouters(router1, router2);
Patch Changes
06c67be: Added broadcast proxy as a new way to broadcast events.
329dbcd: Narrowed types for user within the session object of an event resolver.
99b5ca9: ## Breaking Changes
@pluv/io has been updated to introduce PluvProcedure, PluvRouter and PluvServer. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { io } from "../backend/io";
const client = createClient<typeof io>({
/* ... */
});
Now:
import { createIO } from "@pluv/io";
import { createPluvHandler, platformNode } from "@pluv/platform-node";
import { z } from "zod";
const io = createIO({
platform: platformNode(),
});
const router = io.router({
SEND_MESSAGE: io.procedure
.input(z.object({ message: z.string() }))
.broadcast(({ message }) => ({
RECEIVE_MESSAGE: { message },
})),
DOUBLE_VALUE: io.procedure
.input(z.object({ value: z.number() }))
.broadcast(({ value }) => ({
VALUE_DOUBLED: { value: value * 2 },
})),
});
export const ioServer = io.server({ router });
const Pluv = createPluvHandler({
io: ioServer, // <- This uses the PluvServer now
/* ... */
});
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { ioServer } from "../backend/io";
// This users the PluvServer type now
const client = createClient<typeof ioServer>({
/* ... */
});
PluvRouter instances can also be merged via the mergeRouters method, which effectively performs an Object.assign of the events object and returns a new PluvRouter with the correct types:
const router = io.mergeRouters(router1, router2);
Patch Changes
Updated dependencies [99b5ca9]
@pluv/types@0.18.0
@pluv/crdt@0.18.0
@pluv/platform-cloudflare@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io has been updated to introduce PluvProcedure, PluvRouter and PluvServer. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { io } from "../backend/io";
const client = createClient<typeof io>({
/* ... */
});
Now:
import { createIO } from "@pluv/io";
import { createPluvHandler, platformNode } from "@pluv/platform-node";
import { z } from "zod";
const io = createIO({
platform: platformNode(),
});
const router = io.router({
SEND_MESSAGE: io.procedure
.input(z.object({ message: z.string() }))
.broadcast(({ message }) => ({
RECEIVE_MESSAGE: { message },
})),
DOUBLE_VALUE: io.procedure
.input(z.object({ value: z.number() }))
.broadcast(({ value }) => ({
VALUE_DOUBLED: { value: value * 2 },
})),
});
export const ioServer = io.server({ router });
const Pluv = createPluvHandler({
io: ioServer, // <- This uses the PluvServer now
/* ... */
});
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { ioServer } from "../backend/io";
// This users the PluvServer type now
const client = createClient<typeof ioServer>({
/* ... */
});
PluvRouter instances can also be merged via the mergeRouters method, which effectively performs an Object.assign of the events object and returns a new PluvRouter with the correct types:
const router = io.mergeRouters(router1, router2);
Patch Changes
Updated dependencies [428c21c]
Updated dependencies [329dbcd]
Updated dependencies [99b5ca9]
@pluv/io@0.18.0
@pluv/types@0.18.0
@pluv/platform-node@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io has been updated to introduce PluvProcedure, PluvRouter and PluvServer. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { io } from "../backend/io";
const client = createClient<typeof io>({
/* ... */
});
Now:
import { createIO } from "@pluv/io";
import { createPluvHandler, platformNode } from "@pluv/platform-node";
import { z } from "zod";
const io = createIO({
platform: platformNode(),
});
const router = io.router({
SEND_MESSAGE: io.procedure
.input(z.object({ message: z.string() }))
.broadcast(({ message }) => ({
RECEIVE_MESSAGE: { message },
})),
DOUBLE_VALUE: io.procedure
.input(z.object({ value: z.number() }))
.broadcast(({ value }) => ({
VALUE_DOUBLED: { value: value * 2 },
})),
});
export const ioServer = io.server({ router });
const Pluv = createPluvHandler({
io: ioServer, // <- This uses the PluvServer now
/* ... */
});
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { ioServer } from "../backend/io";
// This users the PluvServer type now
const client = createClient<typeof ioServer>({
/* ... */
});
PluvRouter instances can also be merged via the mergeRouters method, which effectively performs an Object.assign of the events object and returns a new PluvRouter with the correct types:
const router = io.mergeRouters(router1, router2);
Patch Changes
Updated dependencies [428c21c]
Updated dependencies [329dbcd]
Updated dependencies [99b5ca9]
@pluv/io@0.18.0
@pluv/types@0.18.0
@pluv/react@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io has been updated to introduce PluvProcedure, PluvRouter and PluvServer. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { io } from "../backend/io";
const client = createClient<typeof io>({
/* ... */
});
Now:
import { createIO } from "@pluv/io";
import { createPluvHandler, platformNode } from "@pluv/platform-node";
import { z } from "zod";
const io = createIO({
platform: platformNode(),
});
const router = io.router({
SEND_MESSAGE: io.procedure
.input(z.object({ message: z.string() }))
.broadcast(({ message }) => ({
RECEIVE_MESSAGE: { message },
})),
DOUBLE_VALUE: io.procedure
.input(z.object({ value: z.number() }))
.broadcast(({ value }) => ({
VALUE_DOUBLED: { value: value * 2 },
})),
});
export const ioServer = io.server({ router });
const Pluv = createPluvHandler({
io: ioServer, // <- This uses the PluvServer now
/* ... */
});
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { ioServer } from "../backend/io";
// This users the PluvServer type now
const client = createClient<typeof ioServer>({
/* ... */
});
PluvRouter instances can also be merged via the mergeRouters method, which effectively performs an Object.assign of the events object and returns a new PluvRouter with the correct types:
const router = io.mergeRouters(router1, router2);
07a7725: Added broadcast proxy as a new way to broadcast events to other users.
@pluv/io has been updated to introduce PluvProcedure, PluvRouter and PluvServer. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { io } from "../backend/io";
const client = createClient<typeof io>({
/* ... */
});
Now:
import { createIO } from "@pluv/io";
import { createPluvHandler, platformNode } from "@pluv/platform-node";
import { z } from "zod";
const io = createIO({
platform: platformNode(),
});
const router = io.router({
SEND_MESSAGE: io.procedure
.input(z.object({ message: z.string() }))
.broadcast(({ message }) => ({
RECEIVE_MESSAGE: { message },
})),
DOUBLE_VALUE: io.procedure
.input(z.object({ value: z.number() }))
.broadcast(({ value }) => ({
VALUE_DOUBLED: { value: value * 2 },
})),
});
export const ioServer = io.server({ router });
const Pluv = createPluvHandler({
io: ioServer, // <- This uses the PluvServer now
/* ... */
});
// frontend/pluv.ts
import { createClient } from "@pluv/react";
import type { ioServer } from "../backend/io";
// This users the PluvServer type now
const client = createClient<typeof ioServer>({
/* ... */
});
PluvRouter instances can also be merged via the mergeRouters method, which effectively performs an Object.assign of the events object and returns a new PluvRouter with the correct types:
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@pluv/client@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io
has been updated to introducePluvProcedure
,PluvRouter
andPluvServer
. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.Before:
Now:
PluvRouter
instances can also be merged via themergeRouters
method, which effectively performs anObject.assign
of the events object and returns a newPluvRouter
with the correct types:Patch Changes
06c67be: Added broadcast proxy as a new way to broadcast events.
df1342c: Added event proxy as a new way to listen to events.
Updated dependencies [99b5ca9]
@pluv/io@0.18.0
Minor Changes
428c21c: Added broadcast proxy as a new way to broadcast events to a room.
329dbcd: Narrowed types for
user
within the session object of an event resolver.99b5ca9: ## Breaking Changes
@pluv/io
has been updated to introducePluvProcedure
,PluvRouter
andPluvServer
. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.Before:
Now:
PluvRouter
instances can also be merged via themergeRouters
method, which effectively performs anObject.assign
of the events object and returns a newPluvRouter
with the correct types:Patch Changes
@pluv/platform-cloudflare@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io
has been updated to introducePluvProcedure
,PluvRouter
andPluvServer
. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.Before:
Now:
PluvRouter
instances can also be merged via themergeRouters
method, which effectively performs anObject.assign
of the events object and returns a newPluvRouter
with the correct types:Patch Changes
@pluv/platform-node@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io
has been updated to introducePluvProcedure
,PluvRouter
andPluvServer
. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.Before:
Now:
PluvRouter
instances can also be merged via themergeRouters
method, which effectively performs anObject.assign
of the events object and returns a newPluvRouter
with the correct types:Patch Changes
@pluv/react@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io
has been updated to introducePluvProcedure
,PluvRouter
andPluvServer
. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.Before:
Now:
PluvRouter
instances can also be merged via themergeRouters
method, which effectively performs anObject.assign
of the events object and returns a newPluvRouter
with the correct types:07a7725: Added broadcast proxy as a new way to broadcast events to other users.
Patch Changes
e587c18: Added event proxy as a new way to listen to events.
Updated dependencies [06c67be]
Updated dependencies [99b5ca9]
Updated dependencies [df1342c]
@pluv/types@0.18.0
Minor Changes
99b5ca9: ## Breaking Changes
@pluv/io
has been updated to introducePluvProcedure
,PluvRouter
andPluvServer
. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.Before:
Now:
PluvRouter
instances can also be merged via themergeRouters
method, which effectively performs anObject.assign
of the events object and returns a newPluvRouter
with the correct types:@pluv/addon-indexeddb@0.18.0
Patch Changes
@pluv/crdt@0.18.0
Patch Changes
@pluv/crdt-loro@0.18.0
Patch Changes
@pluv/crdt-yjs@0.18.0
Patch Changes
@pluv/persistance-redis@0.18.0
Patch Changes
@pluv/pubsub-redis@0.18.0
Patch Changes
pluv@0.18.0
eslint-config-pluv@0.18.0
@pluv/tsconfig@0.18.0