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

#9508: Recreating and Handling "Name contains illegal characters" in package.json #9611

Merged
merged 5 commits into from Apr 26, 2024

Conversation

thavaahariharangit
Copy link
Collaborator

Our sentry has raised a new error,
"Name contains illegal characters" error was not handled.

This PR

  1. Recreates the error in both helper (js level) and lib (ruby level)
  2. Exception handled in Ruby level
  3. Test added in both Ruby and js level.

@@ -201,6 +201,8 @@ def run_yarn_top_level_updater(top_level_dependency_updates:)
top_level_dependency_updates
]
)
rescue SharedHelpers::HelperSubprocessFailed => e
Copy link
Member

Choose a reason for hiding this comment

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

is this the only failure when we run yarn update; I assume there are other possible failures too and we should only catch the fileNotParseable specifically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes ensured, that we are catching only file not parseable error.

[dependabot-core-dev] ~ $ bin/dry-run.rb npm_and_yarn Sotatek-VanPham/colend-utilities
Original repository will generate helpful error saying file contains illegal character.

I have created new repo with same code base by removing the @ character from the name
[dependabot-core-dev] ~ $ bin/dry-run.rb npm_and_yarn thavaahariharangit/colend-utilities
This works with out any error, and generated new package.json with updates

@thavaahariharangit thavaahariharangit merged commit ed5f8c6 into main Apr 26, 2024
65 checks passed
@thavaahariharangit thavaahariharangit deleted the harry/#9508 branch April 26, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dependabot::SharedHelpers::HelperSubprocessFailed: package.json: Name contains illegal characters
2 participants