-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
yarn 'packages/project' init incorrectly populates pacakge.json with values '${projectRootAbsPath}/.yarnrc.yml' and null when nested configuration is specified in initFields in .yarnrc.yml
To reproduce
mkdir projectroot
cd projectroot
yarn init -2
yarn set version 4.0.0-rc.31 # 29/30/31 all fail similarly
echo "
initFields:
author:
email: [email protected]
name: First Last
initScope: somescope
" >> .yarnrc.yml
yarn packages/somepkg initThis generates unexpected entries in projectroot/somepk/package.json
{
"author": {
"email": [
"/home/ambasta/projectroot/.yarnrc.yml",
"[email protected]",
null
],
"name": [
"/home/ambasta/projectroot/.yarnrc.yml",
"First Last",
null
]
},
"name": "@somescope/somepkg",
"packageManager": "[email protected]"
}Environment
System:
OS: Linux 5.19 Gentoo/Linux
CPU: (8) x64 AMD Ryzen 5 PRO 2500U w/ Radeon Vega Mobile Gfx
Binaries:
Node: 18.12.1 - /tmp/xfs-b99129f6/node
Yarn: 4.0.0-rc.31 - /tmp/xfs-b99129f6/yarnAdditional context
This issue only occurs from rc29 onwards. rc28 and older generate package.json correctly
yarn set version
yarn packages/blue init
cat packages/blue/package.jsonoutputs
{
"author": {
"email": "[email protected]",
"name": "First Last"
},
"name": "@somescope/blue",
"packageManager": "[email protected]"
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working