Skip to content

patch#657

Merged
lazarusA merged 1 commit into
mainfrom
la/no_postinstall
Jun 8, 2026
Merged

patch#657
lazarusA merged 1 commit into
mainfrom
la/no_postinstall

Conversation

@lazarusA

@lazarusA lazarusA commented Jun 8, 2026

Copy link
Copy Markdown
Member

rm postinstall because consumers don't need to copy netcdf4-wasm

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread package.json
"prBuild": "pnpm buildRepo",
"prLint": "pnpm lint",
"dev": "next dev",
"dev": "node src/hooks/copy-wasm.mjs && next dev",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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).

Suggested change
"dev": "node src/hooks/copy-wasm.mjs && next dev",
"dev": "node scripts/copy-wasm.mjs && next dev",

Comment thread package.json
"buildRepo": "pnpm rmBuild && pnpm build",
"rmBuild": "pnpm -r exec rm -rf out",
"build": "next build",
"build": "node src/hooks/copy-wasm.mjs && next build",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
"build": "node src/hooks/copy-wasm.mjs && next build",
"build": "node scripts/copy-wasm.mjs && next build",

@lazarusA lazarusA merged commit 9576d21 into main Jun 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant