Describe the bug
When I have a .yarnrc file like this (generated by Yarn v1):
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
cache-folder "N:\\Resources\\Yarn\\Cache"
email [email protected]
lastUpdateCheck 1554139102835
username embraser01
It doesn't work because the grammar will split the line by the : inside quotes and not by the space after cache-folder.
From https://pegjs.org/online:
{
"cache-folder \"N": "\\Resources\\Yarn\\Cache\"",
"email": "[email protected]",
"lastUpdateCheck": "1554139102835",
"username": "embraser01"
}
For now, the workaround is simply to add the : after cache-folder.
To Reproduce
Go to https://pegjs.org/online and use the syml grammar and use the .yarnrc sample.
Environment if relevant (please complete the following information):
Additional context
It happend because when working on #57, a script was loading my Yarn V1 .yarnrc placed in C:\Users\marca\.
Also, I had to remove temporary legacy settings even if I might use them in other project, is it possible to just throw a warning instead of throwing an error?
It doesn't work because the grammar will split the line by the
:inside quotes and not by the space aftercache-folder.
Good catch, that's probably pseudostringLegacy that needs a guard against double/single quotes.
Also, I had to remove temporary legacy settings even if I might use them in other project, is it possible to just throw a warning instead of throwing an error?
It's a bit hidden but you just have to add a berry: key in your .yarnrc (even empty), and Yarn will use this object as the v2 configuration (instead of the whole file):
workspaces-experimental: true
berry:
init-scope: "berry"
Fixed 馃憤