fix: add deno.json for netlify edge functions IDE support#5603
fix: add deno.json for netlify edge functions IDE support#5603Pragati5-DEBUG wants to merge 1 commit into
Conversation
Adds Deno compiler config so editors resolve Deno globals and Netlify edge-bootstrap types in serve-definitions.ts. Closes asyncapi#5087.
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new ChangesDeno Edge Functions Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 @@
## 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. 🚀 New features to boost your workflow:
|
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5603--asyncapi-website.netlify.app/ |



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