refactor(apps): drop Deno specific APIs in deno-runtime#41125
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## chore/deno-runtime-imports #41125 +/- ##
===========================================================
Coverage 69.15% 69.15%
===========================================================
Files 3433 3433
Lines 132323 132323
Branches 23075 23095 +20
===========================================================
Hits 91502 91502
- Misses 37468 37471 +3
+ Partials 3353 3350 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Reduce the platform-specific surface in deno-runtime by aligning six drifted files with their canonical node-runtime implementations, ahead of extracting a shared base runtime: - messenger/main: use node:events EventEmitter for the RPC response observer instead of EventTarget + Custom/ErrorEvent - parseArgs: use node:util instead of @std/cli (drop dead @std/cli dep) - BlockBuilder: extend apps-engine BlockBuilder instead of duplicating it (enabled by sloppy-imports) - handleUploadEvents: read uploads via node:fs/promises readFile + Buffer - logger: implement ILogger with the full accessor surface - accessors/mod: extract named WithProxy<T> consts No behavior change intended. deno task test stays green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ntime
Emit the same JSON-RPC notification shape node-runtime uses for
uncaught errors: method is the origin ('uncaughtException' /
'unhandledRejection') and params is [error.stack || error], instead of
the richer { type, message, filename, ... } / { type, reason, timestamp }
objects. The addEventListener registration mechanism stays as the
remaining genuine platform difference.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the hand-written acorn.d.ts / acorn-walk.d.ts declaration shims and use the real acorn / acorn-walk package types, matching node-runtime: - ast/operations.ts, ast/mod.ts: remove @deno-types comments, import the real exports (FullAncestorWalkerCallback, AnyNode, Node, ...) - ast/tests: import acorn types from the package; ast_blocks fixtures spread { start, end } to satisfy the real node types - bump acorn 8.10.0 -> 8.17.0 and acorn-walk 8.2.0 -> 8.3.5 to match the versions node-runtime resolves (AnyNode only exists in newer acorn) - set compilerOptions.strict: false to match node-runtime's tsconfig, as the real acorn-walk callback types are looser than the deleted shim deno task test stays green (21 passed); deno check on the AST files is clean. No behavior change intended. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments