Conversation
elrrrrrrr
commented
Mar 4, 2026
- 🐞 fix reqwest build error in wasm
- ♻️ update utoo-web CI flow
Summary of ChangesHello, 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 critical WebAssembly build issues by adjusting how Highlights
Changelog
Ignored Files
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
|
f980356 to
d792316
Compare
d792316 to
5f355d6
Compare
There was a problem hiding this comment.
Code Review
This pull request fixes a reqwest build error for the wasm target by conditionally compiling the is_connect() check. No security vulnerabilities were found. However, the build scripts in packages/pack/package.json have become very long and contain significant duplication; it is suggested to refactor them to improve readability and maintainability by reintroducing composable npm scripts.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/pack/package.json (74-85)
The build scripts (build, build:js, build:local, prepublishOnly) have been expanded, leading to significant code duplication. For instance, the logic for building CJS and ESM modules is repeated in multiple scripts. This makes the scripts harder to read and maintain.
To improve this, I suggest reverting to a more modular approach using npm run to compose smaller, reusable scripts. This will make the scripts section cleaner and easier to manage.
"build": "npm run build:binding && npm run build:js",
"build:js": "npm run build:cjs && npm run build:esm",
"build:cjs": "rm -rf cjs && tsc -p ./tsconfig.json --module commonjs --outDir cjs && cp src/*.d.ts cjs/",
"build:esm": "rm -rf esm && tsc -p ./tsconfig.json --module esnext --outDir esm && cp src/*.d.ts esm/ && node ../../scripts/add-esm-extensions.cjs && node scripts/inject-esm-dirname.cjs",
"build:local": "npm run build:binding:local && turbo run build --filter=@utoo/pack-shared && npm run build:js && cp src/*.node cjs/ && cp src/*.node esm/",
"artifacts": "napi artifacts --dir ./src --dist npm",
"build:binding": "napi build src --platform --release -p pack-napi --cargo-cwd ../../ --cargo-name pack_napi --features plugin --js binding.js --dts binding.d.ts",
"build:binding:local": "napi build src --platform --profile release-local -p pack-napi --cargo-cwd ../../ --cargo-name pack_napi --features plugin --js binding.js --dts binding.d.ts",
"clean": "rm -rf cjs esm",
"prepublishOnly": "npm run build:js && napi prepublish -t npm --skip-gh-release",
"version": "napi version",
"generate-features-list": "node ./scripts/generate-feature-list.js"