Skip to content

feat!: target the Elysia 2 open beta on the next release line - #371

Draft
PunGrumpy wants to merge 3 commits into
mainfrom
claude/elysia-v2-open-beta-i2faib
Draft

feat!: target the Elysia 2 open beta on the next release line#371
PunGrumpy wants to merge 3 commits into
mainfrom
claude/elysia-v2-open-beta-i2faib

Conversation

@PunGrumpy

@PunGrumpy PunGrumpy commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Elysia 2 "DayDream" renamed every lifecycle method and left no aliases,
so the plugin cannot support 1.4 and 2.x from one build. This branch
becomes the pre-release line published under the npm next dist-tag,
while 6.x stays on latest for Elysia 1.4.

Now retargeted from 2.0.0-beta.2 to 2.0.0-beta.11 and rebased-by-merge
onto current main (sampling/enrichers, observability adapters, typed fields).

Plugin:

  • setup/request/afterHandle/error replace onStart/onRequest/onAfterHandle/onError;
    afterHandle reads responseValue (the deprecated response context alias was removed)
  • .as('plugin') replaces .as('scoped')
  • Logixlysia resolves to Elysia<'', 'local', LogixlysiaSingleton>; Elysia 2
    inserts Scope as the second type parameter and dropped the resolve slot
    from SingletonBase along with the resolve lifecycle
  • wrapWs follows the merged WS context (ws.store, not ws.data.store) and
    forwards close codes/reasons
  • validation errors are normalized for the TypeBox 1.x shape: the failed property
    path now comes from schemaPath, the 1.4 code: 'VALIDATION' discriminant is
    replaced by status: 422 + all, and logErrorPayload surfaces error.value
    explicitly since Elysia 2 no longer embeds the payload in the message
  • peers move to elysia >= 2.0.0-beta.11 and typescript >= 5.7.0; workspace deps
    are pinned exactly because ^2.0.0-beta.x also matches the newer 2.0.0-exp.x
    prerelease line

Workspace:

  • route hooks/schema move before the handler (Elysia 2 parameter swap)
  • node adapter moves to @elysia/node with its named node() export
  • .ws() needs the opt-in elysia/websocket capability before wrapWs has a route
  • the example app's OpenAPI/Scalar page returns via @elysia/openapi@next, which
    now ships for Elysia 2 (previously parked)
  • the evlog and bogeychan plugin-path benchmarks stay parked (both still declare
    an Elysia 1 peer); their raw-logger benchmarks are unaffected
  • root pins exact-mirror ^1.2.2 so the hoisted copy satisfies Elysia 2 rather
    than the nested Elysia 1.4.29 that evlog/bogeychan bring along

Release:

  • changesets enters pre mode with tag next (initial version 6.8.0), and the
    release workflow also publishes from a next branch; the production docs
    deploy stays pinned to main

Validated: typecheck across all packages, 375 tests passing, lint clean, and a
runtime smoke test of the example app on beta.11 (access logs, context tree,
WebSocket echo through wrapWs, Scalar page, RFC 9457 error responses).

BREAKING CHANGE: requires Elysia >= 2.0.0-beta.11. Elysia 1.4 users stay on
logixlysia 6.x from the latest tag.

Elysia 2 "DayDream" renamed every lifecycle method and left no aliases,
so the plugin cannot support 1.4 and 2.x from one build. This branch
becomes the pre-release line published under the npm `next` dist-tag,
while 6.x stays on `latest` for Elysia 1.4.

Plugin:
- setup/request/afterHandle/error replace onStart/onRequest/onAfterHandle/onError
- .as('plugin') replaces .as('scoped')
- Logixlysia resolves to Elysia<'', 'local', LogixlysiaSingleton>; Elysia 2
  inserts Scope as the second type parameter and dropped the `resolve` slot
  from SingletonBase along with the resolve lifecycle
- peers move to elysia >= 2.0.0-beta.2 and typescript >= 5.7.0

Workspace:
- node adapter moves to @elysia/node with its named `node()` export
- .ws() needs the opt-in `elysia/websocket` provider before wrapWs has a route
- the example app parks its OpenAPI plugin until one ships for Elysia 2
- the evlog and bogeychan plugin benchmarks are parked for the same reason

Release:
- changesets enters pre mode with tag `next`, and pushes to a `next` branch
  publish; the production docs deploy stays pinned to main

BREAKING CHANGE: requires Elysia >= 2.0.0-beta.2. Elysia 1.4 users stay on
logixlysia 6.x from the `latest` tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LrjUCbdtJenBTJUYo6XQo5
@codesandbox

codesandbox Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d0461d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
logixlysia Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
logixlysia Ready Ready Preview Aug 31, 2026 7:01am

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds Elysia 2 beta support. It updates Logixlysia lifecycle integration, types, WebSocket setup, package requirements, documentation, tests, benchmarks, and prerelease publishing.

Changes

Elysia 2 support

Layer / File(s) Summary
Logixlysia Elysia 2 integration
packages/logixlysia/src/index.ts, packages/logixlysia/package.json
Updates lifecycle hooks, plugin scope, exported types, peer dependencies, TypeScript requirements, and the npm next tag.
Application and WebSocket migration
apps/elysia/package.json, apps/elysia/src/index.ts, apps/elysia/src/routers/*
Upgrades Elysia, removes Swagger setup, registers the WebSocket provider, and uses the renamed request hook.
Compatibility validation and benchmarks
packages/logixlysia/__tests__/*, packages/bench/*
Updates adapter and WebSocket tests for Elysia 2 and removes incompatible benchmark integrations.
Documentation and prerelease distribution
.changeset/*, .github/workflows/release.yml, apps/docs/content/*, packages/logixlysia/README.md
Documents Elysia 2 compatibility and migration details, and configures next prerelease publishing.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ElysiaApp
  participant Logixlysia
  participant Request
  ElysiaApp->>Logixlysia: Register plugin with as('plugin')
  ElysiaApp->>Logixlysia: Run setup
  Request->>Logixlysia: Run request hook
  Logixlysia->>Request: Initialize request context and request ID
  Request->>Logixlysia: Run afterHandle or error hook
Loading

Possibly related PRs

Suggested labels: enhancement, monorepo, website

Poem

A rabbit hops through hooks anew,
With request and error in view.
WebSockets join the beta stream,
While next packages chase the dream.
The burrow’s docs now point the way.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: targeting the Elysia 2 open beta on the next release line. It is concise and specific.
Description check ✅ Passed The description gives detailed technical, workspace, release, compatibility, validation, and breaking-change information. It does not include the template's explicit Related Issues or Checklist sectio…
Full details: Description check

Explanation

The description gives detailed technical, workspace, release, compatibility, validation, and breaking-change information. It does not include the template's explicit Related Issues or Checklist sections, but the description is otherwise complete and directly related to the changes.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/elysia-v2-open-beta-i2faib

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added source 🏠 Source code files test 🧪 Test files ci/cd 🤡 CI/CD files config ⚙️ Configuration files docs 📃 Documentation files changeset 📏 An intent to release a set of packages labels Aug 9, 2026
@coderabbitai coderabbitai Bot added enhancement 💫 New feature or request monorepo website 🌐 Website labels Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/docs/content/integrations/otel.mdx (1)

15-24: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Import Elysia in the OpenTelemetry example.

The example uses new Elysia() but only imports logixlysia and injectTraceContext, so the code sample will not run.

Proposed fix
+import { Elysia } from 'elysia'
 import logixlysia from 'logixlysia'
 import { injectTraceContext } from 'logixlysia/otel'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/integrations/otel.mdx` around lines 15 - 24, Add the
missing Elysia import to the OpenTelemetry example so the existing new Elysia()
initialization is defined and runnable, without changing the plugin or
request-handler logic.
apps/docs/content/examples.mdx (1)

207-220: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not expose error.message from the custom handler.

A custom Elysia error handler controls the response message for production environments, so returning error.message can expose internal error details. Return a stable public message, or map only safe, allowlisted messages.

Proposed fix
-    error: error.message,
+    error: 'Request failed',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/examples.mdx` around lines 207 - 220, Update the custom
error handler around app.error so its response no longer returns error.message.
Return a stable public-safe error message, or select only from an explicit
allowlist, while preserving the existing status code and server-side pino
logging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Line 60: Update the Vercel deployment condition in the release workflow to run
for published Changesets from the next release branch as well as main, removing
the github.ref == 'refs/heads/main' restriction while preserving the published
check.

In `@apps/docs/content/faq.mdx`:
- Around line 31-38: Update the installation commands in the FAQ to include both
logixlysia@next and elysia@next, for both the bun add and npm install examples,
so fresh installs include the required Elysia 2 dependency.

---

Outside diff comments:
In `@apps/docs/content/examples.mdx`:
- Around line 207-220: Update the custom error handler around app.error so its
response no longer returns error.message. Return a stable public-safe error
message, or select only from an explicit allowlist, while preserving the
existing status code and server-side pino logging.

In `@apps/docs/content/integrations/otel.mdx`:
- Around line 15-24: Add the missing Elysia import to the OpenTelemetry example
so the existing new Elysia() initialization is defined and runnable, without
changing the plugin or request-handler logic.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef1231b0-534f-48d0-ade8-3dfa75742289

📥 Commits

Reviewing files that changed from the base of the PR and between e9a820c and e3d9c05.

📒 Files selected for processing (23)
  • .changeset/elysia-2-open-beta.md
  • .changeset/pre.json
  • .github/workflows/release.yml
  • apps/docs/content/elysia-2.mdx
  • apps/docs/content/examples.mdx
  • apps/docs/content/faq.mdx
  • apps/docs/content/integrations/otel.mdx
  • apps/docs/content/introduction.mdx
  • apps/docs/content/meta.ts
  • apps/docs/content/migration-from-evlog.mdx
  • apps/docs/content/usage.mdx
  • apps/elysia/package.json
  • apps/elysia/src/index.ts
  • apps/elysia/src/routers/index.ts
  • apps/elysia/src/routers/otel.ts
  • packages/bench/index.bench.ts
  • packages/bench/package.json
  • packages/logixlysia/README.md
  • packages/logixlysia/__tests__/integration/demo-app.ts
  • packages/logixlysia/__tests__/integration/demo-routes.test.ts
  • packages/logixlysia/__tests__/plugin/ws-data-types.test.ts
  • packages/logixlysia/package.json
  • packages/logixlysia/src/index.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: security / 🧑‍⚕️ CodeQL Analysis
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

In TypeScript, use explicit function parameter and return types when they improve clarity; prefer unknown over any, use as const for immutable literal values, and rely on type narrowing instead of assertions.

Files:

  • apps/docs/content/meta.ts
  • apps/elysia/src/routers/index.ts
  • apps/elysia/src/routers/otel.ts
  • apps/elysia/src/index.ts
  • packages/logixlysia/__tests__/integration/demo-app.ts
  • packages/logixlysia/__tests__/integration/demo-routes.test.ts
  • packages/logixlysia/__tests__/plugin/ws-data-types.test.ts
  • packages/bench/index.bench.ts
  • packages/logixlysia/src/index.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

**/*.{ts,tsx,js,jsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Keep functions focused and under reasonable cognitive complexity limits
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Group related code together and separate concerns
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use proper image components (e.g., Next.js <Image>) over <img> tags

Files:

  • apps/docs/content/meta.ts
  • apps/elysia/src/routers/index.ts
  • apps/elysia/src/routers/otel.ts
  • apps/elysia/src/index.ts
  • packages/logixlysia/__tests__/integration/demo-app.ts
  • packages/logixlysia/__tests__/integration/demo-routes.test.ts
  • packages/logixlysia/__tests__/plugin/ws-data-types.test.ts
  • packages/bench/index.bench.ts
  • packages/logixlysia/src/index.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,jsx,ts,tsx}: Use meaningful names and extract magic numbers into descriptively named constants.
Use arrow functions for callbacks and short functions; prefer for...of over .forEach() and indexed loops; use optional chaining, nullish coalescing, template literals, and destructuring; use const by default, let only when reassignment is required, and never var.
Await promises in async functions, prefer async/await over promise chains, handle async errors meaningfully with try-catch, and never use async functions as Promise executors.
Remove console.log, debugger, and alert from production code; throw descriptive Error objects rather than strings; avoid catch-and-rethrow blocks; and prefer early returns for error cases.
Keep functions focused, limit cognitive complexity, extract complex conditions into named booleans, reduce nesting with early returns, avoid nested ternaries, and separate related concerns.
Avoid spread syntax in accumulators within loops, create reusable regular expressions outside loops, prefer specific imports over namespace imports, and avoid barrel files that re-export everything.
In Next.js, use next/head or the App Router metadata API for head elements and use Server Components for async data fetching instead of async Client Components.
Ensure business logic, architecture, edge cases, user experience, accessibility, performance, and meaningful naming are correct; document complex logic while preferring self-documenting code.

Files:

  • apps/docs/content/meta.ts
  • apps/elysia/src/routers/index.ts
  • apps/elysia/src/routers/otel.ts
  • apps/elysia/src/index.ts
  • packages/logixlysia/__tests__/integration/demo-app.ts
  • packages/logixlysia/__tests__/integration/demo-routes.test.ts
  • packages/logixlysia/__tests__/plugin/ws-data-types.test.ts
  • packages/bench/index.bench.ts
  • packages/logixlysia/src/index.ts
**/index.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

Avoid barrel files (index files that re-export everything)

Files:

  • apps/elysia/src/routers/index.ts
  • apps/elysia/src/index.ts
  • packages/logixlysia/src/index.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/logixlysia/__tests__/integration/demo-routes.test.ts
  • packages/logixlysia/__tests__/plugin/ws-data-types.test.ts
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Put assertions inside it() or test() blocks, use async/await instead of done callbacks for async tests, never commit .only or .skip, and keep test suites reasonably flat.

Files:

  • packages/logixlysia/__tests__/integration/demo-routes.test.ts
  • packages/logixlysia/__tests__/plugin/ws-data-types.test.ts
🔇 Additional comments (22)
packages/logixlysia/src/index.ts (2)

28-46: LGTM!

Also applies to: 130-130, 141-141, 180-180, 197-197


121-129: LGTM!

packages/logixlysia/package.json (1)

58-67: LGTM!

Also applies to: 79-80

apps/elysia/package.json (1)

11-11: LGTM!

apps/elysia/src/index.ts (1)

4-8: LGTM!

apps/elysia/src/routers/index.ts (1)

2-2: LGTM!

Also applies to: 42-43

apps/elysia/src/routers/otel.ts (1)

6-8: LGTM!

packages/logixlysia/__tests__/integration/demo-app.ts (1)

31-33: LGTM!

packages/logixlysia/__tests__/integration/demo-routes.test.ts (1)

2-2: LGTM!

Also applies to: 81-83

packages/logixlysia/__tests__/plugin/ws-data-types.test.ts (1)

3-9: LGTM!

Also applies to: 19-19

packages/bench/index.bench.ts (1)

1-1: LGTM!

Also applies to: 162-164

packages/bench/package.json (1)

13-13: LGTM!

.changeset/elysia-2-open-beta.md (1)

1-18: LGTM!

.github/workflows/release.yml (1)

7-8: LGTM!

apps/docs/content/elysia-2.mdx (1)

1-79: LGTM!

apps/docs/content/faq.mdx (1)

40-46: LGTM!

apps/docs/content/introduction.mdx (1)

33-40: LGTM!

apps/docs/content/meta.ts (1)

6-6: LGTM!

apps/docs/content/migration-from-evlog.mdx (1)

65-65: LGTM!

apps/docs/content/usage.mdx (1)

9-13: LGTM!

packages/logixlysia/README.md (1)

9-17: LGTM!

.changeset/pre.json (1)

1-12: 🗄️ Data Integrity & Integration

No change needed for pre.json branch isolation.

origin/main:.changeset/pre.json is absent, and the release workflow only reads the checked-out .changeset/pre.json from the branch that runs it.

NPM_TOKEN: "" # Workaround for https://github.com/changesets/action/pull/545
- name: ▲ Deploy to Vercel
if: steps.changesets.outputs.published == 'true'
if: ${{ steps.changesets.outputs.published == 'true' && github.ref == 'refs/heads/main' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git fetch --no-tags origin main
git show origin/main:apps/docs/content/elysia-2.mdx >/dev/null
git show origin/main:apps/docs/content/meta.ts | rg -n "'elysia-2'"

Repository: PunGrumpy/logixlysia

Length of output: 339


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow release.yml excerpt =="
sed -n '45,70p' .github/workflows/release.yml 2>/dev/null || true

echo
echo "== tracked docs meta files =="
find . -path './.git' -prune -o -path './node_modules' -prune -o -type f \( -name 'meta.ts' -o -name 'meta.*' \) -print | sort

echo
echo "== elysia-2 references =="
rg -n "elysia-2|Elysia 2|next" apps docs README.md .github/workflows 2>/dev/null || true

Repository: PunGrumpy/logixlysia

Length of output: 3982


Deploy the Elysia 2 docs with next releases.

apps/docs/content/elysia-2.mdx is present locally and listed in apps/docs/content/meta.ts, but it is not in origin/main; the Vercel step only runs on main. A package published from next will expose /docs/elysia-2 on the release line while the deployed main docs page remains unavailable. Remove the main branch requirement or deploy the next docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 60, Update the Vercel deployment
condition in the release workflow to run for published Changesets from the next
release branch as well as main, removing the github.ref == 'refs/heads/main'
restriction while preserving the published check.

Comment thread apps/docs/content/faq.mdx
Comment on lines +31 to 38
bun add logixlysia@next
```

Or with npm:

```bash
npm install logixlysia
npm install logixlysia@next
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | sed -n '1,120p'

echo "== target file excerpt =="
if [ -f apps/docs/content/faq.mdx ]; then
  nl -ba apps/docs/content/faq.mdx | sed -n '1,80p'
fi

echo "== search elysia/logixlysia references =="
rg -n "logixlysia|elysia|Elysia|logixlysia@next|elysia@next" apps/docs/package.json apps/docs/content/faq.mdx apps/docs 2>/dev/null | sed -n '1,200p'

echo "== package files =="
git ls-files | grep -E 'package\.json$' | sed -n '1,80p'
for f in $(git ls-files | grep -E 'package\.json$'); do
  echo "--- $f"
  sed -n '1,220p' "$f"
done

Repository: PunGrumpy/logixlysia

Length of output: 4049


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target excerpt =="
python3 - <<'PY'
from pathlib import Path
p = Path("apps/docs/content/faq.mdx")
for i, line in enumerate(p.read_text().splitlines(), 1):
    if 31 <= i <= 38:
        print(f"{i:4d}: {line}")
PY

echo "== nearby Elysia 2 docs excerpt =="
python3 - <<'PY'
from pathlib import Path
p = Path("apps/docs/content/elysia-2.mdx")
lines = p.read_text().splitlines()
for i in range(1, min(len(lines), 220) + 1):
    print(f"{i:4d}: {lines[i-1]}")
PY

echo "== search package references =="
python3 - <<'PY'
import re
from pathlib import Path
for p in Path(".").rglob("package.json"):
    if ".git" in p.parts:
        continue
    try:
        data = eval(p.read_text(), {"__builtins__": None})
    except Exception:
        continue
    deps = {}
    for k in ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]:
        deps.update(data.get(k, {}) or {})
    hits = {k:v for k,v in deps.items() if k in {"logixlysia", "elysia"}}
    if hits:
        print(f"{p}: {hits}")
PY

echo "== search logixlysia/install wording =="
rg -n "logixlysia|Elysia 2|elysia@next|logixlysia@next|bun add|npm install" apps/docs/content apps/elysia apps/docs -g '*.mdx' -g '*.ts' -g '*.json' 2>/dev/null | sed -n '1,240p'

Repository: PunGrumpy/logixlysia

Length of output: 22185


Install Elysia 2 with both package-manager commands.

Lines 31-37 install only logixlysia@next, but the next tag also requires Elysia >=2.0.0-beta.2. Add elysia@next to both commands so fresh installs include the required framework dependency.

Proposed fix
-bun add logixlysia@next
+bun add logixlysia@next elysia@next
...
-npm install logixlysia@next
+npm install logixlysia@next elysia@next
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bun add logixlysia@next
```
Or with npm:
```bash
npm install logixlysia
npm install logixlysia@next
```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/faq.mdx` around lines 31 - 38, Update the installation
commands in the FAQ to include both logixlysia@next and elysia@next, for both
the bun add and npm install examples, so fresh installs include the required
Elysia 2 dependency.

@github-actions github-actions Bot added the conflict ⚠️ Two separate branches have made edits to the same line in a file label Aug 9, 2026
@PunGrumpy
PunGrumpy marked this pull request as draft August 30, 2026 10:13
claude added 2 commits August 31, 2026 05:21
Elysia 2 "DayDream" renamed every lifecycle method with no aliases left
behind, so the plugin cannot support 1.4 and 2.x from one build. This
branch becomes the pre-release line published under the npm `next`
dist-tag, while 6.x stays on `latest` for Elysia 1.4.

Plugin:
- setup/request/afterHandle/error replace onStart/onRequest/
  onAfterHandle/onError; afterHandle reads `responseValue` (the
  deprecated `response` context alias was removed)
- .as('plugin') replaces .as('scoped')
- Logixlysia resolves to Elysia<'', 'local', LogixlysiaSingleton>;
  Elysia 2 inserts Scope as the second type parameter and dropped the
  `resolve` slot from SingletonBase along with the resolve lifecycle
- wrapWs follows the merged WS context (`ws.store`, not `ws.data.store`)
  and forwards close codes/reasons
- validation errors are normalized for the TypeBox 1.x shape: the failed
  property path now comes from `schemaPath`, the 1.4 `code: 'VALIDATION'`
  discriminant is replaced by `status: 422` + `all`, and
  `logErrorPayload` surfaces `error.value` explicitly since Elysia 2 no
  longer embeds the payload in the message
- peers move to elysia >= 2.0.0-beta.11 and typescript >= 5.7.0; deps
  are pinned exactly because `^2.0.0-beta.x` also matches the newer
  `2.0.0-exp.x` prerelease line

Workspace:
- route hooks/schema move before the handler (Elysia 2 parameter swap)
- the node adapter moves to @elysia/node with its named `node()` export
- .ws() needs the opt-in `elysia/websocket` capability before wrapWs has
  a route
- the example app's OpenAPI page returns via @elysia/openapi (Scalar),
  which now ships for Elysia 2
- the evlog and bogeychan plugin-path benchmarks stay parked (both still
  declare an Elysia 1 peer); their raw-logger benchmarks are unaffected
- root pins exact-mirror ^1.2.2 so the hoisted copy satisfies Elysia 2
  rather than the nested Elysia 1.4.29 that evlog/bogeychan bring along

Release:
- changesets enters pre mode with tag `next`, and the release workflow
  also publishes from a `next` branch; the production docs deploy stays
  pinned to main

BREAKING CHANGE: requires Elysia >= 2.0.0-beta.11. Elysia 1.4 users stay
on logixlysia 6.x from the `latest` tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DRztm3JB5S4cCoskDPP8s9
…sia 2.0.0-beta.11

Brings the PR up to date with main and replaces the beta.2-era migration
with the revalidated beta.11 one. Conflicts are resolved wholesale to the
incoming branch, whose tree is the validated end state (typecheck across
all packages, 375 tests, lint, and a runtime smoke test of the example
app including the WebSocket echo and the restored OpenAPI page).

Beyond the original beta.2 work this picks up: the route parameter swap
(hooks before handler), the merged WS context (`ws.store`, not
`ws.data.store`), `responseValue` in afterHandle, TypeBox 1.x validation
error normalization, exact version pins (a `^2.0.0-beta.x` range also
matches the newer `2.0.0-exp.x` line), the root `exact-mirror ^1.2.2`
pin, and the example app's OpenAPI page via `@elysia/openapi`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DRztm3JB5S4cCoskDPP8s9
@mintlify

mintlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
logixlysia 🟢 Ready View Preview Aug 31, 2026, 7:02 AM

@github-actions github-actions Bot removed the conflict ⚠️ Two separate branches have made edits to the same line in a file label Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎬 Playground terminal recording

terminal recording

MP4 · PNG

VHS drove apps/elysia at d0461d4 in a real PTY and asserted that logixlysia still prints:

  • the start banner, then a plain 200 request line
  • the per-request context tree on /checkout
  • [REDACTED] for the card, e-mail, IP and JWT on /auto-redact
  • WARNING on /status/404 and a red ERROR on /boom
  • AI token metrics on POST /chat

@github-actions github-actions Bot added the conflict ⚠️ Two separate branches have made edits to the same line in a file label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changeset 📏 An intent to release a set of packages ci/cd 🤡 CI/CD files config ⚙️ Configuration files conflict ⚠️ Two separate branches have made edits to the same line in a file docs 📃 Documentation files enhancement 💫 New feature or request monorepo source 🏠 Source code files test 🧪 Test files website 🌐 Website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants