Skip to content

Upgrade to 🦕 Deno 2.1#107

Merged
p-hoffmann merged 181 commits into
developfrom
p-hoffmann/deno2x
Jul 28, 2025
Merged

Upgrade to 🦕 Deno 2.1#107
p-hoffmann merged 181 commits into
developfrom
p-hoffmann/deno2x

Conversation

@p-hoffmann

Copy link
Copy Markdown
Contributor

No description provided.

nyannyacha and others added 30 commits December 31, 2024 08:40
* 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>
Copilot AI review requested due to automatic review settings July 26, 2025 08:31

Copilot AI 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.

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 assert syntax to with syntax 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
Comment thread crates/base/test_cases/user-worker-san-check/index.ts
Comment thread crates/base/test_cases/read_file_sync_20mib/index.ts
Comment thread crates/base/test_cases/json_import/index.ts
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

This information exposed to the user depends on
stack trace information
.

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:

  1. Replace the String(err?.message ?? err) in the Response with a generic error message.
  2. Log the detailed error (err) to the server console for debugging.

Suggested changeset 1
examples/postgres-on-the-edge/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/examples/postgres-on-the-edge/index.ts b/examples/postgres-on-the-edge/index.ts
--- a/examples/postgres-on-the-edge/index.ts
+++ b/examples/postgres-on-the-edge/index.ts
@@ -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 });
   }
EOF
@@ -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 });
}
Copilot is powered by AI and may make mistakes. Always verify output.
@p-hoffmann p-hoffmann changed the base branch from develop to p-hoffmann/deno2u July 26, 2025 08:35
@p-hoffmann p-hoffmann changed the base branch from p-hoffmann/deno2u to develop July 26, 2025 09:13
@p-hoffmann p-hoffmann changed the title Upgrade to 🦕 2.1 Upgrade to 🦕 Deno 2.1 Jul 27, 2025
@p-hoffmann p-hoffmann merged commit b5beee4 into develop Jul 28, 2025
8 checks passed
@p-hoffmann p-hoffmann deleted the p-hoffmann/deno2x branch August 10, 2025 16:22
@p-hoffmann p-hoffmann restored the p-hoffmann/deno2x branch August 10, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

10 participants