From 0c70f435b2d64c845f0f8a0df2e4dd61139e0f4b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 31 Aug 2024 17:45:54 +0200 Subject: [PATCH] cli-node: add backstage.inline Signed-off-by: Patrik Oldsberg --- .changeset/hip-fans-decide.md | 5 +++++ packages/cli-node/api-report.md | 1 + packages/cli-node/src/monorepo/PackageGraph.ts | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 .changeset/hip-fans-decide.md diff --git a/.changeset/hip-fans-decide.md b/.changeset/hip-fans-decide.md new file mode 100644 index 0000000000..ecdf6d8a4d --- /dev/null +++ b/.changeset/hip-fans-decide.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli-node': patch +--- + +Add definition for the new `backstage.inline` field in `package.json`. diff --git a/packages/cli-node/api-report.md b/packages/cli-node/api-report.md index 9f7e525048..f22583dd25 100644 --- a/packages/cli-node/api-report.md +++ b/packages/cli-node/api-report.md @@ -18,6 +18,7 @@ export interface BackstagePackageJson { backstage?: { role?: PackageRole; moved?: string; + inline?: boolean; pluginId?: string | null; pluginPackage?: string; pluginPackages?: string[]; diff --git a/packages/cli-node/src/monorepo/PackageGraph.ts b/packages/cli-node/src/monorepo/PackageGraph.ts index c8877803d5..69ec99c2dd 100644 --- a/packages/cli-node/src/monorepo/PackageGraph.ts +++ b/packages/cli-node/src/monorepo/PackageGraph.ts @@ -47,6 +47,15 @@ export interface BackstagePackageJson { role?: PackageRole; moved?: string; + /** + * If set to `true`, the package will be treated as an internal package + * where any imports will be inlined into the consuming package. + * + * When set to `true`, the top-level `private` field must be set to `true` + * as well. + */ + inline?: boolean; + /** * The ID of the plugin if this is a plugin package. Must always be set for plugin and module packages, and may be set for library packages. A `null` value means that the package is explicitly not a plugin package. */