patch#657
Conversation
There was a problem hiding this comment.
Code Review
This pull request bumps the package version to 0.7.1 and updates the dev and build scripts in package.json to run the copy-wasm.mjs script inline instead of during postinstall. The reviewer suggests moving the copy-wasm.mjs script from src/hooks/ to a root-level scripts/ directory to align with React/Next.js conventions, and recommends ensuring that generated .wasm files are added to .gitignore.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "prBuild": "pnpm buildRepo", | ||
| "prLint": "pnpm lint", | ||
| "dev": "next dev", | ||
| "dev": "node src/hooks/copy-wasm.mjs && next dev", |
There was a problem hiding this comment.
The script copy-wasm.mjs is located in src/hooks/. In React/Next.js projects, src/hooks/ is conventionally reserved for custom React hooks (e.g., useSomething). Placing a build-time Node.js script here can be confusing for maintainers. Consider moving this script to a root-level scripts/ directory (e.g., scripts/copy-wasm.mjs) to keep the project structure clean and conventional. (Note: You will also need to move the actual file to the new location).
| "dev": "node src/hooks/copy-wasm.mjs && next dev", | |
| "dev": "node scripts/copy-wasm.mjs && next dev", |
| "buildRepo": "pnpm rmBuild && pnpm build", | ||
| "rmBuild": "pnpm -r exec rm -rf out", | ||
| "build": "next build", | ||
| "build": "node src/hooks/copy-wasm.mjs && next build", |
There was a problem hiding this comment.
Following the suggestion to move copy-wasm.mjs out of src/hooks/ to a more conventional scripts/ directory, update the path here as well. Additionally, since .wasm files are dynamically copied to the public/ directory during the build process, please ensure that public/*.wasm is added to your .gitignore to prevent generated binary files from being committed to the repository.
| "build": "node src/hooks/copy-wasm.mjs && next build", | |
| "build": "node scripts/copy-wasm.mjs && next build", |
rm
postinstallbecause consumers don't need to copynetcdf4-wasm