![]() ![]() ![]() This means that if you have your packages located in a directory other than packages/, this tool will still work, as long as their parent directory is specified. Lerna Update Wizard takes Lerna's packages config parameter into account if specified in lerna.json. If not specified, you will be prompted with the option to enable it at runtime, whenever use of Yarn Workspaces is detected (unless in non-interactive mode). yarn workspaces), but the overall concepts remain the same. You can also see some minor differences in the CLI (e.g. To achieve this single "lazy" install, which can significantly speed up the install duration, you can specify the -lazy flag. For example, an equivalent of yarn workspace add (adding a dependency to a workspace) is still in the works Update: this feature was added on v7.14.0.When using Yarn Workspaces for your mono-repo, only a single installation is required in the top-level directory after changing a dependency in the package.json file for one or more sub-packages. Note: If the project root directory contains a yarn.lock file, Yarn will be used to install all packages, in order to support Yarn Workspaces. Lerna Update Wizard will automatically detect the package manager used for each package and use the appropriate one for installing the dependency. Note: Git features are not available for -non-interactive mode. packages packages/utils,packages/tools \ Simply specify the -non-interactive flag: The script can run without prompting you for input. I couldnt have done it without all of you. Maintaining Lerna has been one of the most challenging, far-reaching, and rewarding experiences of my career. Then choose whether or not you'd like to make a separate Git commit for your changes.Ī nice commit message with details about the update version range for each affected package will be generated for you. I am so grateful to the Lerna community for trusting me for your patience and understanding. Auto-generate Git branch & commitĪfter installation, choose whether or not you'd like to generate a Git branch for your changes Note: Currently not supported in -noninteractive mode. Choose + Add another after you've specified the details for the first update task. You can batch updates for multiple dependencies into one session. Complete the flow like normal (described above)Īdd/Update multiple dependencies in one session.Only dependencies installed with 2 or more differing versions will be presented.Run the command with the -dedupe option.When prompted, specify dependency type for each package (normal/dev/peer).Select the packages in which to add the dependency.Enter the name of a dependency not already in your project.If you are already using npm or yarn workspaces, move the 'workspaces' property from package.json to pnpm-workspace.yaml. Create a pnpm-workspace.yaml file in the root of your project. Pick the desired version to be installed for the dependency If not already using workspaces, run lerna clean to remove the nodemodules/ folder in all packages.with the context of Sourcegraphs code graph on public code or your code at work. Select the packages in which you wish to perform the upgrade context:global repo:/Quramy/lerna-yarn-workspaces-example.Search for and select the dependency to upgrade.$ npx lerna-update-wizard Features Update dependencies across packages ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |