-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: harden npm
publish & make installer leaner
#11600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
428de50
to
4f8557f
Compare
4f8557f
to
aeed042
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR hardens the npm publish process and makes the installer leaner by adding security checks, improving error handling, and removing unused files.
- Added security hardening with HTTPS enforcement and integrity verification for package downloads
- Removed test workspace files and unused index.ts module to reduce package size
- Improved error messages and consolidated platform detection logic
Reviewed Changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
npm/tsdown.config.ts | Removed unused index build configuration |
npm/test/workspace/* | Removed test workspace files and configuration |
npm/src/install.ts | Added security checks, improved integrity verification, and enhanced error handling |
npm/src/index.ts | Deleted unused module |
npm/src/forge.ts | Simplified binary path resolution using shared constants |
npm/scripts/publish.ts | Updated import path and nightly detection logic |
npm/scripts/prepublish.ts | Removed Alpine Linux support and improved directory handling |
npm/package.json | Added import mappings and updated dependencies |
npm/README.md | Simplified documentation |
npm/@foundry-rs/forge/package.json | Removed main entry and engines field |
npm/@foundry-rs/forge/README.md | Updated package description |
npm/@foundry-rs/forge-*/package.json | Reset versions to 0.0.0 |
npm/.env.example | Added security-related environment variables |
dprint.json | Updated plugin versions |
.github/workflows/npm.yml | Improved artifact handling and action security |
.gitattributes | Added linguist language detection for .env.example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good
npm
publish & make installer leanernpm
publish & make installer leaner
Motivation
Solution
PR Checklist