Upgrade to 🦕 Deno 2.1#107
Conversation
* fix(ext/core): missing `Supabase` namespace * chore: update `global.d.ts` * chore: update `deno.json`
…/tracing` feature flag is not enabled (#469) * fix(ext/event_worker): add a feature flag * chore(cli): update `Cargo.toml` * chore: update `Cargo.lock`
* fix: allow setting static patterns when creating a user worker * fix: clippy * fix: make static_patterns optional * formatting * Trigger Build
* fix: Use entrypoint path as static file root when available. * fix(graph): don't spawn tasks in the current runtime * fix: fmt * stamp: typing * stamp(graph): use semaphore to ensure strong count is exactly one --------- Co-authored-by: Nyannyacha <meow@nnc.gg>
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the codebase to support Deno 2.1, involving extensive formatting improvements and test case updates to align with modern Deno standards and practices.
- Updates test case files to use modern JavaScript/TypeScript formatting conventions
- Removes deprecated main worker implementations and updates configurations
- Migrates from
assertsyntax towithsyntax for JSON imports - Adds comprehensive test infrastructure for ESZip migration testing
Reviewed Changes
Copilot reviewed 235 out of 1660 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/base/tests/eszip_migration.rs | New comprehensive test suite for ESZip migration functionality |
| Multiple test case files | Formatting updates including arrow function syntax, proper indentation, and trailing commas |
| JSX test configurations | Addition of deno.jsonc files with modern JSX configuration |
| CommonJS test cases | New test cases for CommonJS workspace and package configurations |
| AI/ML test cases | Updates to transformers.js test cases with improved formatting |
| Main worker files | Removal of deprecated decorator and JSX server implementations |
Files not reviewed (1)
- crates/base/test_cases/cjs_with_pkg_json/package-lock.json: Language not supported
| console.error(err) | ||
| return new Response(String(err?.message ?? err), { status: 500 }) | ||
| console.error(err); | ||
| return new Response(String(err?.message ?? err), { status: 500 }); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 12 months ago
To fix the issue, we will replace the exposed error message with a generic error message for the user, such as "An internal server error occurred." The detailed error (including the stack trace) will be logged to the server console for debugging purposes. This ensures that sensitive information is not exposed to the user while still allowing developers to diagnose issues.
Changes to be made:
- Replace the
String(err?.message ?? err)in theResponsewith a generic error message. - Log the detailed error (
err) to the server console for debugging.
| @@ -38,4 +38,4 @@ | ||
| } catch (err) { | ||
| console.error(err); | ||
| return new Response(String(err?.message ?? err), { status: 500 }); | ||
| console.error("An error occurred:", err); | ||
| return new Response("An internal server error occurred.", { status: 500 }); | ||
| } |
No description provided.