Skip to content

Conversation

o-az
Copy link
Collaborator

@o-az o-az commented Sep 10, 2025

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@o-az o-az marked this pull request as ready for review September 15, 2025 13:50
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

Copy link

@Copilot Copilot AI left a 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.

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good

@o-az o-az changed the title feat: harden anpm publish & make installer leaner feat: harden npm publish & make installer leaner Sep 15, 2025
@o-az o-az merged commit 9cd8a95 into master Sep 16, 2025
32 of 37 checks passed
@o-az o-az deleted the o-az/npm-harden branch September 16, 2025 03:30
@github-project-automation github-project-automation bot moved this to Done in Foundry Sep 16, 2025
MerkleBoy pushed a commit to MerkleBoy/foundry that referenced this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants