Sync 3 upstream commits from common-v8: workspace deps, export reordering, test mocking#15
Conversation
Adapted from upstream e57edbe to use workspace:* for @evolu/* packages. Used explicit React versions (^19.2.3) instead of catalog:react19 since Bun doesn't support pnpm catalogs. Skipped pnpm-lock.yaml as we use bun.lockb.
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
|
@copilot Fixni poslední failing CI |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/web/test/Task.test.ts (1)
78-88:⚠️ Potential issue | 🟡 MinorRemove non‑null assertion on
addedListeners.get("unhandledrejection").
Same lint violation; assert presence and narrow before invocation.🔧 Suggested fix
- const handler = addedListeners.get("unhandledrejection")!; - handler( + const handler = addedListeners.get("unhandledrejection"); + expect(handler).toBeDefined(); + handler?.( new PromiseRejectionEvent("unhandledrejection", { promise: Promise.resolve(), reason: new Error("test rejection"), }), );
🤖 Fix all issues with AI agents
In `@packages/web/test/Task.test.ts`:
- Around line 61-67: The test currently uses a non-null assertion on
addedListeners.get("error") — replace the `!` with an explicit
runtime/type-narrowing assertion: retrieve the value into `handler`, assert it
is defined (e.g., `if (!handler) throw new Error("error handler not
registered")` or an `expect(handler).toBeDefined()`), then call `handler(new
ErrorEvent(...))`; update references to `addedListeners.get("error")` and the
`handler` variable in the "error handler logs ErrorEvent" test to remove the `!`
and perform the explicit check before invoking.
| test("error handler logs ErrorEvent", async () => { | ||
| const console = testCreateConsole(); | ||
| await using _run = createRunner({ console }); | ||
|
|
||
| globalThis.dispatchEvent( | ||
| new ErrorEvent("error", { error: new Error("test error") }), | ||
| ); | ||
| const handler = addedListeners.get("error")!; | ||
| handler(new ErrorEvent("error", { error: new Error("test error") })); | ||
|
|
There was a problem hiding this comment.
Remove non‑null assertion on addedListeners.get("error").
Lint flags ! here; use an explicit assertion to narrow the type before calling the handler.
🔧 Suggested fix
- const handler = addedListeners.get("error")!;
- handler(new ErrorEvent("error", { error: new Error("test error") }));
+ const handler = addedListeners.get("error");
+ expect(handler).toBeDefined();
+ handler?.(new ErrorEvent("error", { error: new Error("test error") }));🧰 Tools
🪛 GitHub Actions: CI
[warning] 65-65: lint/style/noNonNullAssertion: Forbidden non-null assertion. Consider avoiding the '!' postfix operator.
🤖 Prompt for AI Agents
In `@packages/web/test/Task.test.ts` around lines 61 - 67, The test currently uses
a non-null assertion on addedListeners.get("error") — replace the `!` with an
explicit runtime/type-narrowing assertion: retrieve the value into `handler`,
assert it is defined (e.g., `if (!handler) throw new Error("error handler not
registered")` or an `expect(handler).toBeDefined()`), then call `handler(new
ErrorEvent(...))`; update references to `addedListeners.get("error")` and the
`handler` variable in the "error handler logs ErrorEvent" test to remove the `!`
and perform the explicit check before invoking.
There was a problem hiding this comment.
@copilot Podívej se jestli je to validní a případně fixni
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
Všechny React verze jsou již srovnány na 19.2.4 napříč celým workspace:
Upstream používá Mám změnit na jinou verzi? Nebo potřebuješ jiný typ srovnání? |
Sync upstream/common-v8 commits do copilot/sync-merge-upstream-03-02-26
✅ Dokončeno
📊 Souhrn změn
13 souborů změněno: 41 přidání(+), 73 odebrání(-)
✅ Ověření
createRunnerjiž implementován vpackages/web/src/Task.ts🔧 Opravy
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Summary by CodeRabbit
Release Notes