Conversation
BREAKING CHANGE: Go and Rust function templates have been removed from `netlify functions:create`. The templates were outdated with security vulnerabilities in their dependencies, and creating Dependabot/Renovate noise. Users who need Go or Rust functions can still create them manually. - Removed functions-templates/go/hello-world/ directory - Removed functions-templates/rust/hello-world/ directory - Removed Go and Rust from language selection in functions:create - Updated 'Serverless function (Node/Go/Rust)' to 'Serverless function (Node)' - Removed Rust-specific environment variable notice Co-authored-by: Philippe Serhal <philippe.serhal@gmail.com>
|
Cursor Agent can help with this pull request. Just |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR removes Go and Rust function template support from the codebase. The changes delete the complete hello-world function templates for both Go and Rust, including their metadata files (.netlify-function-template.mjs), build manifests (go.mod, Cargo.toml), and implementation files (main.go, src/main.rs). Additionally, the function creation command is updated to remove Go and Rust from the list of available languages and to remove related environment documentation. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/commands/functions/functions-create.ts (1)
183-187: Redundant ternary — edge-function language filter is now a no-op.With
languagesreduced to only[javascript, typescript], thefuncType === 'edge'guard that filters out Go/Rust values is no longer needed; both branches of the ternary now produce identical arrays.♻️ Suggested simplification
- const langs = - funcType === 'edge' - ? languages.filter((lang) => lang.value === 'javascript' || lang.value === 'typescript') - : languages.filter(Boolean) + const langs = languages🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/commands/functions/functions-create.ts` around lines 183 - 187, The ternary used when computing langs is redundant because languages now only contains javascript and typescript; simplify the assignment by removing the funcType === 'edge' branch and set langs to the common value (e.g., use languages or languages.filter(Boolean)) where the variables language, langs, funcType, and languages are referenced in functions-create.ts so the edge-specific filter is eliminated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/commands/functions/functions-create.ts`:
- Around line 183-187: The ternary used when computing langs is redundant
because languages now only contains javascript and typescript; simplify the
assignment by removing the funcType === 'edge' branch and set langs to the
common value (e.g., use languages or languages.filter(Boolean)) where the
variables language, langs, funcType, and languages are referenced in
functions-create.ts so the edge-specific filter is eliminated.
Summary
BREAKING: Remove Go and Rust templates from
netlify functions:createcommand.These are rarely used and not worth maintaining here.
Go and Rust functions are still supported; this only removes templates from the CLI.
Slack Thread