Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(pnpm): Add test to check/prove that pnpm builds are failing #9771

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kamil-bielecki-bosch
Copy link

@kamil-bielecki-bosch kamil-bielecki-bosch commented Jan 17, 2025

Add sythetic test to check how pnpm package manager behaves for some type of nested projects.

  • Since last refactoring/rework of analyzer's PNPM package manager some of projects cannot be scanned anymore.
  • There is the exception thrown during JSON parsing (output of pnpm run)
  • This PR helps to reproduce the problem.
  • We found, that commit 0eb1eea introduced new parameters for pnpm command (--json instead of --parseable and value for --recursive parameter), that leads to generate unparseable output.

Exception message generated:

PNPM failed to resolve dependencies for path 'frontend/package.json': JsonDecodingException: Unexpected JSON token at offset 1201: Expected EOF after parsing, but had [ instead at path: $
JSON input: .....-scope"
      }
    }
  }
]

[
  {
    "name": "cypress-e2e".....

@kamil-bielecki-bosch kamil-bielecki-bosch requested a review from a team as a code owner January 17, 2025 12:25
Add test for more complex pnpm project with nested subproject,
to check/prove that pnpm output with --json flag produces
unparseable JSON output.

Signed-off-by: Kamil Bielecki <[email protected]>
@kamil-bielecki-bosch kamil-bielecki-bosch force-pushed the test-proves-wrong-handling-for-nested-pnpm branch from c83bad6 to fbb3a47 Compare January 17, 2025 12:43
@mnonnenmacher
Copy link
Member

@kamil-bielecki-bosch Please provide additional context, for example, could you figure out which commit broke this? Also, how does the test you added fail, does it throw an exception and which one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants