You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/publish/README.md
+7-6
Original file line number
Diff line number
Diff line change
@@ -579,7 +579,7 @@ lerna will run [npm lifecycle scripts](https://docs.npmjs.com/cli/v8/using-npm/s
579
579
580
580
# `catalog:` protocol
581
581
582
-
The `catalog:` protocol ([pnpm catalog](https://pnpm.io/catalogs)) can be recognized by Lerna-Lite. When publishing, they will be replaced as isand use the version range defined in your global catalog. If you need to bump the version of a package in a catalog, you will need to edit `pnpm-workspace.yaml` manually. If you wish them to be bumped automatically, then we suggest using [`workspace:`](#workspace-protocol) protocol instead for any workspace dependencies.
582
+
The `catalog:` protocol ([pnpm catalog](https://pnpm.io/catalogs)) can be recognized by Lerna-Lite. When publishing, they will be replaced "as is" by reading and using the version range defined in your global catalog. If you need to bump the version of a package in a catalog, you will need to edit `pnpm-workspace.yaml` manually. If you wish them to be bumped automatically, then we strongly suggest that you use the [`workspace:`](#workspace-protocol) protocol instead which is better for local workspace dependencies.
583
583
584
584
So for example, if our `pnpm-workspace.yaml` file has the following configuration
585
585
@@ -594,17 +594,16 @@ catalog:
594
594
595
595
# named catalogs are also supported
596
596
catalogs:
597
-
# Can be referenced through "catalog:react17"
597
+
# Can be referenced through "catalog:react17" or "catalog:react18"
598
598
react17:
599
599
react: ^17.0.0
600
600
react-dom: ^17.0.0
601
-
# Can be referenced through "catalog:react18"
602
601
react18:
603
602
react: ^18.2.0
604
603
react-dom: ^18.2.0
605
604
```
606
605
607
-
and then one of our package with the following dependencies defined in our `package.json`
606
+
and then if one of our package has the following dependencies defined in our `package.json`
608
607
609
608
```json
610
609
{
@@ -623,7 +622,7 @@ and then one of our package with the following dependencies defined in our `pack
623
622
624
623
#### versions that will be published
625
624
626
-
Lerna-Lite will replace all `catalog:` protocol with the version ranges defined in the global catalog(s) and publish the following:
625
+
Lerna-Lite will resolve all `catalog:` protocol by extracting the version ranges defined in the global catalog(s) and will publish the following:
627
626
628
627
```json
629
628
{
@@ -642,7 +641,7 @@ Lerna-Lite will replace all `catalog:` protocol with the version ranges defined
642
641
643
642
# `workspace:` protocol
644
643
645
-
The `workspace:` protocol ([pnpm workspace](https://pnpm.io/workspaces), [yarn workspace](https://yarnpkg.com/features/workspaces#workspace-ranges-workspace)) is also supported by Lerna-Lite. We also strongly suggest that you use this in combo with the new [`--sync-workspace-lock`](https://github.com/lerna-lite/lerna-lite/tree/main/packages/version#--sync-workspace-lock) flag to properly update your root project lock file. When publishing, it will replace any `workspace:` dependencies by:
644
+
The `workspace:` protocol ([pnpm workspace](https://pnpm.io/workspaces), [yarn workspace](https://yarnpkg.com/features/workspaces#workspace-ranges-workspace)) is also supported by Lerna-Lite. You could also use this in combo with the new [`--sync-workspace-lock`](https://github.com/lerna-lite/lerna-lite/tree/main/packages/version#--sync-workspace-lock) flag to properly update your root project lock file. When publishing, it will replace any `workspace:` dependencies by:
646
645
647
646
- the corresponding version in the target workspace (if you use `workspace:*`, `workspace:~`, or `workspace:^`)
648
647
- the associated semver range (for any other range type)
@@ -677,6 +676,8 @@ The library is doing a strict match and it will transform and publish the follow
677
676
}
678
677
```
679
678
679
+
> **Note** semver range with an operator (ie `workspace:>=2.0.0`) are also supported but will never be mutated.
0 commit comments