Skip to content

yargs URL in yarn-lock no longer accessible #298

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

Open
adam-jennings opened this issue Jun 3, 2025 · 3 comments · May be fixed by #299
Open

yargs URL in yarn-lock no longer accessible #298

adam-jennings opened this issue Jun 3, 2025 · 3 comments · May be fixed by #299
Labels
bug Something isn't working

Comments

@adam-jennings
Copy link

The yarn-lock file currently specifies the yargs library to be accessed at its old git:// URL.
This protocol is no longer supported by git and can cause an inability to install dependencies

@adam-jennings adam-jennings added the bug Something isn't working label Jun 3, 2025
@adam-jennings adam-jennings linked a pull request Jun 3, 2025 that will close this issue
@willroberts
Copy link
Collaborator

willroberts commented Jun 4, 2025

This is actually caused by a transitive dependency. We specify [email protected] in package.json, which is what pulls in yargs using a git:// URL:

"git://github.com/boneskull/yargs#nylen"

Modifications to yarn.lock will be overwritten the next time a build happens. We've worked around this for Docker builds here and here, but this unfortunately does not cover non-Docker builds.

The ideal solution here is probably to replace the usage of j2j throughout the codebase, though this is a slightly larger task. The j2j library is used in these places:

app/data/utils/node_fx_converter.js
app/data/utils/refactor_animations.js
app/data/utils/refactor_card_factory.js # imported but not used
scripts/generate_packages.js

The library itself is fairly small, and we could probably replace it with a small amount of code internally. The only function we use from this library is output().

@willroberts
Copy link
Collaborator

willroberts commented Jun 4, 2025

There is actually a solid chance we can simply replace these calls with JSON.stringify(input, null, 10), based on the code. @adam-jennings want to give this a shot? If not I can check it out sometime this week.

To clarify, the full process would be:

  • Replace j2j.output(input) calls with JSON.stringify(input, null, 10) calls.
  • Remove imports of j2j.
  • Remove j2j from package.json.
  • Run yarn build to regenerate yarn.lock, and ensure git:// is gone.
  • Remove the Docker workarounds linked above.
  • Make sure everything seems to work! As long as it builds and plays in-browser, we're probably good to go.

@adam-jennings
Copy link
Author

Yeah I'd be willing to try that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants