fix: Revert "fix(ci): revert changes 2.0.5 ~ 2.0.7"#249
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reverts a previous commit that removed the preinstall script and made CI changes. The revert restores the removal of the only-allow pnpm preinstall check, adds Node.js 24 back to the Nix development shell, and updates the release workflow to pack and publish the package using npm directly instead of pnpm.
Key Changes
- Removes the
preinstallscript that enforced pnpm usage - Adds Node.js 24 to the Nix development environment
- Modifies the release workflow to pack with pnpm but publish with npm
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Removes the preinstall script enforcing pnpm |
| flake.nix | Adds nodejs_24 to development shell dependencies |
| .github/workflows/release.yaml | Updates publish workflow to pack with pnpm and publish with npm |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PACKAGE_TGZ=$(ls *.tgz | head -n 1) | ||
| echo "Publishing package: $PACKAGE_TGZ" | ||
| npm publish "$PACKAGE_TGZ" --access public |
There was a problem hiding this comment.
Using ls to capture filenames is fragile and can break with unexpected filenames or when no .tgz files exist. Use shell globbing with array assignment instead: PACKAGE_TGZ=(*.tgz) and then reference ${PACKAGE_TGZ[0]}.
| PACKAGE_TGZ=$(ls *.tgz | head -n 1) | |
| echo "Publishing package: $PACKAGE_TGZ" | |
| npm publish "$PACKAGE_TGZ" --access public | |
| PACKAGE_TGZ=( *.tgz ) | |
| echo "Publishing package: ${PACKAGE_TGZ[0]}" | |
| npm publish "${PACKAGE_TGZ[0]}" --access public |
| run: nix develop --command pnpm publish --provenance --no-git-checks --access public | ||
| shell: bash | ||
| run: | | ||
| PACKAGE_TGZ=$(ls *.tgz | head -n 1) |
There was a problem hiding this comment.
Missing error handling if no .tgz file is found. The script should verify that PACKAGE_TGZ is not empty before attempting to publish, otherwise npm publish will fail with a confusing error message.
| PACKAGE_TGZ=$(ls *.tgz | head -n 1) | |
| PACKAGE_TGZ=$(ls *.tgz | head -n 1) | |
| if [ -z "$PACKAGE_TGZ" ]; then | |
| echo "Error: No .tgz package file found to publish." | |
| exit 1 | |
| fi |
commit: |
This reverts commit 91909a2.
5c682e1 to
a00dd2f
Compare
Reverts #246
Summary by cubic
Restores the release workflow to pack the package and publish the built .tgz via npm for more reliable releases. Also adds Node.js 24 to the Nix dev shell and removes the pnpm-only preinstall guard.
Written for commit a00dd2f. Summary will update automatically on new commits.