Skip to content

Commit

Permalink
chore(bin): deprecate yari bins + test rari bins (#12517)
Browse files Browse the repository at this point in the history
* chore(bin): add deprecation warnings to yari-{build,content,tool}

* chore(workflows/npm-published-simulation): test rari-{build,tool}
  • Loading branch information
caugner authored Jan 27, 2025
1 parent 8cd0bd2 commit 82a690b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/npm-published-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion build/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,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!`);
}
Expand Down
4 changes: 3 additions & 1 deletion tool/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function tryOrExit<T extends ActionParameters>(

program
.bin("yarn tool")
.name("tool")
.name("[DEPRECATED] tool")
.version("0.0.0")
.disableGlobalOption("--silent")
.cast(false)
Expand Down Expand Up @@ -1104,4 +1104,6 @@ program
})
);

console.warn("\n🗑️ This command is deprecated, and will be removed soon.\n");

program.run();

0 comments on commit 82a690b

Please sign in to comment.