From 8742ffaee40c2337324651f3dabdfc34feeaf2e3 Mon Sep 17 00:00:00 2001 From: Mike Yumatov Date: Mon, 29 Jun 2026 13:08:01 +0300 Subject: [PATCH] fix(rw-node): add backstage.pluginPackages so prepack succeeds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rw-node declares `pluginId: "rw"`, joining the "rw" plugin group, but lacked the `backstage.pluginPackages` array that every grouped package must carry, so `backstage-cli package prepack` aborted with: Plugin library package @rwdocs/backstage-plugin-rw-node is missing a backstage.pluginPackages, please run 'backstage-cli repo fix --publish' Ran `backstage-cli repo fix --publish`, which adds the array to rw-node (and lists rw-node in the other grouped packages) and incidentally normalizes all six packages to the CLI 0.36 canonical publish shape: drop the redundant main/module/types from publishConfig (prepack injects them per role), add the package.json self-export under typesVersions, and mark the libraries sideEffects:false. This also removes rw-node's phantom `module: dist/index.esm.js` entry — it is a CJS-only node-library. All publish-metadata only; typecheck, build, and lint pass, and prepack for rw-node now succeeds. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../package.json | 11 +++++++--- plugins/rw-backend/package.json | 14 +++++++++---- plugins/rw-common/package.json | 16 ++++++++++----- plugins/rw-node/package.json | 20 ++++++++++++++----- plugins/rw/package.json | 16 ++++++++++----- plugins/search-backend-module-rw/package.json | 11 +++++++--- 6 files changed, 63 insertions(+), 25 deletions(-) diff --git a/plugins/rw-backend-module-notifications/package.json b/plugins/rw-backend-module-notifications/package.json index 4b3a267..e297342 100644 --- a/plugins/rw-backend-module-notifications/package.json +++ b/plugins/rw-backend-module-notifications/package.json @@ -13,10 +13,15 @@ ".": "./src/index.ts", "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module", diff --git a/plugins/rw-backend/package.json b/plugins/rw-backend/package.json index 2072771..25800ef 100644 --- a/plugins/rw-backend/package.json +++ b/plugins/rw-backend/package.json @@ -13,10 +13,15 @@ ".": "./src/index.ts", "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin", @@ -24,7 +29,8 @@ "pluginPackages": [ "@rwdocs/backstage-plugin-rw", "@rwdocs/backstage-plugin-rw-backend", - "@rwdocs/backstage-plugin-rw-common" + "@rwdocs/backstage-plugin-rw-common", + "@rwdocs/backstage-plugin-rw-node" ] }, "files": [ diff --git a/plugins/rw-common/package.json b/plugins/rw-common/package.json index b4541e7..1f85a37 100644 --- a/plugins/rw-common/package.json +++ b/plugins/rw-common/package.json @@ -13,11 +13,15 @@ ".": "./src/index.ts", "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "module": "dist/index.esm.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "common-library", @@ -25,7 +29,8 @@ "pluginPackages": [ "@rwdocs/backstage-plugin-rw", "@rwdocs/backstage-plugin-rw-backend", - "@rwdocs/backstage-plugin-rw-common" + "@rwdocs/backstage-plugin-rw-common", + "@rwdocs/backstage-plugin-rw-node" ] }, "configSchema": "config.d.ts", @@ -35,6 +40,7 @@ "LICENSE-MIT", "LICENSE-APACHE" ], + "sideEffects": false, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", diff --git a/plugins/rw-node/package.json b/plugins/rw-node/package.json index f004c99..b29f9f2 100644 --- a/plugins/rw-node/package.json +++ b/plugins/rw-node/package.json @@ -13,15 +13,25 @@ ".": "./src/index.ts", "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "module": "dist/index.esm.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "node-library", - "pluginId": "rw" + "pluginId": "rw", + "pluginPackages": [ + "@rwdocs/backstage-plugin-rw", + "@rwdocs/backstage-plugin-rw-backend", + "@rwdocs/backstage-plugin-rw-common", + "@rwdocs/backstage-plugin-rw-node" + ] }, "files": [ "dist", diff --git a/plugins/rw/package.json b/plugins/rw/package.json index e1131c7..1dc9742 100644 --- a/plugins/rw/package.json +++ b/plugins/rw/package.json @@ -13,11 +13,15 @@ ".": "./src/index.ts", "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "module": "dist/index.esm.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "frontend-plugin", @@ -25,7 +29,8 @@ "pluginPackages": [ "@rwdocs/backstage-plugin-rw", "@rwdocs/backstage-plugin-rw-backend", - "@rwdocs/backstage-plugin-rw-common" + "@rwdocs/backstage-plugin-rw-common", + "@rwdocs/backstage-plugin-rw-node" ] }, "files": [ @@ -33,6 +38,7 @@ "LICENSE-MIT", "LICENSE-APACHE" ], + "sideEffects": false, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", diff --git a/plugins/search-backend-module-rw/package.json b/plugins/search-backend-module-rw/package.json index 49e0dc7..c5fdeb1 100644 --- a/plugins/search-backend-module-rw/package.json +++ b/plugins/search-backend-module-rw/package.json @@ -13,10 +13,15 @@ ".": "./src/index.ts", "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module",