Skip to content
New issue

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

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

Already on GitHub? # to your account

Enabling alias parsing in pnpm_workspace_yaml #11353

Merged

Conversation

thavaahariharangit
Copy link
Contributor

@thavaahariharangit thavaahariharangit commented Jan 20, 2025

What are you trying to accomplish?

Fixing the Bug related to this workflow

Error:

updater | 2025/01/20 14:45:53 ERROR <job_950629041> Error during file fetching; aborting: Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`.
updater | 2025/01/20 14:45:53 ERROR <job_950629041> Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`.
updater | 2025/01/20 14:45:53 ERROR <job_950629041> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/psych-5.1.2/lib/psych/visitors/to_ruby.rb:432:in `visit_Psych_Nodes_Alias'

Anything you want to highlight for special attention from reviewers?

Wrote new rspec to test pnpm-workspace-yaml
rspec ./spec/dependabot/npm_and_yarn/file_fetcher_spec.rb:2024

nil scenario rspec ./spec/dependabot/npm_and_yarn/file_fetcher_spec.rb:2039
valid scenario rspec ./spec/dependabot/npm_and_yarn/file_fetcher_spec.rb:2047
Recreated this error scenario rspec ./spec/dependabot/npm_and_yarn/file_fetcher_spec.rb:2057

And provided the fix

How will you know you've accomplished your goal?

Recreated the same error with RSpec and provided fixes for that

rspec ./spec/dependabot/npm_and_yarn/file_fetcher_spec.rb:2061
image

Ran CLI , Wrote 3 Rspec tests, and ensured specs are passing

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@thavaahariharangit thavaahariharangit requested a review from a team as a code owner January 20, 2025 15:48
Copy link
Contributor

@robaiken robaiken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this change will resolve the issue in the example workflow, it's worth noting that the provided example project doesn't reflect a typical pnpm workspace that uses the catalog feature. Although this pr fixes the yaml parsing for the example repo, in a repo where catalog dependencies are used, the user will most likely encounter issues as it won't be able to properly resolve the cataloged dependencies after the yaml is parsed.

I don't believe that this will be a blocker to this change, but it's something worth thinking about.

@thavaahariharangit thavaahariharangit merged commit 9451c2e into main Jan 21, 2025
68 checks passed
@thavaahariharangit thavaahariharangit deleted the harry/enabling-alias-parsing-with-pnpm-workspace-yaml branch January 21, 2025 15:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants