From 9221ef4ce57e02cc9f09020b12917d7f87020858 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 27 Jan 2025 11:18:46 +0100 Subject: [PATCH 1/2] chore(bin): add deprecation warnings --- build/cli.ts | 4 +++- server/index.ts | 2 ++ tool/cli.ts | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/cli.ts b/build/cli.ts index 311b33ec2bd5..e6ece9144397 100644 --- a/build/cli.ts +++ b/build/cli.ts @@ -464,7 +464,7 @@ if (SENTRY_DSN_BUILD) { } program - .name("build") + .name("[DEPRECATED] build") .option("-i, --interactive", "Ask what to do when encountering flaws", { default: false, }) @@ -600,6 +600,8 @@ program } }); +console.warn("\n🗑️ This command is deprecated, and will be removed soon.\n"); + program.run(); function compareBigInt(a: bigint, b: bigint): number { if (a < b) { diff --git a/server/index.ts b/server/index.ts index d7b5ae8af9e2..9c4db9548469 100644 --- a/server/index.ts +++ b/server/index.ts @@ -570,6 +570,8 @@ app.use(staticMiddlewares); app.get("/*", async (_, res) => await send404(res)); +console.warn("\n🗑️ This command is deprecated, and will be removed soon.\n"); + if (!fs.existsSync(path.resolve(CONTENT_ROOT))) { throw new Error(`${path.resolve(CONTENT_ROOT)} does not exist!`); } diff --git a/tool/cli.ts b/tool/cli.ts index 268c48db208e..e8808ff68470 100644 --- a/tool/cli.ts +++ b/tool/cli.ts @@ -233,7 +233,7 @@ function tryOrExit( program .bin("yarn tool") - .name("tool") + .name("[DEPRECATED] tool") .version("0.0.0") .disableGlobalOption("--silent") .cast(false) @@ -1104,4 +1104,6 @@ program }) ); +console.warn("\n🗑️ This command is deprecated, and will be removed soon.\n"); + program.run(); From 26f017c97ff80f09a16da1d49e548ffe42038d0f Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 27 Jan 2025 11:20:37 +0100 Subject: [PATCH 2/2] chore(workflows/npm-published-simulation): test rari-{build,tool} --- .github/workflows/npm-published-simulation.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/npm-published-simulation.yml b/.github/workflows/npm-published-simulation.yml index 8af226733e1c..aab65cfb322d 100644 --- a/.github/workflows/npm-published-simulation.yml +++ b/.github/workflows/npm-published-simulation.yml @@ -70,6 +70,14 @@ jobs: yarn add file:$TARBALL yarn install + - name: (mdn/content) yarn rari-build --help + working-directory: mdn/content + run: yarn rari-build --help + + - name: (mdn/content) yarn rari-tool --help + working-directory: mdn/content + run: yarn rari-tool --help + - name: (mdn/content) yarn yari-build --help working-directory: mdn/content run: yarn yari-build --help