Skip to content

outputs.updated-dependencies-json returns wrong & incomplete info #615

@ktarmyshov

Description

@ktarmyshov

I'm using dependabot to run automated updates. I also added some automation workflows, so changesets are updated automatically as well.

I have discovered several issues.
I am updating all dependencies in one group to avoid too many test workflows.

.github/dependabot.yml

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
  - package-ecosystem: "npm" # See documentation for possible values
    directories:
      - "/"
      - "/demo"
    schedule:
      interval: "daily"
      time: "03:00"
      timezone: "Europe/Berlin"
    ignore:
      - dependency-name: "npm"
        versions: ["<10.0.0", ">=11.0.0"]
    groups:
      all:
        patterns:
          - "*"
    commit-message:
      prefix: "dependabot"
      prefix-development: "dependabot"

For example, here is an example PR created by dependabot.
https://github.com/ktarmyshov/svelte-adapter-azure-swa/pull/43
there are two folders with package.json files being updated: 2 dependency for one folder "/" and 2 dependencies for "/demo" folder.

Issues with outputs.updated-dependencies-json:

  • directory is always root "/" (or maybe first one in the list"
  • prevVersion & newVersion are always empty

Here is the output json provided by the data

[{\"dependencyName\":\"@sveltejs/kit\",\"dependencyType\":\"direct:development\",\"updateType\":\"version-update:semver-patch\",\"directory\":\"/\",\"packageEcosystem\":\"npm_and_yarn\",\"targetBranch\":\"main\",\"prevVersion\":\"\",\"newVersion\":\"\",\"compatScore\":0,\"maintainerChanges\":false,\"dependencyGroup\":\"all\",\"alertState\":\"\",\"ghsaId\":\"\",\"cvss\":0},{\"dependencyName\":\"@types/node\",\"dependencyType\":\"direct:development\",\"updateType\":\"version-update:semver-minor\",\"directory\":\"/\",\"packageEcosystem\":\"npm_and_yarn\",\"targetBranch\":\"main\",\"prevVersion\":\"\",\"newVersion\":\"\",\"compatScore\":0,\"maintainerChanges\":false,\"dependencyGroup\":\"all\",\"alertState\":\"\",\"ghsaId\":\"\",\"cvss\":0},{\"dependencyName\":\"@azure/static-web-apps-cli\",\"dependencyType\":\"direct:development\",\"updateType\":\"version-update:semver-patch\",\"directory\":\"/\",\"packageEcosystem\":\"npm_and_yarn\",\"targetBranch\":\"main\",\"prevVersion\":\"\",\"newVersion\":\"\",\"compatScore\":0,\"maintainerChanges\":false,\"dependencyGroup\":\"all\",\"alertState\":\"\",\"ghsaId\":\"\",\"cvss\":0},{\"dependencyName\":\"@sveltejs/adapter-auto\",\"dependencyType\":\"direct:development\",\"updateType\":\"version-update:semver-major\",\"directory\":\"/\",\"packageEcosystem\":\"npm_and_yarn\",\"targetBranch\":\"main\",\"prevVersion\":\"\",\"newVersion\":\"\",\"compatScore\":0,\"maintainerChanges\":false,\"dependencyGroup\":\"all\",\"alertState\":\"\",\"ghsaId\":\"\",\"cvss\":0}]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions