From 5460ff25b67a1438a7c71efdaba7897d48307319 Mon Sep 17 00:00:00 2001 From: dilhasha Date: Tue, 6 Feb 2024 08:51:06 +0500 Subject: [PATCH 1/2] Fix issues in deprecate packages page --- .../publish-packages-to-ballerina-central.md | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md b/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md index 99312f4ae50..809f538d9e1 100644 --- a/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md +++ b/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md @@ -141,24 +141,39 @@ After publishing your first package, you can create a second package and use the >**Info:** For more information, see [Import a module](/learn/manage-dependencies/#import-a-module). -### Deprecate a published version of a package +## Deprecate packages published in Ballerina Central -If you have released a package version containing a critical bug or security vulnerability, it is possible to deprecate that specific version. +You can deprecate a specific version or all versions of a published package due to name changes, bugs, or security vulnerabilities. + +### Deprecate all versions of a published package -To deprecate a particular version of a package on Ballerina Central, the package owner can run the following command. +To change the name of a published package, you can mark all the versions of the existing package as deprecated and then publish the package under a new name. An optional deprecation message can also be included, which will be displayed to current users of the package. +``` +$ bal deprecate / --message +``` + +### Deprecate a specific version of a published package + +If you have released a package version containing a critical bug or security vulnerability, it is possible to deprecate that specific version. + +To deprecate a particular version of a package on Ballerina Central, the package owner can run the same command with the package version. + ``` $ bal deprecate /: --message ``` -A deprecated package version will not appear in package searches on Ballerina Central or the CLI. Additionally, it will not be used for dependency resolution unless it is already a part of a sticky build or no other compatible package version exists. +If the deprecated package or version is in use, a warning message containing the provided deprecation message will be shown during the project build. -If the deprecated version is in use, a warning message containing the provided deprecation message will be shown during the project build. +> **Note:** A deprecated package or version will not appear in package searches on Ballerina Central or the CLI. Additionally, it will not be used for dependency +resolution unless it is already a part of a sticky build or no other compatible package version exists. + +### Undo deprecation of a package To reverse the deprecation of a package, execute the same command with the `--undo` flag. ``` -$ bal deprecate /: --undo +$ bal deprecate /[:] --undo ``` From 7c1122f8f8bdb50ef6c462722f77b6efe4ccd7c1 Mon Sep 17 00:00:00 2001 From: dilhasha Date: Mon, 12 Feb 2024 08:54:34 +0500 Subject: [PATCH 2/2] Address review suggestions --- .../publish-packages-to-ballerina-central.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md b/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md index 809f538d9e1..3d028d66dce 100644 --- a/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md +++ b/swan-lake/development-tutorials/ballerina-central/publish-packages-to-ballerina-central.md @@ -147,9 +147,9 @@ You can deprecate a specific version or all versions of a published package due ### Deprecate all versions of a published package -To change the name of a published package, you can mark all the versions of the existing package as deprecated and then publish the package under a new name. +For example, if you want to change the name of a published package, execute the command below to mark all the versions of the existing package as deprecated and then, publish the package under a new name. -An optional deprecation message can also be included, which will be displayed to current users of the package. +>**Info:** An optional deprecation message can also be included, which will be displayed to current users of the package. ``` $ bal deprecate / --message @@ -157,7 +157,7 @@ $ bal deprecate / --message ### Deprecate a specific version of a published package -If you have released a package version containing a critical bug or security vulnerability, it is possible to deprecate that specific version. +For example, if you have released a package version containing a critical bug or security vulnerability, it is possible to deprecate that specific version. To deprecate a particular version of a package on Ballerina Central, the package owner can run the same command with the package version. @@ -165,14 +165,13 @@ To deprecate a particular version of a package on Ballerina Central, the package $ bal deprecate /: --message ``` -If the deprecated package or version is in use, a warning message containing the provided deprecation message will be shown during the project build. - -> **Note:** A deprecated package or version will not appear in package searches on Ballerina Central or the CLI. Additionally, it will not be used for dependency +>**Info:** If the deprecated package or version is in use, a warning message containing the provided deprecation message will be shown during the project build. +A deprecated package or version will not appear in package searches on Ballerina Central or the CLI. Additionally, it will not be used for dependency resolution unless it is already a part of a sticky build or no other compatible package version exists. ### Undo deprecation of a package -To reverse the deprecation of a package, execute the same command with the `--undo` flag. +Execute the command with the `--undo` flag below to reverse the deprecation of a package. ``` $ bal deprecate /[:] --undo