Repository navigation
[pull] main from pnpm:main - #344
Merged
Merged
Conversation
Ports the create command from pnpm's TypeScript implementation (@pnpm/exec.commands/create) to Rust. The handler converts the user-provided name to a create-* package name via convertToCreateName and delegates to the existing dlx infrastructure — matching pnpm's exact design where create.ts calls dlx.handler(). Implements the Stage 3 'Script & process' item from #11633 (pacquet roadmap). Changes: - Add pacquet/crates/cli/src/cli_args/create.rs: command handler, name-conversion algorithm (13 unit tests covering all npm naming conventions), and error for missing args. - Wire Create(CreateArgs) into CliCommand dispatch. - Add 5 integration tests (error handling, happy path, args forwarding, --allow-build, -c/--shell-mode). - Add create-touch-file-one-bin fixture to pnpr mock registry.
Port the `restart` command from <https://github.com/pnpm/pnpm/blob/d4a2b0364c/exec/commands/src/restart.ts> to the Rust pacquet CLI. `restart` delegates to `RunArgs::run()` three times (stop → restart → start), matching the TypeScript handler that calls the `run` handler sequentially for each script name. Add a standalone `stop` command alongside the existing `start` and `test` shortcuts. `stop` silently succeeds when no script is defined (like `start` with its `node server.js` fallback), matching npm convention. Both commands forward trailing args and the `--if-present` flag to each script. Lifecycle hooks (`pre<name>`/`post<name>`) apply when `enablePrePostScripts` is set, because each step runs through the full `RunArgs` pipeline. Tests cover: - Sequential execution order (stop → restart → start) - Failure propagation (stop fails → restart/start skipped) - `--if-present` skipping missing scripts - Args forwarding to each script - Standalone `stop` with and without a script - Regression guard for existing `start` command Related: #11633
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )