Remove extra exports from CLI module packages

CLI modules should only export the module itself as a default export.
Remove the named `buildPlugin` export from cli-module-build and the
unused `configOption` export from cli-module-config. Also remove the
API report warning skip for CLI module packages.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-15 21:51:07 +01:00
parent 7879215cca
commit 2069f64201
5 changed files with 7 additions and 29 deletions
+4 -4
View File
@@ -21,15 +21,15 @@
"plugins/*"
],
"scripts": {
"build-storybook": "storybook build --output-dir dist-storybook",
"build-storybook:chromatic": "STORYBOOK_STORY_SET=chromatic storybook build --stats-json --output-dir dist-storybook",
"build:all": "backstage-cli repo build --all",
"build:api-docs": "LANG=en_EN yarn build:api-reports --docs --exclude 'plugins/@(api-docs|api-docs-module-protoc-gen-doc|app-visualizer|catalog-graph|catalog-import|catalog-unprocessed-entities|config-schema|example-todo-list|example-todo-list-backend)'",
"build:api-reports": "yarn build:api-reports:only --tsc",
"build:api-reports:only": "LANG=en_US.UTF-8 NODE_OPTIONS=--max-old-space-size=8192 backstage-repo-tools api-reports --sql-reports --allow-warnings 'packages/backend-app-api,packages/cli-module-*,packages/core-components,plugins/+(catalog|catalog-import|kubernetes)' -o ae-undocumented,ae-wrong-input-file-type --validate-release-tags",
"build:api-reports:only": "LANG=en_US.UTF-8 NODE_OPTIONS=--max-old-space-size=8192 backstage-repo-tools api-reports --sql-reports --allow-warnings 'packages/backend-app-api,packages/core-components,plugins/+(catalog|catalog-import|kubernetes)' -o ae-undocumented,ae-wrong-input-file-type --validate-release-tags",
"build:backend": "yarn workspace example-backend build",
"build:knip-reports": "backstage-repo-tools knip-reports",
"build:plugins-report": "node ./scripts/build-plugins-report",
"build-storybook": "storybook build --output-dir dist-storybook",
"build-storybook:chromatic": "STORYBOOK_STORY_SET=chromatic storybook build --stats-json --output-dir dist-storybook",
"clean": "backstage-cli repo clean",
"create-plugin": "echo \"use 'yarn new' instead\"",
"dev": "echo \"use 'yarn start' instead\"",
@@ -52,10 +52,10 @@
"snyk:test": "npx snyk test --yarn-workspaces --strict-out-of-sync=false",
"snyk:test:package": "yarn snyk:test --include",
"start": "backstage-cli repo start",
"start-backend": "echo \"Use 'yarn start example-backend' instead\"",
"start:docker": "docker compose -f docker-compose.deps.yml up --wait && BACKSTAGE_ENV=docker yarn start",
"start:legacy": "yarn start example-app-legacy example-backend",
"start:microsite": "cd microsite/ && yarn start",
"start-backend": "echo \"Use 'yarn start example-backend' instead\"",
"storybook": "storybook dev -p 6006",
"sync-issue-templates": "node ./.github/ISSUE_TEMPLATE/sync.js",
"techdocs-cli": "node scripts/techdocs-cli.js",
+2 -5
View File
@@ -5,12 +5,9 @@
```ts
import { CliModule } from '@backstage/cli-node';
// Warning: (ae-missing-release-tag) "buildPlugin" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
const buildPlugin: CliModule;
export { buildPlugin };
export default buildPlugin;
const _default: CliModule;
export default _default;
// (No @packageDocumentation comment for this package)
```
+1 -3
View File
@@ -17,7 +17,7 @@
import { createCliModule } from '@backstage/cli-node';
import packageJson from '../package.json';
export const buildPlugin = createCliModule({
export default createCliModule({
packageJson,
init: async reg => {
reg.addCommand({
@@ -85,5 +85,3 @@ export const buildPlugin = createCliModule({
});
},
});
export default buildPlugin;
-10
View File
@@ -5,16 +5,6 @@
```ts
import { CliModule } from '@backstage/cli-node';
// Warning: (ae-missing-release-tag) "configOption" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const configOption: readonly [
'--config <path>',
'Config files to load instead of app-config.yaml',
(opt: string, opts: string[]) => string[],
string[],
];
// @public (undocumented)
const _default: CliModule;
export default _default;
-7
View File
@@ -16,13 +16,6 @@
import { createCliModule } from '@backstage/cli-node';
import packageJson from '../package.json';
export const configOption = [
'--config <path>',
'Config files to load instead of app-config.yaml',
(opt: string, opts: string[]) => (opts ? [...opts, opt] : [opt]),
Array<string>(),
] as const;
export default createCliModule({
packageJson,
init: async reg => {