From e063238094e937760d122ddbd3ed441cea27c50e Mon Sep 17 00:00:00 2001 From: lmgyuan Date: Mon, 16 Sep 2024 14:52:07 -0400 Subject: [PATCH] update PR - delete unnecessary warning - add more context to the changeset documentation. - modify deprecate-cli.js-ag.md - -o and -p instead of --output and --param - delete enable watch mode part in the deprecation readMe - delete replace cli.js in postinstall.js with ag - add a link to the deprecation guide in the postinstall.js - add an installation url in the postinstall.js --- .changeset/start_clijs_deprecation.md | 4 ++- README.md | 6 ++-- ...te-cli.sj-ag.md => deprecate-cli.js-ag.md} | 36 ++++++++----------- apps/generator/scripts/postinstall.js | 14 +++++--- 4 files changed, 29 insertions(+), 31 deletions(-) rename apps/generator/docs/{deprecate-cli.sj-ag.md => deprecate-cli.js-ag.md} (58%) diff --git a/.changeset/start_clijs_deprecation.md b/.changeset/start_clijs_deprecation.md index c0b6b0df4..bb89b341c 100644 --- a/.changeset/start_clijs_deprecation.md +++ b/.changeset/start_clijs_deprecation.md @@ -2,4 +2,6 @@ "@asyncapi/generator": minor --- -Start deprecating `cli.js` in the generator repository. +Start deprecating `ag` in the generator repository. The purpose of deprecating the `ag` option for documentation generation is to move people's +attention to use the `AsyncAPI CLI` in order to maintain a single entry point for all the AsyncAPI tools. +Otherwise, the maintainers need to manually update the `ag` option in the generator repository every time a new version of the `AsyncAPI CLI` is released. diff --git a/README.md b/README.md index df1b2d008..24a1714d7 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,8 @@ This is a Monorepo managed using [Turborepo](https://turbo.build/) and contains ![npm](https://img.shields.io/npm/v/@asyncapi/generator?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/generator?style=for-the-badge) -> warning: This package doesn't support AsyncAPI 1.x anymore. We recommend to upgrade to the latest AsyncAPI version using the [AsyncAPI converter](https://github.com/asyncapi/converter-js) (You can refer to [installation guide](/apps/generator//docs//installation-guide.md)). If you need to convert documents on the fly, you may use the [Node.js](https://github.com/asyncapi/converter-js) or [Go](https://github.com/asyncapi/converter-go) converters. - -> **Deprecation Notice**: The use of `cli.js` for documentation generation is deprecated and will be removed in future releases. We strongly encourage migrating to the new AsyncAPI CLI. The migration process is straightforward, and you can find the necessary steps in our [migration guide](/apps/generator/docs/deprecate-cli.sj-ag.md). Please ensure that your projects are updated accordingly to avoid any disruptions. - +[!IMPORTANT] +Deprecation Notice: The use of ag for documentation generation is deprecated and will be removed in future releases. We strongly encourage migrating to the new AsyncAPI CLI. diff --git a/apps/generator/docs/deprecate-cli.sj-ag.md b/apps/generator/docs/deprecate-cli.js-ag.md similarity index 58% rename from apps/generator/docs/deprecate-cli.sj-ag.md rename to apps/generator/docs/deprecate-cli.js-ag.md index 77fac6b6e..9a7244291 100644 --- a/apps/generator/docs/deprecate-cli.sj-ag.md +++ b/apps/generator/docs/deprecate-cli.js-ag.md @@ -1,12 +1,12 @@ --- -title: "Deprecate Cli.js" +title: "Deprecate ag" weight: 170 --- # Migration Guide from “ag/asyncapi-generator” to AsyncAPI CLI ## Overview -With the introduction of the AsyncAPI CLI, the use of `Cli.js` for documentation generation in the AsyncAPI generator repository is being deprecated. This guide provides detailed instructions on how to transition from `ag` to the new AsyncAPI CLI. +With the introduction of the AsyncAPI CLI, the use of `ag` for documentation generation in the AsyncAPI generator repository is being deprecated. This guide provides detailed instructions on how to transition from `ag` to the new AsyncAPI CLI. ## Why Migrate? - **Enhanced Features:** The AsyncAPI CLI offers advanced features and improvements. @@ -17,31 +17,31 @@ With the introduction of the AsyncAPI CLI, the use of `Cli.js` for documentation Here is a list of `ag/asyncapi-generator` options and their equivalents in the AsyncAPI CLI: - **-d, --disable-hook [hooks...]** - - **AsyncAPI CLI Equivalent:** `asyncapi generate fromTemplate