Repository navigation
[pull] main from pnpm:main - #355
Merged
Merged
Conversation
…#12635) A branch that lives in this repo fires both a push and a pull_request TS CI run for the same commit, and both report the TS CI / Success required check. Branch protection then sees two results for that context, so a cancellation or flake on the push side (e.g. two pushes racing on the test.yml concurrency group) blocks the PR even when the pull_request run passed. Restrict push CI to main so PR branches carry TS CI / Success only via their pull_request run (and the merge queue via merge_group). Since pull_request now covers every PR, run the build/test jobs on every pull_request (same-repo and fork) instead of relying on the push run, and drop the same-repo/fork/chore-lockfile gating that existed only to avoid duplicate push+pull_request builds. main stays covered pre-merge by merge_group and post-merge by the push run.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(pacquet-cli): add import command * style(pacquet-cli): fix indentation in import dispatch arm cargo fmt fix for the CliCommand::Import arm and the following CatFile/CatIndex arms that had incorrect indentation. * fix(pacquet-cli): fix TOCTOU and seed policy in import - Remove TOCTOU race condition between exists() and remove_file() - Drop old lockfile seeds (DropAll) so import does a fresh resolution * fix(import): add dylint reason and integration tests * fix(pnpr): supply missing MaxUsers argument in server tests * test(pacquet-cli): add integration tests for cache view and import caching * fix(pnpr): restore UserStore::in_memory parameterless call to match upstream * test(pacquet-cli): fix flakiness in lockfile resolution reuse integration test * feat(pacquet-cli): route import through pnpr server when configured * fix(pacquet-cli): resolve clippy warnings and disjoint capture issues * fix(pacquet-cli): revert config closure pointer wrapper to fix approve-builds * style(pacquet-cli): format code * fix: resolve import test errors * fix(pacquet-cli): use config.skip_runtimes and backup lockfile before import install - Use config.skip_runtimes instead of hardcoded false in both pnpr and local paths - Rename existing lockfile to .import.bak before running install - On success: remove backup - On failure: restore backup so the user doesn't lose their lockfile
…updates (#12621) Bumps the github-actions group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [pnpm/setup](https://github.com/pnpm/setup), [bencherdev/bencher](https://github.com/bencherdev/bencher) and [taiki-e/install-action](https://github.com/taiki-e/install-action). Updates `actions/checkout` from 6.0.2 to 7.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6.0.2...9c091bb) Updates `pnpm/setup` from b1cac37306e39c21283b9dd6cb0ac288fb35ba6b to 77cf06832101b3ac8c65caaf76a21643936d07a4 - [Release notes](https://github.com/pnpm/setup/releases) - [Commits](pnpm/setup@b1cac37...77cf068) Updates `bencherdev/bencher` from 0.6.6 to 0.6.7 - [Release notes](https://github.com/bencherdev/bencher/releases) - [Commits](bencherdev/bencher@50fb1e1...ec56bb6) Updates `taiki-e/install-action` from 2.81.8 to 2.82.0 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@0631aa6...b8cecb8) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: bencherdev/bencher dependency-version: 0.6.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: pnpm/setup dependency-version: 77cf06832101b3ac8c65caaf76a21643936d07a4 dependency-type: direct:production dependency-group: github-actions - dependency-name: taiki-e/install-action dependency-version: 2.82.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(pacquet-cli): add dedupe command
* refactor(pacquet-cli): scope large_stack_frames allow to Install arm
* fix(dedupe): add dylint reason and integration tests
* fix(pnpr): supply missing MaxUsers argument in server tests
* fix(pnpr): fix in_memory tests call
* fix: resolve dedupe test errors
* fix(dedupe): wrap dedupe dispatch in DedupePipeline for config-finalization
The previous commit left the CliCommand::Dedupe arm as a bare match on
reporter (returning () instead of Pin<Box<dyn Future>>), which failed
to compile in all CI targets (clippy, doc, dylint, test).
This commit adds DedupePipeline, mirroring InstallPipeline:
- Calls sync_package_manager_dependencies, install_config_deps, and
run_update_config_hooks before State::init (config-finalization).
- Wraps the reporter match in Box::pin(async move { ... Ok(()) })
so each arm produces the right future type.
- Fixes lockfile path derivation to use config.workspace_dir.
- Sets prefer_frozen_lockfile: Some(false) and UpdateSeedPolicy::DropAll
so the dedupe pipeline re-resolves from scratch.
- Changes lockfile_only to true and dry_run to false (always compute
resolution; --check uses a backup/restore pattern).
- Fixes integration test names and adds lockfile-equality assertion
in the --check test.
* fix(dedupe): snapshot lockfile before config-dependency ops in --check
DedupePipeline::run runs config-dependency ops that can persist the
env-lockfile document into pnpm-lock.yaml BEFORE DedupeArgs::run
snapshots the existing lockfile, so --check would compare post-install
output against the already-modified lockfile and silently miss the diff.
Move the snapshot into DedupePipeline::run, before config-dependency
ops. Pass it (and the lockfile path) to DedupeArgs::run as parameters.
* fix(dedupe): atomic rollback via tempfile + rename
Use tempfile::NamedTempFile + persist (rename) for the lockfile restore
in --check so the rollback is atomic: a crash mid-write cannot leave
a torn pnpm-lock.yaml. The old std::fs::write was non-atomic and
followed symlinks.
* fix(dedupe): skip config-deps when --check is set
DedupePipeline::run was always installing config dependencies and
running updateConfig hooks, which creates/modifies
node_modules/.pnpm-config under the workspace root. This breaks the
--check contract of not materializing anything.
Guard the config-dependency ops behind !self.args.check so --check
skips them entirely while the normal dedupe path still runs them.
* refactor(cli): extract shared workspace-root derivation helper
Both the Install and Dedupe dispatch arms repeated the same
config_root + package_manager_to_sync derivation. Extract a
shared helper so the two paths cannot drift.
* style(dedupe): collapse imports to fix dylint perfectionist lint
* fix(dedupe): hoist --check snapshot before config-deps; use config.trust_lockfile
Move the lockfile snapshot and LockfileGuard creation into DedupePipeline::run,
before config-dependency syncing, so the --check gate covers all lockfile
mutations (including those written by config-deps). Previously the snapshot
was taken inside DedupeArgs::run, after config-deps had already run, letting
config-dep-driven lockfile changes go undetected by --check.
Also set trust_lockfile: config.trust_lockfile instead of hard-coding false,
matching the behaviour of the install command and avoiding unnecessary
registry round-trips in offline/air-gapped setups.
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 : )