Skip to content

fix: add deno.json for netlify edge functions IDE support#5603

Open
Pragati5-DEBUG wants to merge 1 commit into
asyncapi:masterfrom
Pragati5-DEBUG:fix/deno-edge-functions-ide-support
Open

fix: add deno.json for netlify edge functions IDE support#5603
Pragati5-DEBUG wants to merge 1 commit into
asyncapi:masterfrom
Pragati5-DEBUG:fix/deno-edge-functions-ide-support

Conversation

@Pragati5-DEBUG

@Pragati5-DEBUG Pragati5-DEBUG commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adds netlify/edge-functions/deno.json so editors with the Deno VS Code extension can resolve Deno globals and Netlify edge-bootstrap types in serve-definitions.ts.

The root tsconfig.json excludes the netlify/ directory, so the default TypeScript language service reports false positives for Deno.env, https:// imports, and the Context type — even though the edge functions run correctly on Netlify.

Changes

Add netlify/edge-functions/deno.json with:
lib: ["deno.window"] for Deno globals
types pointing at https://edge-bootstrap.netlify.app/v1/index.ts (matches the import already used in serve-definitions.ts)
Notes
This is separate from #5538, which adds types: ["node"] to the root tsconfig.json and does not cover the excluded netlify/ path.
Local IDE setup still requires the Deno extension with deno.enablePaths for netlify/edge-functions (.vscode/ is gitignored in this repo).
Closes #5087

Test plan

Install the Deno VS Code extension and enable paths for netlify/edge-functions

Open netlify/edge-functions/serve-definitions.ts — no red squiggles on Deno or the edge-bootstrap import

deno check --config netlify/edge-functions/deno.json --allow-import netlify/edge-functions/serve-definitions.ts passes

CI test:netlify passes

Summary by CodeRabbit

  • Chores
    • Updated Edge runtime configuration to ensure the project builds and runs with the correct Deno type definitions.

Adds Deno compiler config so editors resolve Deno globals and Netlify edge-bootstrap types in serve-definitions.ts. Closes asyncapi#5087.
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6c7f68f
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a4242028447fd00081eac6b
😎 Deploy Preview https://deploy-preview-5603--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 52da3f63-9463-40e9-85b9-84d729f2544c

📥 Commits

Reviewing files that changed from the base of the PR and between 7a30b71 and 6c7f68f.

📒 Files selected for processing (1)
  • netlify/edge-functions/deno.json

📝 Walkthrough

Walkthrough

A new netlify/edge-functions/deno.json file is added, configuring Deno compiler options with lib: ["deno.window"] and importing Edge Bootstrap TypeScript type definitions via URL.

Changes

Deno Edge Functions Configuration

Layer / File(s) Summary
Deno compiler config
netlify/edge-functions/deno.json
Adds deno.json setting compilerOptions.lib to deno.window and referencing Edge Bootstrap types from https://edge.netlify.com/v1/index.ts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through edge-land with glee,
No more red squiggles — Deno runs free!
A JSON so small, just six lines of grace,
Types properly set in the right little place.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding deno.json to improve IDE support for Netlify edge functions.
Linked Issues check ✅ Passed The change adds the requested Deno config with deno.window and edge-bootstrap types, addressing the IDE false positives in edge functions.
Out of Scope Changes check ✅ Passed The PR only introduces the Deno configuration needed for edge-function IDE support and no unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7a30b71) to head (6c7f68f).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #5603   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          931       931           
  Branches       180       180           
=========================================
  Hits           931       931           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asyncapi-bot

Copy link
Copy Markdown
Contributor

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 70
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-5603--asyncapi-website.netlify.app/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Be Triaged

Development

Successfully merging this pull request may close these issues.

[Bug 🐞 report]: Add Deno types configuration to eliminate IDE errors in edge functions

2 participants