Skip to content

fix: pnpm install not working#921

Merged
ryardley merged 3 commits into
devfrom
ry/920-pnpm-install-does-not-work
Oct 28, 2025
Merged

fix: pnpm install not working#921
ryardley merged 3 commits into
devfrom
ry/920-pnpm-install-does-not-work

Conversation

@ryardley

@ryardley ryardley commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

This solves #920

  • setup package shell and build into pkg folder

Summary by CodeRabbit

  • Chores
    • Reorganized build output layout for the CRISP zk inputs package.
    • Added package configuration for the crisp-zk-inputs module with proper entry points and published artifacts.
    • Ignored generated build artifact directory to avoid tracking built files in version control.

@vercel

vercel Bot commented Oct 28, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
crisp Skipped Skipped Oct 28, 2025 2:51pm
enclave-docs Skipped Skipped Oct 28, 2025 2:51pm

@coderabbitai

coderabbitai Bot commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updates CRISP example packaging: modifies the wasm-pack build script to emit into a pkg/ subdirectory and use --no-pack, adds pkg/ to the package .gitignore, and adds a new ES module package.json for @enclave/crisp-zk-inputs.

Changes

Cohort / File(s) Change Summary
Wasm build script
examples/CRISP/package.json
Replaces wasm-pack invocation: removes --scope enclave, adds --no-pack, and changes --out-dir from ../../packages/crisp-zk-inputs to ../../packages/crisp-zk-inputs/pkg (keeps --out-name index).
Ignore generated artifacts
examples/CRISP/packages/crisp-zk-inputs/.gitignore
Adds pkg/ entry to ignore the generated wasm-pack output directory.
New package metadata
examples/CRISP/packages/crisp-zk-inputs/package.json
Adds an ES module package manifest for @enclave/crisp-zk-inputs with name/version/description, files list, main/module/types entries, and sideEffects including the wasm JS bindings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the wasm-pack flags (--no-pack) and --out-dir map to the new package layout.
  • Confirm the .gitignore entry correctly prevents committing generated pkg/.
  • Validate package.json entry points and files match actual build outputs.

Possibly related PRs

Suggested reviewers

  • 0xjei
  • ctrlc03
  • cedoor

Poem

🐇 I hopped through crates and build-time fog,

pkg/ tucked in, a snug compiled log,
wasm whispers "no-pack", index sails in store,
.gitignore hushes the generated roar,
A tiny rabbit cheers: packaging, done—encore! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "fix: pnpm install not working" is related to the pull request's purpose, as the changes are designed to address a pnpm installation issue. However, the title functions more as a problem statement rather than describing the specific technical changes being implemented. The actual changes involve restructuring the wasm build output directory, updating the build script parameters (removing --scope enclave and adding --no-pack), creating a new package configuration, and adding .gitignore entries. A teammate reviewing the pull request history would understand there's a pnpm issue being fixed, but wouldn't discern the specific structural and configuration changes that constitute the solution. Consider revising the title to be more specific about the technical implementation, such as "fix: restructure crisp-zk-inputs build output and package configuration" or "fix: update crisp-zk-inputs build script for pnpm workspace compatibility". This would help readers understand not just that a pnpm issue is being addressed, but what structural changes enable that fix.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ry/920-pnpm-install-does-not-work

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ryardley ryardley changed the title Fix pnpm install not working. fix: pnpm install not working Oct 28, 2025
@vercel vercel Bot temporarily deployed to Preview – enclave-docs October 28, 2025 13:59 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp October 28, 2025 13:59 Inactive
@ryardley ryardley requested a review from cedoor October 28, 2025 14:00
@ryardley ryardley marked this pull request as ready for review October 28, 2025 14:01
@ryardley ryardley requested review from 0xjei and ctrlc03 October 28, 2025 14:02
@ryardley ryardley enabled auto-merge (squash) October 28, 2025 14:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
examples/CRISP/packages/crisp-zk-inputs/package.json (1)

1-23: Add packageManager field for consistency with root package.json.

The root package.json specifies "packageManager": "pnpm@10.7.1+...", which is important for ensuring all workspace members use the same toolchain. Consider adding this field to maintain consistency across the monorepo, especially given this PR targets a pnpm installation issue.

Apply this diff to align with the root package configuration:

 {
   "name": "@enclave/crisp-zk-inputs",
   "type": "module",
   "description": "Core logic to pre-compute CRISP ZK inputs (WASM/JavaScript bindings).",
   "version": "0.1.0",
   "license": "LGPL-3.0-only",
+  "packageManager": "pnpm@10.7.1+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808",
   "repository": {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31ad834 and 4610cd7.

📒 Files selected for processing (3)
  • examples/CRISP/package.json (1 hunks)
  • examples/CRISP/packages/crisp-zk-inputs/.gitignore (1 hunks)
  • examples/CRISP/packages/crisp-zk-inputs/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: integration_prebuild
  • GitHub Check: build_enclave_cli
  • GitHub Check: test_net
  • GitHub Check: rust_unit
  • GitHub Check: rust_integration
  • GitHub Check: build_sdk
  • GitHub Check: test_contracts
🔇 Additional comments (3)
examples/CRISP/packages/crisp-zk-inputs/.gitignore (1)

1-1: LGTM!

The .gitignore entry correctly prevents build artifacts from being tracked in version control, consistent with the new package output structure.

examples/CRISP/packages/crisp-zk-inputs/package.json (1)

11-16: Verify files array completeness for wasm-pack output.

The files array lists the expected outputs from wasm-pack build ... --out-name index. Confirm that all generated artifacts are included, especially if the WASM code generates snippets (in pkg/snippets/*). Also note that sideEffects declares ./pkg/snippets/* but this directory may not exist if no JS snippets are generated by wasm-pack.

examples/CRISP/package.json (1)

24-24: Build output path change is correct and properly aligned with package configuration.

The package.json for @enclave/crisp-zk-inputs is already configured to use the pkg/ subdirectory as the output location ("main": "pkg/index.js"). The build script update correctly outputs to ../../packages/crisp-zk-inputs/pkg, which aligns with this configuration. All imports use the scoped package name and will resolve correctly through npm's package resolution mechanism. No additional changes needed.

@cedoor cedoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @ryardley!

Comment thread examples/CRISP/package.json Outdated
@vercel vercel Bot temporarily deployed to Preview – enclave-docs October 28, 2025 14:50 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp October 28, 2025 14:50 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4610cd7 and 1fcdf80.

📒 Files selected for processing (1)
  • examples/CRISP/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build_sdk
  • GitHub Check: build_enclave_cli
  • GitHub Check: test_net
  • GitHub Check: rust_unit
  • GitHub Check: integration_prebuild
  • GitHub Check: test_contracts
  • GitHub Check: rust_integration
🔇 Additional comments (1)
examples/CRISP/package.json (1)

24-24: Good: --no-pack flag addresses previous review feedback.

The addition of the --no-pack flag directly addresses cedoor's previous suggestion and aligns with the new package.json setup at the target location, eliminating the need for wasm-pack to auto-generate a package.json.

Comment thread examples/CRISP/package.json

@cedoor cedoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍🏽

@ryardley ryardley merged commit f3f0631 into dev Oct 28, 2025
23 checks passed
cedoor pushed a commit that referenced this pull request Oct 28, 2025
@github-actions github-actions Bot deleted the ry/920-pnpm-install-does-not-work branch November 5, 2025 03:18
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.

2 participants