Skip to content

Commit 732e32b

Browse files
authored
feat!: deprecation notices for non-readme-refactored commands (#1099)
## 🧰 Changes BREAKING CHANGE: deprecates commands that are not supported in ReadMe Refactored. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md ## 🧬 QA & Testing Does the copy in these deprecation warnings make sense to you? Note that the links will be broken for now since we haven't tagged a proper v9 release yet, but that will be fixed once this release is out!
1 parent 6ecce00 commit 732e32b

10 files changed

Lines changed: 76 additions & 1 deletion

File tree

src/commands/categories/create.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ interface Category {
1313
}
1414

1515
export default class CategoriesCreateCommand extends BaseCommand<typeof CategoriesCreateCommand> {
16+
// needed for deprecation message
17+
static id = 'categories create' as const;
18+
19+
static state = 'deprecated';
20+
21+
static deprecationOptions = {
22+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
23+
};
24+
1625
static description = 'Create a category with the specified title and guide in your ReadMe project.';
1726

1827
static args = {

src/commands/categories/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ import getCategories from '../../lib/getCategories.js';
44
import { getProjectVersion } from '../../lib/versionSelect.js';
55

66
export default class CategoriesCommand extends BaseCommand<typeof CategoriesCommand> {
7+
// needed for deprecation message
8+
static id = 'categories' as const;
9+
10+
static state = 'deprecated';
11+
12+
static deprecationOptions = {
13+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
14+
};
15+
716
static description = 'Get all categories in your ReadMe project.';
817

918
static flags = {

src/commands/custompages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ export default class CustomPagesCommand extends BaseCommand<typeof CustomPagesCo
1313
// needed for unit tests, even though we also specify this in src/index.ts
1414
static id = 'custompages' as const;
1515

16+
static state = 'deprecated';
17+
18+
static deprecationOptions = {
19+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
20+
};
21+
1622
static summary = 'Sync Markdown/HTML files to your ReadMe project as Custom Pages.';
1723

1824
static description =

src/commands/docs/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ export default class DocsCommand extends BaseCommand<typeof DocsCommand> {
1212
// needed for unit tests, even though we also specify this in src/index.ts
1313
static id = 'docs' as const;
1414

15+
static state = 'deprecated';
16+
17+
static deprecationOptions = {
18+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
19+
};
20+
1521
static aliases = ['guides'];
1622

1723
static summary = 'Sync Markdown files to your ReadMe project as Guides.';

src/commands/docs/prune.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ function getSlug(filename: string): string {
1717
}
1818

1919
export default class DocsPruneCommand extends BaseCommand<typeof DocsPruneCommand> {
20+
// needed for deprecation message
21+
static id = 'docs prune' as const;
22+
23+
static state = 'deprecated';
24+
25+
static deprecationOptions = {
26+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
27+
};
28+
2029
static aliases = ['guides prune'];
2130

2231
static description = 'Delete any docs from ReadMe if their slugs are not found in the target folder.';

src/commands/open.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ export default class OpenCommand extends BaseCommand<typeof OpenCommand> {
1717

1818
static hidden = true;
1919

20+
// needed for deprecation message
21+
static id = 'open' as const;
22+
2023
static state = 'deprecated';
2124

2225
static deprecationOptions = {
23-
message: '`rdme open` is deprecated and will be removed in a future release.',
26+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
2427
};
2528

2629
async run() {

src/commands/versions/create.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ export default class CreateVersionCommand extends BaseCommand<typeof CreateVersi
1717
// needed for unit tests, even though we also specify this in src/index.ts
1818
static id = 'versions create';
1919

20+
static state = 'deprecated';
21+
22+
static deprecationOptions = {
23+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
24+
};
25+
2026
static args = {
2127
version: Args.string({
2228
description: "The version you'd like to create. Must be valid SemVer (https://semver.org/)",

src/commands/versions/delete.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ import { cleanAPIv1Headers, handleAPIv1Res, readmeAPIv1Fetch } from '../../lib/r
66
import { getProjectVersion } from '../../lib/versionSelect.js';
77

88
export default class DeleteVersionCommand extends BaseCommand<typeof DeleteVersionCommand> {
9+
// needed for deprecation message
10+
static id = 'versions delete' as const;
11+
12+
static state = 'deprecated';
13+
14+
static deprecationOptions = {
15+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
16+
};
17+
918
static description = 'Delete a version associated with your ReadMe project.';
1019

1120
static args = {

src/commands/versions/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ export interface Version {
1616
}
1717

1818
export default class VersionsCommand extends BaseCommand<typeof VersionsCommand> {
19+
// needed for deprecation message
20+
static id = 'versions' as const;
21+
22+
static state = 'deprecated';
23+
24+
static deprecationOptions = {
25+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
26+
};
27+
1928
static description = 'List versions available in your project or get a version by SemVer (https://semver.org/).';
2029

2130
static flags = {

src/commands/versions/update.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ import { cleanAPIv1Headers, handleAPIv1Res, readmeAPIv1Fetch } from '../../lib/r
1212
import { getProjectVersion } from '../../lib/versionSelect.js';
1313

1414
export default class UpdateVersionCommand extends BaseCommand<typeof UpdateVersionCommand> {
15+
// needed for deprecation message
16+
static id = 'versions update' as const;
17+
18+
static state = 'deprecated';
19+
20+
static deprecationOptions = {
21+
message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`,
22+
};
23+
1524
static description = 'Update an existing version for your project.';
1625

1726
static args = {

0 commit comments

Comments
 (0)