Skip to content

[BUG]fossa cannot analyze the new format of pnpm-lock.yaml #1307

@LoisHuang2022

Description

@LoisHuang2022

Describe the bug
Fossa doesn't seem to be able to analyze the new format of 'pnpm-lock.yaml'.

To Reproduce
Steps to reproduce the behavior:
pnpm-lock.yaml:

lockfileVersion: '6.0'

settings:
  autoInstallPeers: true
  excludeLinksFromLockfile: false

dependencies:
  '@emotion/react':
    specifier: ^11.10.6
    version: 11.11.1(@types/react@18.2.21)(react@18.2.0)
......
  1. Run fossa analyze
  2. See error
An issue occurred

  >>> Relevant errors

    Error

      Error parsing file: /xxxxxx/pnpm-lock.yaml.

          Aeson exception:
          Error in $.dependencies['@emotion/react']: parsing Text failed, expected String, but encountered Object

but if use this format

lockfileVersion: 5.4
specifiers:
  '@emotion/react': ^11.10.6
......
dependencies:
  '@emotion/react': 11.11.1

fossa analyze runs successfully

Additional context
fossa-cli version 3.8.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions