dependabot / dependabot/dependabot-core

Does not update lockfile in ignored workspace

Open
#13,802 0 comments 0 reactions 1 assignee Claimed by @v-thavaahariharangit View on GitHub
L: javascript T: bug 🐞
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 18h
Merged PRs (30d)
149

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Package ecosystem

pnpm

### Package manager version

10.24.0

### Manifest location and content before the Dependabot update

Full repro here: https://stackblitz.com/edit/dependabot-ignored-workspace?file=package.json

### dependabot.yml content

```yaml
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: daily
time: '01:00'
timezone: America/Los_Angeles
```

### What you expected to see, versus what you actually saw

`pnpm` lets you ignore certain package directories in the workspace. See the `pnpm-workspace.yaml` file in the repro linked above to see how we include everything in `packages/*` but ignore `docs/`.

In order to update the deps in `docs/`, developers run `pnpm install --ignore-workspace`

So here's the problem. Dependabot, none the less, detects a `package.json` file in `docs/` notices that `eslint` is out of date, and makes a PR for it. Thing is, when Dependabot runs `pnpm install` it has no effect, because `docs/` is ignored in the workspace.

What Dependabot has to do is:

* detect the presence of a `package.json` file
* determine whether that directory is ignored in the workspace
* if it is, add `--ignore-workspace` to the install command

### Example PR

Here's a live PR where Dependabot updated a dependency but failed to run the proper `pnpm install` command. https://github.com/anza-xyz/kit/pull/1111

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.