![]() ![]() Thanks for the helpful pointers on the homepath. $ npm install -g 1 package, and audited 2 packages in 326ms # disable corepack so there's no yarn installed In addition installing using npm install -g also doesn't seem to work correctly. So using Corepack I don't seem to be able to convince it to use version of Yarn. # manually ask corepack to run yarn 1.22.19, but it again ignores it # manually ask corepack to use v1.22.19, but it again ignores this "packageManager": enable corepack, and it ignores the packageManager version # package.json has packageManager set for Yarn v1.22.19 I think I must be missing something.Ĭommented Terminal session: # using node16.18.0 I feel that package.json-only-config doesn't work exceptionally well for a tool like this, as it must be committed to the repository and that can violate team standards.I've cloned a project which uses Yarn 1.x and am trying to run it, but I can't find a way to get the right version of Yarn. node-version) that became more established, then I'd also be delighted to see support for that as well. ![]() If there were a more generalized convention (looking at you. nvmrc file, as nvm is a separate tool entirely. If I were a newcomer, I would not expect for Volta to read from an. So, given this pervasive pattern already exists, I guess I expected that it would be in place here as well. If not it searches up the tree until it finds one, ending at the user's home directory if a config is found at the cwd, it is used.a package.json key as an alternative method of configuration.a configuration file named so that it's unmistakable what tool it's for.The majority of these tools all follow similar conventions: These feel like fairly well-established patterns at this point (see: eslint, prettier, nvm, etc.) IMHO I think it's become expected behaviour to have tool-specific configuration files in the root of a repository (monorepo or otherwise). nodeversion / whatever works best for you and doesn't have to be committed to repo, and no need to search upper folders, it's just enough to test if it exists in the same folder as package.json I also quite like the suggestion made in this other issue: Manage multiple runtime versions with a single CLI tool Or if you wanted to use a slightly less common, but more versatile standard name, asdf's. node-version file format that many other tools have used for quite a while, and continue deprecating the volta key in package.json. I think one simple solution to this part is to not fully deprecate the volta key within package.json, but to only use it for node/other versions that packageManager doesn't currently support, and probably for the "opt in to using packageManager key for version config" option.Īnother alternative would be to use the. The issue with that is it doesn't support choosing the Node version, which is necessary for Volta. Then after some time as deemed appropriate, a new 'breaking change' release of volta could be made that switches this to the default mode. If that is opted into, then it should through at least a warning (maybe an error) if versions are set in the old volta keys, and should tell the user to set/update them in the packageManager keys. Probably done as an opt-in release of volta at first, that lets users elect to read from the packageManager versions. This would be my suggestion as well, at least for the aspects that corepack and that packageManager field cover. Support alternative version pinning mechanism #282ĭeprecate volta inside package.json and use the new standard packageManger.Was just wondering if any more progress had been made on potentially landing this PR?: ![]()
0 Comments
Leave a Reply. |