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 lockfile occasional has improperly escaped urls #1664

Open
jbedard opened this issue Apr 19, 2024 · 1 comment
Open

[Bug]: pnpm lockfile occasional has improperly escaped urls #1664

jbedard opened this issue Apr 19, 2024 · 1 comment
Labels
blocked Blocked by another issue bug Something isn't working

Comments

@jbedard
Copy link
Member

jbedard commented Apr 19, 2024

What happened?

Some pnpm-lockfiles have been known to have invalid yaml causing yq to fail, for example:

resolution: {tarball: https://gitpkg.vercel.app/blockprotocol/blockprotocol/packages/%40blockprotocol/type-system-web?6526c0e}

Possible related or caused by pnpm/pnpm#5414.

Previously use_starlark_yaml_parser was provided to workaround such issues. This is removed in rules_js v2.

Version

rules_js v2+

@jbedard jbedard added the bug Something isn't working label Apr 19, 2024
@github-actions github-actions bot added the untriaged Requires traige label Apr 19, 2024
@jbedard jbedard assigned jbedard and unassigned jbedard Apr 19, 2024
@jbedard jbedard added blocked Blocked by another issue and removed untriaged Requires traige labels Apr 19, 2024
@gregmagolan
Copy link
Member

gregmagolan commented Apr 19, 2024

For reference, incase any users hit this is the future, the comment on the rules_js 1.0 npm_translate_lock use_starlark_yaml_parser attribute goes into more detail:

This opt-out is a return safety in cases where yq is not able to parse the pnpm generated

We removed this opt-out to use the Starlark parser in rules_js 2.0 since this is a very rare case that I have not heard of a single report of in the wild. Dropping the old Starlark parser results in a smaller surface area for maintainers of rules_js.

If someone does hit this in the future, the principled fix is in pnpm so that it generates valid yaml that yq can parse.

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

No branches or pull requests

2 participants