build: replace deprecated built-in punycode with userland package#19502
build: replace deprecated built-in punycode with userland package#19502
Conversation
Fixes deprecation warning by installing `punycode` userland package and aliasing it in esbuild configs.
|
Hi there! Thank you for your contribution to Gemini CLI. To improve our contribution process and better track changes, we now require all pull requests to be associated with an existing issue, as announced in our recent discussion and as detailed in our CONTRIBUTING.md. This pull request is being closed because it is not currently linked to an issue. Once you have updated the description of this PR to link an issue (e.g., by adding How to link an issue: Thank you for your understanding and for being a part of our community! |
Summary of ChangesHello @jacob314, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This PR correctly addresses the deprecation warning for the punycode module by replacing it with a userland package and using an esbuild alias. The changes are straightforward and effective. I've added one suggestion to refactor the esbuild configuration to reduce code duplication and improve long-term maintainability, in line with existing repository practices.
|
Thank you for linking an issue! This pull request has been automatically reopened. |
|
Size Change: +7.62 kB (+0.03%) Total Size: 24.5 MB
ℹ️ View Unchanged
|
|
/patch |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
🚀 Patch Release Started! 📋 Release Details:
⏳ Status: The patch release is now running. You'll receive another update when it completes. 🔗 Track Progress: |
|
🚀 Patch Release Started! 📋 Release Details:
⏳ Status: The patch release is now running. You'll receive another update when it completes. 🔗 Track Progress: |
|
✅ Patch Release Complete! 📦 Release Details:
🎉 Status: Your patch has been successfully released and published to npm! 📝 What's Available:
🔗 Links: |
|
✅ Patch Release Complete! 📦 Release Details:
🎉 Status: Your patch has been successfully released and published to npm! 📝 What's Available:
🔗 Links: |
Summary
This PR replaces the deprecated built-in
node:punycodemodule with the userlandpunycodenpm package. This addresses theDeprecationWarning: The punycode module is deprecatedwarning that appears when bundling and running the CLI due to deep transitive dependencies (e.g.,node-fetch,whatwg-url) relying on it.Details
punycode@^2.3.1as a root dependency.esbuild.config.jsto aliaspunycode: 'punycode/'for bothcliConfiganda2aServerConfig.packages/vscode-ide-companion/esbuild.jsto include the samepunycode: 'punycode/'alias.These alias configurations instruct esbuild to bundle the userland package in place of the built-in node module whenever any transitive dependency requests
punycode, silently fixing the deprecation without needing forks of upstream packages.This is aligned with the instructions on https://www.npmjs.com/package/punycode
Related Issues
Fixes: #18342