-
Notifications
You must be signed in to change notification settings - Fork 365
Description
Right now we are using yarn 1.22, however newer versions of yarn have been out for a while, with yarn 3.0.2 being the latest. yarn 3 changes things, but not as dramatically as one might think. We can use the nodeLinker: node_modules
mode to move forward but keep backward compatibility until we can move towards Plug'n'Play.
See also https://yarnpkg.com/getting-started/migration. The goal is to get to Plug'n'Play mode, but the first step is to upgrade yarn. After that we have to fix the dependency warnings and any direct calls to node_modules.
Some things to note in these changes.
-
yarn now uses a project-committed version of yarn as opposed to a global version (the global is only used to kick off the project-committed version). There are pros and cons, IMO, but you will see a yarn-3.0.2 file installed in each repo. Upgrades are pretty easy though, by just running
yarn set version latest
then committing the changes, so we can create a blaster-outer script for that. -
I've opted for the global cache as opposed to a project specific cache. Due to the way we use git repositories, the gem repo is effectively recreated on new pulls, so this should help with avoiding re-downloading all of the node modules.
-
Installation time is surprisingly not that much faster with the cache, because of the need to still create the node_modules directories. Once we move to Plug'n'Play, however, that should minimize greatly.
time note 1:36.71 before - uncached 2:48.28 after - uncached (similar to a fresh bin/setup) 1:19.93 after - fetch cached, but not node_modules (similar to bin/update that pulls in a new gem) 18.68 after - fetch and node_modules cached (similar to local dev) -
The new format is so much nicer on your eyes 😉
Must be merged / tested together:
- Upgrade to yarn 3 #7904
- Upgrade to yarn 3 manageiq-providers-ibm_cloud#292
- Upgrade to yarn 3 manageiq-providers-lenovo#338
- Upgrade to yarn 3 manageiq-providers-nsxt#47
- Upgrade to yarn 3 manageiq-providers-nuage#254
- Upgrade to yarn 3 manageiq-providers-redfish#146
- Upgrade to yarn 3 manageiq-v2v#1161 (yarn.lock was included in this PR)
Should be merged with the others
Technically optional, but would be good to get all of our dependencies to the same level