You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a supported npm/pnpm dependency-update path to shared-workflows.
This work has two related parts:
Extend the reusable dependency-safety workflow to understand pull requests
generated by Dependabot’s package-ecosystem: "npm" integration, including
pnpm-managed repositories with committed package.json and pnpm-lock.yaml files.
Provide an automated way to keep the exact pnpm version in package.json#packageManager current.
Dependabot can update dependencies declared in package.json and their
lockfile entries, but it does not treat this field as an updateable dependency:
{
"packageManager": "pnpm@<exact-version>"
}
Consumer repositories should continue to own their Dependabot configuration,
schedules, workflow triggers, permissions, and repository-specific validation.
Shared behavior should remain in reusable workflows with thin local callers.
Implementation may be split into multiple PRs after the design establishes the
boundaries and rollout order.
Why
shared-workflows currently supports dependency-safety extraction and
automated handling for GitHub Actions and Python dependency updates. It
recognizes Node manifests and lockfiles as dependency-related paths, but treats package.json, package-lock.json, yarn.lock, and pnpm-lock.yaml as
unsupported and fails closed.
Consequently, adding an npm ecosystem entry to a pnpm consumer today would
create Dependabot PRs that cannot pass the standard dependency-safety contract
without manual intervention.
Separately, an exact packageManager version is part of the reproducible
toolchain contract for Corepack/pnpm repositories. Leaving that field to manual
maintenance allows the package-manager version to drift even while ordinary
dependencies remain automated.
A centrally documented and tested contract would:
Make npm/pnpm consumers consistent with existing sibling workflow policy.
Preserve fail-closed dependency verification.
Keep manifest and lockfile updates reviewable.
Avoid repository-specific updater scripts being copied between consumers.
Preserve exact package-manager pinning while keeping it maintainable.
High-level how
Complete a design/specification before implementation. The design should cover
at least the following areas.
npm/pnpm Dependabot support
Document the consumer-owned package-ecosystem: "npm" configuration for npm,
pnpm, and other applicable Node repositories.
Extend dependency extraction, classification, advisory lookup, verdict, and
reporting for the approved npm/pnpm Dependabot update shapes.
Support scoped package names and grouped updates.
Prove that manifest and lockfile changes belong to the reported dependency
update before allowing the dependency-safety gate to pass.
Continue to fail closed on ambiguous, incomplete, malformed, or unsupported
changes.
Preserve existing Actions and Python behavior.
Automated pnpm packageManager updates
Select and document one automation mechanism during specification:
Reusable shared workflow: add a workflow_call workflow, modeled on the
existing pre-commit autoupdate workflow, with caller-owned schedule and workflow_dispatch triggers. The workflow would detect an eligible newer
pnpm release and open or refresh a dependency PR.
Renovate: use Renovate’s native support for the packageManager field,
while defining how Renovate-authored PRs interact with the existing
Dependabot-only dependency-safety and non-bot gate behavior.
Another mechanism identified during design: acceptable if it preserves
the same security, reproducibility, and thin-caller boundaries.
A documentation-only Dependabot configuration is insufficient because it
cannot update packageManager and does not resolve the current
dependency-safety parser gap.
Design decisions to resolve
The specification should resolve these choices and record their trade-offs:
Package-manager updater mechanism.
Whether npm dependency-safety support and the pnpm updater share a release or
roll out sequentially.
Eligible pnpm update policy: current-major updates, all stable updates, or
another explicit rule.
Whether major pnpm upgrades use separate PRs or require manual opt-in.
Whether a package-manager update may also update pnpm-lock.yaml, and how
lockfile consistency is verified.
Authentication and PR authorship, including GitHub App use and any GITHUB_TOKEN fallback.
How updater-authored PRs receive CI, security scanning, and the required
dependency-safety gate.
Behavior when a repository’s configured pnpm major is outside Dependabot’s
currently documented support.
Any additional choices discovered during specification brainstorming.
Acceptance criteria
Specification
An approved design specification defines the supported npm/pnpm update
shapes, package-manager updater mechanism, trust boundaries, failure
behavior, and rollout order.
The specification resolves every design decision above or explicitly
excludes it with rationale.
Current GitHub and package-manager compatibility is revalidated during
specification; unsupported versions are not silently treated as
supported.
Dependabot and dependency safety
Documentation provides a consumer-owned package-ecosystem: "npm" configuration compatible with the established
schedule, cooldown, grouping, and commit-message conventions.
Dependabot PRs changing supported Node manifests and lockfiles can be
completely and deterministically mapped to their dependency updates.
Supported direct, grouped, scoped-package, and approved lockfile update
shapes receive the appropriate advisory scans and dependency-safety
verdict.
Unexpected manifest fields, unrelated file changes, incomplete
extraction, malformed data, or unsupported update shapes fail closed with
an actionable diagnostic.
Existing GitHub Actions and Python dependency-safety behavior remains
unchanged.
pnpm packageManager updater
The selected automation detects when an eligible newer stable pnpm
version exists.
An outdated exact packageManager value results in an opened or refreshed
pull request; an already-current value is a no-op.
The updater never pushes directly to the default branch.
The updater changes only the files approved by the specification.
The resulting packageManager value remains an exact, valid pnpm version.
Any associated lockfile update is produced and verified using the pnpm
version selected by the updated toolchain contract.
Unsupported versions, invalid manifests, registry failures, and
incomplete authentication fail with actionable diagnostics and do not
create misleading success PRs.
Authentication behavior and the limitations of any GITHUB_TOKEN
fallback are documented.
Updater-authored PRs run the consumer’s normal CI and security checks and
receive an intentional dependency-safety gate result.
What
Add a supported npm/pnpm dependency-update path to
shared-workflows.This work has two related parts:
generated by Dependabot’s
package-ecosystem: "npm"integration, includingpnpm-managed repositories with committed
package.jsonandpnpm-lock.yamlfiles.package.json#packageManagercurrent.Dependabot can update dependencies declared in
package.jsonand theirlockfile entries, but it does not treat this field as an updateable dependency:
{ "packageManager": "pnpm@<exact-version>" }Consumer repositories should continue to own their Dependabot configuration,
schedules, workflow triggers, permissions, and repository-specific validation.
Shared behavior should remain in reusable workflows with thin local callers.
Implementation may be split into multiple PRs after the design establishes the
boundaries and rollout order.
Why
shared-workflowscurrently supports dependency-safety extraction andautomated handling for GitHub Actions and Python dependency updates. It
recognizes Node manifests and lockfiles as dependency-related paths, but treats
package.json,package-lock.json,yarn.lock, andpnpm-lock.yamlasunsupported and fails closed.
Consequently, adding an npm ecosystem entry to a pnpm consumer today would
create Dependabot PRs that cannot pass the standard dependency-safety contract
without manual intervention.
Separately, an exact
packageManagerversion is part of the reproducibletoolchain contract for Corepack/pnpm repositories. Leaving that field to manual
maintenance allows the package-manager version to drift even while ordinary
dependencies remain automated.
A centrally documented and tested contract would:
High-level how
Complete a design/specification before implementation. The design should cover
at least the following areas.
npm/pnpm Dependabot support
package-ecosystem: "npm"configuration for npm,pnpm, and other applicable Node repositories.
reporting for the approved npm/pnpm Dependabot update shapes.
update before allowing the dependency-safety gate to pass.
changes.
Automated pnpm packageManager updates
Select and document one automation mechanism during specification:
workflow_callworkflow, modeled on theexisting pre-commit autoupdate workflow, with caller-owned schedule and
workflow_dispatchtriggers. The workflow would detect an eligible newerpnpm release and open or refresh a dependency PR.
packageManagerfield,while defining how Renovate-authored PRs interact with the existing
Dependabot-only dependency-safety and non-bot gate behavior.
the same security, reproducibility, and thin-caller boundaries.
A documentation-only Dependabot configuration is insufficient because it
cannot update
packageManagerand does not resolve the currentdependency-safety parser gap.
Design decisions to resolve
The specification should resolve these choices and record their trade-offs:
roll out sequentially.
another explicit rule.
pnpm-lock.yaml, and howlockfile consistency is verified.
GITHUB_TOKENfallback.dependency-safety gate.
currently documented support.
Acceptance criteria
Specification
shapes, package-manager updater mechanism, trust boundaries, failure
behavior, and rollout order.
excludes it with rationale.
specification; unsupported versions are not silently treated as
supported.
Dependabot and dependency safety
package-ecosystem: "npm"configuration compatible with the establishedschedule, cooldown, grouping, and commit-message conventions.
completely and deterministically mapped to their dependency updates.
shapes receive the appropriate advisory scans and dependency-safety
verdict.
extraction, malformed data, or unsupported update shapes fail closed with
an actionable diagnostic.
unchanged.
pnpm packageManager updater
version exists.
packageManagervalue results in an opened or refreshedpull request; an already-current value is a no-op.
packageManagervalue remains an exact, valid pnpm version.version selected by the updated toolchain contract.
incomplete authentication fail with actionable diagnostics and do not
create misleading success PRs.
GITHUB_TOKENfallback are documented.
receive an intentional dependency-safety gate result.
Documentation and tests
permissions, triggers, generated PR behavior, and failure modes.
unsupported, and fail-closed cases.
versions, action versions, workflow versions, or commit SHAs.