-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
@yarnpkg/lockfile can't parse current lockfiles #5214
Comments
Seems to work OK for a simple lockfile:
Could you post your lockfile? |
Sure thing. I'll throw in the Just to be sure, I ran your debug code as well.
|
It seems your lock file has Windows CRLF line endings. If you convert them to Unix style endings then it works. The lockfile parser does seem to have some code to handle CRLF:
and the unit tests have a couple tests where windows style line endings are used
so not sure why the syntax error. 😕 I'll try to dig into it a bit more... |
Line endings... Should have known. 05bf977 looks to have done this with #4495 fixing the lockfile parser. The gap between the changes is massive, but that could easily be attributed to factors like the change being slow to make it into a release, people not actively updating their copies of yarn, and how it can only be encountered on Windows systems. Issue here seems to be just that
|
Any progress on this? I can always bundle a newly built copy with the fixes in my package, but I'd rather not resort to that. |
- This feature is incomplete, pending resolution of yarnpkg/yarn#5214
My workaround for now is to manually replace all "\r" characters with an empty string, "".
|
Just to "poke the bear", is there anyone around who could push an updated release of this dependency out? Even better would be to integrate this into the yarn release process, so that they are always in sync. |
Same issue here, it would be nice to have updated releases of this dependency ! |
|
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
@yarnpkg/lockfile fails to parse
yarn.lock
, raising the errorSyntaxError: Unknown token 3:1 in lockfile
. The last release for this package was from before the 1.0.0 release, and manually building from the yarn source produced a package that worked, so its stands to reason that the major version may have introduced breaking changes.If the current behavior is a bug, please provide the steps to reproduce.
Simply take any
yarn.lock
file, and parse it as described in the README.What is the expected behavior?
Lockfile is successfully parsed, and an object is returned.
Please mention your node.js, yarn and operating system version.
Issue was replicated on WSL and Windows, with yarn uninstalled when using WSL to stop conflicts.
WSL (Ubuntu 16.04.3 LTS) and Windows 10 1709 16299.192:
The text was updated successfully, but these errors were encountered: